Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* How to search for ticked articles
@ 2023-10-20  9:02 Julien Cubizolles
  2023-10-20 14:46 ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Cubizolles @ 2023-10-20  9:02 UTC (permalink / raw)
  To: info-gnus-english

I used to use the "mark:flag" search query to look for ticked articles
with gnus-search. I recently noticed that it doesn't return any articles
anymore in groups with ticked articles.

What exactly does the "flag" mark represent, and is there a better way
to look for dormant or ticked articles ?

-- 
Julien Cubizolles



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

* Re: How to search for ticked articles
  2023-10-20  9:02 How to search for ticked articles Julien Cubizolles
@ 2023-10-20 14:46 ` Eric Abrahamsen
  2023-10-21 14:25   ` Julien Cubizolles
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2023-10-20 14:46 UTC (permalink / raw)
  To: info-gnus-english

Julien Cubizolles <j.cubizolles@free.fr> writes:

> I used to use the "mark:flag" search query to look for ticked articles
> with gnus-search. I recently noticed that it doesn't return any articles
> anymore in groups with ticked articles.
>
> What exactly does the "flag" mark represent, and is there a better way
> to look for dormant or ticked articles ?

These things are all search-engine dependent. Notmuch will turn
"mark:flag" into "tag:flag", and IMAP will turn it into "FLAGGED".

What search engine are you using in this case? The first thing to try
is always shutting off search parsing (either fully, by setting
`gnus-search-use-parsed-queries' to nil, or temporarily, using the
prefix argument). Then get the search working using the search engine's
native syntax. Then come back here and tell me how it went :)



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

* Re: How to search for ticked articles
  2023-10-20 14:46 ` Eric Abrahamsen
@ 2023-10-21 14:25   ` Julien Cubizolles
  2023-10-21 19:03     ` Eric Abrahamsen
  2023-10-22 14:32     ` Julien Cubizolles
  0 siblings, 2 replies; 7+ messages in thread
From: Julien Cubizolles @ 2023-10-21 14:25 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>> I used to use the "mark:flag" search query to look for ticked articles
>> with gnus-search. I recently noticed that it doesn't return any articles
>> anymore in groups with ticked articles.
>>
>> What exactly does the "flag" mark represent, and is there a better way
>> to look for dormant or ticked articles ?
>
> These things are all search-engine dependent. Notmuch will turn
> "mark:flag" into "tag:flag", and IMAP will turn it into "FLAGGED".
>
> What search engine are you using in this case? The first thing to try
> is always shutting off search parsing (either fully, by setting
> `gnus-search-use-parsed-queries' to nil, or temporarily, using the
> prefix argument). Then get the search working using the search engine's
> native syntax. Then come back here and tell me how it went :)

I'm using the imap search engine. When I shut off search parsing,
the "FLAGGED" search query does indeed return the ticked articles, when
"mark:flag" didn't. But I tried again (with search parsing on) with the
query "mark:flagged" and it works ! 

-- 
Julien Cubizolles



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

* Re: How to search for ticked articles
  2023-10-21 14:25   ` Julien Cubizolles
@ 2023-10-21 19:03     ` Eric Abrahamsen
  2023-10-22 14:32     ` Julien Cubizolles
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2023-10-21 19:03 UTC (permalink / raw)
  To: info-gnus-english

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Julien Cubizolles <j.cubizolles@free.fr> writes:
>>
>>> I used to use the "mark:flag" search query to look for ticked articles
>>> with gnus-search. I recently noticed that it doesn't return any articles
>>> anymore in groups with ticked articles.
>>>
>>> What exactly does the "flag" mark represent, and is there a better way
>>> to look for dormant or ticked articles ?
>>
>> These things are all search-engine dependent. Notmuch will turn
>> "mark:flag" into "tag:flag", and IMAP will turn it into "FLAGGED".
>>
>> What search engine are you using in this case? The first thing to try
>> is always shutting off search parsing (either fully, by setting
>> `gnus-search-use-parsed-queries' to nil, or temporarily, using the
>> prefix argument). Then get the search working using the search engine's
>> native syntax. Then come back here and tell me how it went :)
>
> I'm using the imap search engine. When I shut off search parsing,
> the "FLAGGED" search query does indeed return the ticked articles, when
> "mark:flag" didn't. But I tried again (with search parsing on) with the
> query "mark:flagged" and it works ! 

