emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Making org-agenda filters orthogonal and refreshed


From: Greg Tucker-Kellogg
Subject: [O] [PATCH] Making org-agenda filters orthogonal and refreshed
Date: Sat, 19 Apr 2014 09:53:08 +0800

This is org-mode version 8.2.5h, directly off the git.
emacs version 24.4.50.1

I have noticed that combining top headline filters and category
filters didn't always work as documented.  In particular, the
combination of filters displayed depends on the order of application
and removal, and is not always refreshed properly.  To test it, I
created a new org file with a couple of simple entries.  Note: the
behaviour is most obvious if you have some other tasks with the same
categories or tags in your global todo agenda.

* A team member

** TODO Task 1                                                     :COMPUTER:
:PROPERTIES:
:CATEGORY: Work
:END:

** TODO Task 2
:PROPERTIES:
:CATEGORY: Team
:END:

* Someone else

** TODO Someone else's Task 1                                      :COMPUTER:
:PROPERTIES:
:CATEGORY: Work
:END:


If I apply two filters in succession: "^" to filter to the "top
headline" and "<" to filter to the "Work" category, it appears to
work.  But then if I toggle the top headline filter with "^" again,
all the filters are removed, because the function is using the
category filter type to apply and remove the top headline overlay.
(Separately, the "|" shortcut to remove all filters does not currently
recognise a top headline filter).

I created a patch to fix the issues, but I think it's a bit of a hack,
and I'd welcome input or a better patch by a more skilled coder.  Even
after separating the filter removal, I ended up advising two filter
functions to reload the agenda so that it refreshed properly.  All of
this reflects my poor elisp skills.  Nonetheless, I  wonder if
org-agenda doesn't need some refactoring to remove the explicit
repetition of cases for different filter types.

Greg

Attachment: org-agenda.el.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]