emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH] org-element-cache-map: Fix handling of continue-from


From: Matthieu Caneill
Subject: [PATCH] org-element-cache-map: Fix handling of continue-from
Date: Fri, 27 Jan 2023 00:18:43 +0100

Hi,

I'm hit by the following bug in `org-element-cache-map'. When I use
`tags' or `tags-todo' in an agenda, with the option
`(org-tags-match-list-sublevels nil)', all sub-elements of a matching
item are correctly skipped except the last one.

It can be reproduced with the following org file:

  * TODO Parent

  ** TODO Child 1

  ** TODO Child 2

and the following agenda:

  (setq org-agenda-custom-commands
        '(
          ("t" "Test"
           (
            (tags-todo "-foo" ((org-tags-match-list-sublevels nil)))
            (tags "-foo" ((org-tags-match-list-sublevels nil)))
            )
           ((org-agenda-files '("~/org/test.org"))))))

With `(org-tags-match-list-sublevels t)', I correctly see all 3
elements. With `(org-tags-match-list-sublevels nil)', I see Parent and
Child 2. This wasn't the case on an older version of org-element that
didn't make use of the cache.

I understand the option `org-tags-match-list-sublevels' is
semi-deprecated in favor of proper tag inheritance
configuration. However, to the best of my understanding, I can't
accomplish "list all todo items except those tagged with foo, and skip
children of matching entries" with tag inheritance.

Patch is attached. Happy to iterate over it in case my understanding
of this rather complex function is flawed. I tested it on my org
files, and would of course appreciate if others could test.

Best,
--
Matthieu

Attachment: 0001-org-element-cache-map-Fix-handling-of-continue-from.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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