emacs-gtd
emacs-gtd copied to clipboard
Deadline section always has the same height
Hi! Thanks for the great work! I have an issue with the Deadline section: it always occupies a huge chunk of the visibile agenda, and this bothers me a little. Here's how it looks with no deadlines:

Here's instead how I see deadlines:

I have used your code with no modifications.
Thank you so much for your help!
That's weird. Did you try with vanilla emacs (emacs -q)?
Hi! No, haven't tried: eventually I decided to move all the deadlines back to the agenda and solved the issue like that for myself. Idk if anyone has experienced the same though.
I am using spacemacs, btw.
Thanks for your reply and for the great work.
Il giorno 8 ago 2022, alle ore 19:46, Nicolas P. Rougier @.***> ha scritto:
That's weird. Did you try with vanilla emacs (emacs -q)?
— Reply to this email directly, view it on GitHub https://github.com/rougier/emacs-gtd/issues/21#issuecomment-1208422086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONRCSLYQXPNF3Z2MXX676TVYFBVXANCNFSM55IC7HIQ. You are receiving this because you authored the thread.
I'm experiencing the same, I'm on Emacs 29, custom config
@MagicRB Can you try with emacs -q ?
Looks like it's happening because org-agenda-span is set to 'week (or more), so there's a new line for every date (which is an empty string). You can fix this by adding (org-agenda-span 'week) to the offending sections.
Or we can ask agenda to not display empty day (forgot the name of the option though)
Or we can ask agenda to not display empty day (forgot the name of the option though)
Thanks for the tip, I looked up the option, it's this one:
(org-agenda-show-all-dates nil)
Leaving (org-agenda-format-date "") in the deadline block hides the line but keep the line itself, producing ultimately an empty line. Therefore, I took out this option and by using the following agenda block:
(agenda nil
((org-agenda-entry-types '(:deadline))
(org-deadline-warning-days 7)
(org-agenda-show-all-dates nil)
(org-agenda-skip-function
'(org-agenda-skip-entry-if 'notregexp "\\* NEXT"))
(org-agenda-overriding-header "\nDeadlines")))
I get the following Agenda Display:
Deadlines
Saturday 10 December 2022
inbox: In 1 d.: NEXT another test
Sunday 11 December 2022
inbox: Deadline: NEXT another test
When there's no DEADLINE tasks, the Deadline block produces the following:
Deadlines
I still am not sure how @rougier achieved what's described in the README, but in the end it's useful to see the date above the task...
Thanks and hope this is useful.
I think there were some questions on stack overflow on how to get rid of the section title when it it empy but no solution was given from what I remember. Not that the section title can be a function such that you test if section empty and compute title accordingly.