Hmm, that doesn't seem right; you can see that both "mark:flag" and
"mark:flagged" get transformed into the same IMAP search term, namely
"FLAGGED".

(let ((srv (make-instance 'gnus-search-imap))
      (flag (gnus-search-parse-query "mark:flagged"))
      (flagged (gnus-search-parse-query "mark:flag")))
  (format
   "%s == %s"
   (gnus-search-transform srv flag)
   (gnus-search-transform srv flagged))) => "FLAGGED == FLAGGED"

I just tried it with an IMAP server, and all of "mark:flag",
"mark:flagged", and "mark:!" were transformed into "FLAGGED" and
produced the right search results.

If you have a moment, you could try edebugging the
`gnus-search-imap-search-command' function, and seeing what's happening
there. The QUERY parameter should already be "FLAGGED" at that point.

Thanks,
Eric



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

* Re: How to search for ticked articles
  2023-10-21 14:25   ` Julien Cubizolles
  2023-10-21 19:03     ` Eric Abrahamsen
@ 2023-10-22 14:32     ` Julien Cubizolles
  2023-10-23 14:19       ` Eric Abrahamsen
  1 sibling, 1 reply; 7+ messages in thread
From: Julien Cubizolles @ 2023-10-22 14:32 UTC (permalink / raw)
  To: info-gnus-english

Julien Cubizolles <j.cubizolles@free.fr> writes:


> I'm using the imap search engine. When I shut off search parsing,
> the "FLAGGED" search query does indeed return the ticked articles, when
> "mark:flag" didn't. But I tried again (with search parsing on) with the
> query "mark:flagged" and it works ! 

Actually, I was wrong, I'm using notmuch to search a maildir group. The
results, with gnus-search-use-parsed-queries turned off, are :

No results with :
mark:flag
tag:flag
flagged

Success with :
mark:flagged
tag:flagged
FLAGGED

-- 
Julien Cubizolles



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

* Re: How to search for ticked articles
  2023-10-22 14:32     ` Julien Cubizolles
@ 2023-10-23 14:19       ` Eric Abrahamsen
  2023-10-24  8:05         ` Julien Cubizolles
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2023-10-23 14:19 UTC (permalink / raw)
  To: info-gnus-english

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>
>> I'm using the imap search engine. When I shut off search parsing,
>> the "FLAGGED" search query does indeed return the ticked articles, when
>> "mark:flag" didn't. But I tried again (with search parsing on) with the
>> query "mark:flagged" and it works ! 
>
> Actually, I was wrong, I'm using notmuch to search a maildir group. The
> results, with gnus-search-use-parsed-queries turned off, are :
>
> No results with :
> mark:flag
> tag:flag
> flagged
>
> Success with :
> mark:flagged
> tag:flagged
> FLAGGED

Is this a maildir that used to be managed by IMAP (like Dovecot)? I
can't believe that notmuch uses a "FLAGGED" notation on its own. Nor
does it use a "mark" search term. Are you sure it isn't just finding
messages with "mark:flagged" in them?



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

* Re: How to search for ticked articles
  2023-10-23 14:19       ` Eric Abrahamsen
@ 2023-10-24  8:05         ` Julien Cubizolles
  0 siblings, 0 replies; 7+ messages in thread
From: Julien Cubizolles @ 2023-10-24  8:05 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:


>> No results with :
>> mark:flag
>> tag:flag
>> flagged
>>
>> Success with :
>> mark:flagged
>> tag:flagged
>> FLAGGED
>

> Are you sure it isn't just finding messages with "mark:flagged" in
> them?

I tried with a random message that I ticked for this test. It was found
only when it was ticked.

Anyway, with gnus-search-use-parsed-queries switched on, the search
query mark:flagged works when mark:flag doesn't. That is not what the
search queries documentation states.

-- 
Julien Cubizolles



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

end of thread, other threads:[~2023-10-24  8:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20  9:02 How to search for ticked articles Julien Cubizolles
2023-10-20 14:46 ` Eric Abrahamsen
2023-10-21 14:25   ` Julien Cubizolles
2023-10-21 19:03     ` Eric Abrahamsen
2023-10-22 14:32     ` Julien Cubizolles
2023-10-23 14:19       ` Eric Abrahamsen
2023-10-24  8:05         ` Julien Cubizolles

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 NNTP newsgroup(s).