* [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
@ 2023-06-12 4:49 John Wiegley
2023-06-12 10:10 ` [POLL] " Ihor Radchenko
0 siblings, 1 reply; 9+ messages in thread
From: John Wiegley @ 2023-06-12 4:49 UTC (permalink / raw)
To: emacs-orgmode
When I type ‘\ c’, the agenda view limits to my (c)all tags. This is what I
expected to see.
When I type ‘\ <space>’, however, it limits to every tag *but* the empty tag.
This is the opposite of what I expect to see.
Emacs : GNU Emacs 28.2 (build 1, x86_64-apple-darwin22.5.0, Carbon Version 169 AppKit 2299.6)
Package: Org mode version 9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-12 4:49 [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)] John Wiegley
@ 2023-06-12 10:10 ` Ihor Radchenko
2023-06-12 19:48 ` John Wiegley
0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2023-06-12 10:10 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
"John Wiegley" <johnw@gnu.org> writes:
> When I type ‘\ c’, the agenda view limits to my (c)all tags. This is what I
> expected to see.
>
> When I type ‘\ <space>’, however, it limits to every tag *but* the empty tag.
> This is the opposite of what I expect to see.
Confirmed.
In `org-agenda-filter-by-tag',
((or (eq char ?\s)
(setq a (rassoc char alist))
(and tag (setq a (cons tag nil))))
(org-agenda-filter-show-all-tag)
(setq tag (car a))
(setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
(if accumulate current nil)))
(org-agenda-filter-apply org-agenda-tag-filter 'tag expand))
"\ <space>" will call
(org-agenda-filter-make-matcher '("+") 'tag nil) ; => (and (or tags))
which matches entries with tags, not the entries without tags.
But <space> is actually not documented, so I am not sure if it is a bug.
I can see logic with <space> being "any tag" (it appears alongside other
tag shortcuts), and I can see logic with <space> being "no tag"
(consistent with `org-set-tags-command').
Changing the current behaviour will be a breaking change.
I am inclined to change the current behaviour and document it, unless
there are objections.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-12 10:10 ` [POLL] " Ihor Radchenko
@ 2023-06-12 19:48 ` John Wiegley
2023-06-13 9:52 ` Ihor Radchenko
0 siblings, 1 reply; 9+ messages in thread
From: John Wiegley @ 2023-06-12 19:48 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> Ihor Radchenko <yantar92@posteo.net> writes:
> Changing the current behaviour will be a breaking change.
>
> I am inclined to change the current behaviour and document it, unless there
> are objections.
I would also note that in Org-mode 8 and earlier, ‘/ <space>’ would limit to
all untagged entries, which is why I had that expectations.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-12 19:48 ` John Wiegley
@ 2023-06-13 9:52 ` Ihor Radchenko
2023-06-14 5:22 ` John Wiegley
0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2023-06-13 9:52 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
John Wiegley <johnw@gnu.org> writes:
>>>>>> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Changing the current behaviour will be a breaking change.
>>
>> I am inclined to change the current behaviour and document it, unless there
>> are objections.
>
> I would also note that in Org-mode 8 and earlier, ‘/ <space>’ would limit to
> all untagged entries, which is why I had that expectations.
Are you sure?
I can see 124017b6d that changes
(setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
current))
to
(setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
(if accumulate current nil)))
The former would leave the current filter unchanged.
It would be nice to bisect down to the commit that changed the behaviour.
As it usually goes with agenda, consequences of some changes are not
always straightforward.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-13 9:52 ` Ihor Radchenko
@ 2023-06-14 5:22 ` John Wiegley
2023-06-14 18:00 ` John Wiegley
0 siblings, 1 reply; 9+ messages in thread
From: John Wiegley @ 2023-06-14 5:22 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:
IR> Are you sure?
IR> I can see 124017b6d that changes
IR> (setq org-agenda-tag-filter
IR> (cons (concat (if exclude "-" "+") tag)
IR> current))
IR> to
IR> (setq org-agenda-tag-filter
IR> (cons (concat (if exclude "-" "+") tag)
IR> (if accumulate current nil)))
IR> The former would leave the current filter unchanged.
IR> It would be nice to bisect down to the commit that changed the behaviour.
IR> As it usually goes with agenda, consequences of some changes are not
IR> always straightforward.
Since my data should all still be compatible with the old version I was using,
I’ll see if I can bisect this. I know I was used to that binding, but I’m not
100% certain it wasn’t due to extenuating factors in my configuration.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-14 5:22 ` John Wiegley
@ 2023-06-14 18:00 ` John Wiegley
2023-06-15 10:12 ` Ihor Radchenko
0 siblings, 1 reply; 9+ messages in thread
From: John Wiegley @ 2023-06-14 18:00 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:
IR> It would be nice to bisect down to the commit that changed the behaviour.
IR> As it usually goes with agenda, consequences of some changes are not
IR> always straightforward.
I have found the cause of the change in behavior:
(org-agenda-filter-make-matcher '("+" . nil) 'tag)
=> 8.2.4: (and (not tags))
=> 9.6.6: (and (or tags))
This occurred during the refactoring in:
commit 6c6ae990c10dbe7f96b24fccf840fe9f6d81a3b8
Author: Gustav Wikström <gustav@UVServer>
Date: Sat Jan 24 02:47:35 2015 +0100
org-agenda: Filtering in the agenda on grouptags
[…]
* lisp/org-agenda.el (org-agenda-filter-make-matcher): new optional
argument EXPAND and refactoring.
The change was released in 8.3, which is why I never noticed it, because I
upgraded from 8.2.4 directly to 9.6.
Since the documentation also mentions that space means “any tag”, I guess now
it’s a design question: Should <space> mean “no tags” or “any tag”? I feel
like it should mean “no tag” only because you also use space to clear all tags
in the agenda after pressing “:”.
If the decision is “desired behavior”, then the muscle memory needed is
‘\ - <space>‘ rather than ‘\ <space>‘. Still feels odd for space to mean
anything rather than nothing, though… I mean, space is empty, right? :)
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
2023-06-14 18:00 ` John Wiegley
@ 2023-06-15 10:12 ` Ihor Radchenko
2023-08-16 12:06 ` Ihor Radchenko
0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2023-06-15 10:12 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
John Wiegley <johnw@gnu.org> writes:
> Since the documentation also mentions that space means “any tag”, I guess now
> it’s a design question: Should <space> mean “no tags” or “any tag”? I feel
> like it should mean “no tag” only because you also use space to clear all tags
> in the agenda after pressing “:”.
>
> If the decision is “desired behavior”, then the muscle memory needed is
> ‘\ - <space>‘ rather than ‘\ <space>‘. Still feels odd for space to mean
> anything rather than nothing, though… I mean, space is empty, right? :)
Yeah. I checked the manual, and we have SPC being "any tag at all" since
the very beginning of the git history:
#+findex: org-agenda-filter-by-tag
Filter the agenda view with respect to a tag. You are prompted for
a tag selection letter; {{{kbd(SPC)}}} means any tag at all.
Upon seeing the manual, I am inclined to keep the current behaviour,
unless we have other voices supporting the change.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-08-16 17:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-12 4:49 [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)] John Wiegley
2023-06-12 10:10 ` [POLL] " Ihor Radchenko
2023-06-12 19:48 ` John Wiegley
2023-06-13 9:52 ` Ihor Radchenko
2023-06-14 5:22 ` John Wiegley
2023-06-14 18:00 ` John Wiegley
2023-06-15 10:12 ` Ihor Radchenko
2023-08-16 12:06 ` Ihor Radchenko
2023-08-16 17:11 ` John Wiegley
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.