emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* The meaning of / inverted in the agenda
@ 2023-04-25 20:28 John Wiegley
  2023-04-25 21:05 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: John Wiegley @ 2023-04-25 20:28 UTC (permalink / raw)
  To: emacs-orgmode

In previous version of Org-mode, I was used to "/ t" showing me only entries
that matched the tag keyed by 't'. Now it hides them instead. I was able to
fix this using:

modified   lisp/org-agenda.el
@@ -8578,7 +8578,7 @@ also press `-' or `+' to switch between filtering and excluding."
       (org-agenda-filter-show-all-tag)
       (setq tag (car a))
       (setq org-agenda-tag-filter
-	    (cons (concat (if exclude "-" "+") tag)
+	    (cons (concat (if exclude "+" "-") tag)
                  (if accumulate current nil)))
       (org-agenda-filter-apply org-agenda-tag-filter 'tag expand))
      (t (error "Invalid tag selection character %c" char)))))

The documentation for '/' says that "Keep only those lines in the agenda
buffer that have a specific tag.", so I'm pretty sure the current behavior is
a bug?

--
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2


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

* Re: The meaning of / inverted in the agenda
  2023-04-25 20:28 The meaning of / inverted in the agenda John Wiegley
@ 2023-04-25 21:05 ` Ihor Radchenko
  2023-04-25 21:34   ` John Wiegley
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-04-25 21:05 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode

"John Wiegley" <johnw@gnu.org> writes:

> In previous version of Org-mode, I was used to "/ t" showing me only entries
> that matched the tag keyed by 't'. Now it hides them instead.

May you please provide a reproducer or at least more details?

> I was able to
> fix this using:
>
> modified   lisp/org-agenda.el
> @@ -8578,7 +8578,7 @@ also press `-' or `+' to switch between filtering and excluding."
>        (org-agenda-filter-show-all-tag)
>        (setq tag (car a))
>        (setq org-agenda-tag-filter
> -	    (cons (concat (if exclude "-" "+") tag)
> +	    (cons (concat (if exclude "+" "-") tag)

which is fishy because "+" for "exclude" does not look right.

-- 
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] 6+ messages in thread

* Re: The meaning of / inverted in the agenda
  2023-04-25 21:05 ` Ihor Radchenko
@ 2023-04-25 21:34   ` John Wiegley
  2023-04-25 21:47     ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: John Wiegley @ 2023-04-25 21:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

>>>>> Ihor Radchenko <yantar92@posteo.net> writes:

> "John Wiegley" <johnw@gnu.org> writes:
>> In previous version of Org-mode, I was used to "/ t" showing me only
>> entries that matched the tag keyed by 't'. Now it hides them instead.

> May you please provide a reproducer or at least more details?

- Enter the Org-agenda
- Press '/ t' to filter by the tag identified by 't'
- Note that it hides those tags, rather than showing only those tags

> which is fishy because "+" for "exclude" does not look right.

My thoughts too.

--
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2


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

* Re: The meaning of / inverted in the agenda
  2023-04-25 21:34   ` John Wiegley
@ 2023-04-25 21:47     ` Ihor Radchenko
  2023-04-25 22:29       ` John Wiegley
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-04-25 21:47 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode


John Wiegley <johnw@gnu.org> writes:
>> May you please provide a reproducer or at least more details?
>
> - Enter the Org-agenda
> - Press '/ t' to filter by the tag identified by 't'
> - Note that it hides those tags, rather than showing only those tags

I just tried

1. emacs -Q
2. C-x C-f /tmp/1.org <RET>
3.

* TODO This                                                             :t:
* TODO Another one                                                     :t2:

4. M-x org-agenda <RET> < t
5. Observe two todo items displayed
6. / t <RET>
7. Observe "This" item matching "t" tag displayed.

What am I missing?

-- 
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] 6+ messages in thread

* Re: The meaning of / inverted in the agenda
  2023-04-25 21:47     ` Ihor Radchenko
@ 2023-04-25 22:29       ` John Wiegley
  2023-04-26 11:50         ` Esteban Ordóñez
  0 siblings, 1 reply; 6+ messages in thread
From: John Wiegley @ 2023-04-25 22:29 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

>>>>> Ihor Radchenko <yantar92@posteo.net> writes:

> What am I missing?

My apologies, I really don't know what errant behavior had crept into my
configuration, but even now as I tried the steps, I saw that it had flipped
again, making the "fix" I proposed entirely incorrect, as you surmised. This
is really quite strange, I'm not even sure how my configuration had led to an
inversion of the tag filtering behavior.

Anyway, I reverted that change and now all things are working fine. Sorry
again for the noise.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2


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

* Re: The meaning of / inverted in the agenda
  2023-04-25 22:29       ` John Wiegley
@ 2023-04-26 11:50         ` Esteban Ordóñez
  0 siblings, 0 replies; 6+ messages in thread
From: Esteban Ordóñez @ 2023-04-26 11:50 UTC (permalink / raw)
  To: emacs-orgmode

I liked this exercise because it taught me very simply how to use
org-agenda!  Thank you both.  :-)


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

end of thread, other threads:[~2023-04-26 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 20:28 The meaning of / inverted in the agenda John Wiegley
2023-04-25 21:05 ` Ihor Radchenko
2023-04-25 21:34   ` John Wiegley
2023-04-25 21:47     ` Ihor Radchenko
2023-04-25 22:29       ` John Wiegley
2023-04-26 11:50         ` Esteban Ordóñez

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