From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27831 invoked from network); 21 Oct 2023 19:03:40 -0000 Received: from lists.gnu.org (209.51.188.17) by inbox.vuxu.org with ESMTPUTF8; 21 Oct 2023 19:03:40 -0000 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quHFq-00022o-Vb; Sat, 21 Oct 2023 15:03:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quHFp-00022Z-0G for info-gnus-english@gnu.org; Sat, 21 Oct 2023 15:03:21 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quHFl-0003CS-5M for info-gnus-english@gnu.org; Sat, 21 Oct 2023 15:03:20 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1quHFi-0002YB-VK for info-gnus-english@gnu.org; Sat, 21 Oct 2023 21:03:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: info-gnus-english@gnu.org From: Eric Abrahamsen Subject: Re: How to search for ticked articles Date: Sat, 21 Oct 2023 12:03:04 -0700 Message-ID: <87edhn6bo7.fsf@ericabrahamsen.net> References: <8734y5is3h.fsf@free.fr> <878r7x8i7d.fsf@ericabrahamsen.net> <87il702gso.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:jNYkx7ESUvRMqQPpzgL0NPzqrVg= Received-SPF: pass client-ip=116.202.254.214; envelope-from=gegu-info-gnus-english@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Sender: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Julien Cubizolles writes: > Eric Abrahamsen writes: > >> Julien Cubizolles 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