Org-mode mailing list
 help / color / mirror / Atom feed
* 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; 2+ 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	[flat|nested] 2+ messages in thread

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

[ Sorry for the slow reply here, and thank you for looking into this. ]

James N V Cash writes:

> 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"?

Yep, that's the idea, I think.  It's mentioned in both 942b6267a
(org-agenda: `tags-todo' command type includes DONE keywords,
2017-04-18) and 2fb129b5c (`org-scan-tags' retrieve all TODO keywords,
not only not-done ones, 2017-08-17).

>
> 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)

This does resolve the reported issue with the b tags-todo set reported
in <https://orgmode.org/list/m2ftazm3l1.fsf@brautaset.org>.  However, it
breaks the org-tags-view todo-only operation (agenda's M): it no longer
filters out todos in a DONE state.  This behavior is explicitly
specified in the manual:

  Using ‘M-x org-agenda M’ or ‘/!’ does not match TODO keywords in a
  DONE state.

In <https://orgmode.org/list/87d061auiw.fsf@kyleam.com>, I asked,
"shouldn't tags-todo consider only none-DONE todo items, in the same
spirit as m versus M?"  And, looking at this again, it's not only in
spirit; the tags-todo agenda view and org-tags-view's todo-only are
really directly linked:

   ((eq type 'tags-todo)
    (org-let lprops '(org-tags-view '(4) org-match)))

After rereading the thread at m2ftazm3l1.fsf@brautaset.org, I'm still
not convinced we should break that link.


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

end of thread, other threads:[~2020-11-13  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 18:18 tags-todo agenda shoud not ignore DONE items James N V Cash
2020-11-13  6:22 ` Kyle Meyer

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git