emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: John Wiegley <johnw@gnu.org>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <871qihng8m.fsf@localhost> (raw)
In-Reply-To: <m2ilbts2rv.fsf@newartisans.com>

"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	other threads:[~2023-06-12 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-06-12 19:48   ` [POLL] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qihng8m.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=johnw@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).