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

time-grid should not consume all items in list of TODO entries #212

Open
schemar opened this issue Jan 16, 2022 · 3 comments
Open

time-grid should not consume all items in list of TODO entries #212

schemar opened this issue Jan 16, 2022 · 3 comments

Comments

@schemar
Copy link

schemar commented Jan 16, 2022

First of all, thank you so much for super-agenda ❤️

I encounter unexpected behavior where I am not sure whether it is the intended way.

When I open the "List of all TODO entries" (t),
all my items are under the time-grid group,
even though there is no time grid in the TODO list.

I would expect the time-grid group to be empty and all tasks to be passed to the next group.

My config:

(setq org-super-agenda-groups
      '((:name "Today"
               :time-grid t)
        (:name "Foo"
               :tag "foo")
        (:name "Bar"
               :tag "bar")))

When I M-x org-agenda -> t, all my tasks are listed under Today instead of Foo, Bar, and Other. Am I misunderstanding something here?

@alphapapa
Copy link
Owner

Hi,

This is probably due to a peculiarity of how Org makes agenda views and the "List of all TODO entries" view (which isn't an agenda view but is prepared by the org-agenda library, so maybe it is an agenda view? issues like this are one of the reasons I wrote org-ql...).

You can see here what causes the :time-grid selector to collect an item:

:test (or (--when-let (org-find-text-property-in-string 'time item)
You can then look at the text properties of collected items using C-u C-x = and see if any match. And then, if you're brave enough, you could dig into org-agenda.el and find the code that adds those text properties.

You might have found a bug in Org, or maybe just an inconsistency. Whether fixing it here and/or in Org would be appropriate, I don't know. I don't expect that I'll have time to work on fixing this myself anytime soon, so help would be appreciated. Thanks.

@angel-devicente
Copy link

In case it can be useful, I was having the same issue, since I wanted the global TODO list grouped also with org-super-agenda and without the need to modify the source code as in #221, I ended up with this, which works nicely.

(setq own-agenda-groups '((:name "Efemerides" :tag "efemerides" :order 1)       
                         (:name "IMPORTANT" :priority "A" :transformer          
                                (--> it                                         
                                     (propertize it 'face                       
                                                 '(:foreground "red" :background "green")))
                                :order 1)                                       
                         (:name "Astrophysics" :tag "astrophysics" :order 3)    
                         (:name "Hacking" :tag "hacking" :order 3)              
                         (:name "Admin" :tag "admin" :order 4)))               
                                                                                
(setq org-agenda-custom-commands                                                
      '(("h" "Agenda and tasks"                                                 
         ((agenda "" ((org-super-agenda-groups                                  
                       (append                                                  
                        '((:todo "DONE" :discard)                               
                          (:name "Schedule" :time-grid t :transformer           
                                 (--> it                                        
                                      (propertize it 'face                      
                                                  '(:foreground "yellow")))))   
                        own-agenda-groups))))                                   
          (alltodo "" ((org-super-agenda-groups                                 
                        (append                                                 
                         '((:todo "DONE" :discard))                             
                         own-agenda-groups))))))))                              

@alphapapa
Copy link
Owner

Fixing this will require some research and testing to confirm that nothing else gets broken.

In the meantime, I can recommend using org-ql as an alternative to using the Org Agenda "all TODOs" view.

@alphapapa alphapapa self-assigned this Sep 23, 2023
@alphapapa alphapapa added this to the 1.4 milestone Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants