Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadline section always has the same height #21

Open
lazzalazza opened this issue Aug 1, 2022 · 8 comments
Open

Deadline section always has the same height #21

lazzalazza opened this issue Aug 1, 2022 · 8 comments

Comments

@lazzalazza
Copy link

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 lazzalazza changed the title Deadline section always has the same length Deadline section always has the same height Aug 1, 2022
@rougier
Copy link
Owner

rougier commented Aug 8, 2022

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

@lazzalazza
Copy link
Author

lazzalazza commented Aug 10, 2022 via email

@MagicRB
Copy link

MagicRB commented Aug 30, 2022

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

@rougier
Copy link
Owner

rougier commented Sep 2, 2022

@MagicRB Can you try with emacs -q ?

@perryprog
Copy link

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.

@rougier
Copy link
Owner

rougier commented Nov 28, 2022

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

@sonn-gamm
Copy link

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.

@rougier
Copy link
Owner

rougier commented Dec 20, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants