emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* tags-todo org-agenda-custom-command weirdness
@ 2020-06-13 14:40 Stig Brautaset
  2020-06-13 16:19 ` Stig Brautaset
  2020-06-15  3:16 ` Kyle Meyer
  0 siblings, 2 replies; 16+ messages in thread
From: Stig Brautaset @ 2020-06-13 14:40 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

I'm seeing some weirdness with tags-todo vs tags custom agenda commands.
Below is the smallest case I've managed to narrow it down to. I would
*expect* that all the a1-4 commands return the same results, and that
the b1-4 return the same results. That is not what I'm seeing, however.

(setq-default org-agenda-custom-commands
	      '(("a1" "A1" tags-todo "-PROJ/TODO")
                ("a2" "A2" tags "-PROJ/TODO")
		("a3" "A3" ((tags-todo "-PROJ/TODO")))
		("a4" "A4" ((tags "-PROJ/TODO")))
		
		("b1" "B1" tags-todo "-PROJ/DONE")
		("b2" "B2" tags "-PROJ/DONE")
		("b3" "B3" ((tags-todo "-PROJ/DONE")))
		("b4" "B4" ((tags "-PROJ/DONE")))))


The effect of a1 & a2 appears identical to eachother, and a3 & a4 too,
but a1-2 and a3-4 differ (in that the former seems to include scheduled
items, but the latter does not.)

What I'm seeing for b1-4 is even weirder. Here I observe b1, b2 and b4
have identical behaviour[*], but b3 is the odd one out: while the other
three return a list of DONE non-project tasks, b3 doesn't find anything.

[*] I suspect the reason b2 and b4 are identical is that I have no
scheduled DONE tasks.

I also see this with =m= vs =M= in the org-agenda menu. I see it even
when starting emacs with -q, so it appears to not be some spectactular
breakage on my part. Is anyone else seing this?


Stig


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: tags-todo agenda shoud not ignore DONE items
@ 2020-09-15 18:18 James N V Cash
  2020-11-13  6:22 ` Kyle Meyer
  0 siblings, 1 reply; 16+ messages in thread
From: James N V Cash @ 2020-09-15 18:18 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, stig

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]


Bastien <bzg@gnu.org> writes:

> Confirming this as an issue, if someone wants to fix it.

I've tried taking a shot at addressing this issue via the patch attached.

As mentioned in the thread, might potentially cause issues by changing how it matches -- should there be an option? Or is the idea just that if you really do want to exclude done tags, you'd query like "/!DONE"?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: matcher allow all tags --]
[-- Type: text/x-diff, Size: 551 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 020cfc873..3db1add8b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11691,7 +11691,7 @@ See also `org-scan-tags'."
 		       `(and ,tagsmatcher ,todomatcher)
 		     (or tagsmatcher todomatcher t))))
       (when org--matcher-tags-todo-only
-	(setq matcher `(and (member todo org-not-done-keywords) ,matcher)))
+	(setq matcher `(and (member todo org-todo-keywords-1) ,matcher)))
       (cons match0 `(lambda (todo tags-list level) ,matcher)))))
 
 (defun org--tags-expand-group (group tag-groups expanded)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-05-17  5:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-13 14:40 tags-todo org-agenda-custom-command weirdness Stig Brautaset
2020-06-13 16:19 ` Stig Brautaset
2020-06-15  3:16 ` Kyle Meyer
2020-06-15 18:52   ` Stig Brautaset
2020-06-16  5:11     ` Kyle Meyer
2020-06-16  8:31       ` Stig Brautaset
2020-09-05 15:03         ` Bastien
2020-09-05 20:06           ` Stig Brautaset
2020-09-06  5:04             ` Bastien
2020-09-06  5:07       ` tags-todo agenda shoud not ignore DONE items (was: tags-todo org-agenda-custom-command weirdness) Bastien
2021-05-16 22:56         ` tags-todo agenda shoud not ignore DONE items Bastien
2021-05-17  4:46           ` Kyle Meyer
2021-05-17  5:24             ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2020-09-15 18:18 James N V Cash
2020-11-13  6:22 ` Kyle Meyer
2021-04-27 19:39   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).