emacs-gtd icon indicating copy to clipboard operation
emacs-gtd copied to clipboard

Deadline section always has the same height

Open lazzalazza opened this issue 3 years ago • 8 comments
trafficstars

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:

immagine

Here's instead how I see deadlines:

immagine

I have used your code with no modifications.

Thank you so much for your help!

lazzalazza avatar Aug 01 '22 16:08 lazzalazza

That's weird. Did you try with vanilla emacs (emacs -q)?

rougier avatar Aug 08 '22 17:08 rougier

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.

lazzalazza avatar Aug 10 '22 10:08 lazzalazza

I'm experiencing the same, I'm on Emacs 29, custom config

MagicRB avatar Aug 30 '22 14:08 MagicRB

@MagicRB Can you try with emacs -q ?

rougier avatar Sep 02 '22 10:09 rougier

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.

perryprog avatar Nov 10 '22 20:11 perryprog

Or we can ask agenda to not display empty day (forgot the name of the option though)

rougier avatar Nov 28 '22 08:11 rougier

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.

sonn-gamm avatar Dec 10 '22 22:12 sonn-gamm

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.

rougier avatar Dec 20 '22 08:12 rougier