emacs-orgmode
[Top][All Lists]
Advanced

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

[POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76


From: Ihor Radchenko
Subject: [POLL] [BUG] Inverse behavior from \ <space> [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]
Date: Mon, 12 Jun 2023 10:10:17 +0000

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



reply via email to

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