Julien Cubizolles <j.cubizol...@free.fr> writes: > Eric Abrahamsen <e...@ericabrahamsen.net> writes: > >> Julien Cubizolles <j.cubizol...@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