1

My Global TODO list shows headings one after another, without any spacing between headings.

To me this looks a little crowded, and it would be easier to see the end of one heading and the start of the next one if there was a blank line or a separator like "------" between headings.

I do have line-spacing set but this does not do what I would like.

I have searched this forum as well the net for answers and have not been able to find anything.

Is there a way to add a blank line between headings in the Global TODO list?

Thanks ahead of time.....

BTW thanks especially to Drew and NickD for all their help to me (and others) so many times in the past couple of years :) I think this forum is very lucky to have you both and I am very grateful to you for your obvious commitment to very strongly support this forum and share your extensive knowledge. I almost feel guilty in asking a question because I know based on past experience that you will respond and I hope I am not taking too much of your time and effort each time I ask a question.

2
  • 1
    Github -- "Ensure blank lines between headings and before contents": github.com/alphapapa/… Adam Porter has been a significant contributor to the Emacs community over the years ...
    – lawlist
    Commented Dec 10, 2022 at 19:12
  • I don't think there is anything built-in to spread out the global TODO list. I was able to spread it out by a small modification to the org-agenda-finalize-entries, but that function is used in more than one place, so making a change to it will affect more than the global TODO list. I would suggest an RFE to the Org mode mailing list.
    – NickD
    Commented Dec 10, 2022 at 20:31

1 Answer 1

2

You can insert blank lines, or make other modifications, using the org-agenda-finalize-hook hook.

(defun my/org-agenda-insert-blank-lines ()
  (save-excursion
    (goto-char (point-min))
    (when (re-search-forward "Global list of TODO items" nil t)
      (forward-line 3)
      (while (not (eobp))
        (insert "\n")
        (forward-line)))))


(add-hook 'org-agenda-finalize-hook 'my/org-agenda-insert-blank-lines)
5
  • Good point! I forgot about the hook. You might want to say something about what to set org-agenda-block-separator to.
    – NickD
    Commented Dec 11, 2022 at 2:14
  • Thanks, I went ahead and removed that part.
    – jagrg
    Commented Dec 11, 2022 at 11:33
  • Thanks very much to everyone for responding to my post!
    – ironfish
    Commented Dec 11, 2022 at 15:35
  • jagrg I very much appreciate you sharing this code. I have marked it as Answer.
    – ironfish
    Commented Dec 11, 2022 at 15:36
  • jagrg - I got a chance to put your code into my .emacs file and it works like a charm and to me it makes a huge improvement in readability of the list - thanks again
    – ironfish
    Commented Dec 12, 2022 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.