From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#66885: 29.1; gnus search with mu always returns empty Date: Tue, 09 Jan 2024 13:29:27 -0800 Message-ID: <87wmsifb60.fsf@ericabrahamsen.net> References: <877cn19t93.fsf@ericabrahamsen.net> <87jzr18e5z.fsf@b3l.xyz> <871qd89rft.fsf@ericabrahamsen.net> <878r7egb4v.fsf@uwaterloo.ca> <87il6i8lbc.fsf@ericabrahamsen.net> <87ttpymuib.fsf@b3l.xyz> <87msvq6x8n.fsf@ericabrahamsen.net> <87il65g1uz.fsf@uwaterloo.ca> <87y1eto7a4.fsf@ericabrahamsen.net> <87h6jxepcn.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8455"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66885-done@debbugs.gnu.org To: Britt Anderson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 09 22:30:40 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rNJgG-00023I-DY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jan 2024 22:30:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNJfh-0006WI-7U; Tue, 09 Jan 2024 16:30:05 -0500 Original-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 1rNJfc-0006VB-Mn for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2024 16:30:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNJfY-00036s-4x for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2024 16:29:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNJfe-0002JO-Q9 for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2024 16:30:02 -0500 Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jan 2024 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 66885 X-GNU-PR-Package: emacs Mail-Followup-To: 66885@debbugs.gnu.org, eric@ericabrahamsen.net, britt@b3l.xyz Original-Received: via spool by 66885-done@debbugs.gnu.org id=D66885.17048357858833 (code D ref 66885); Tue, 09 Jan 2024 21:30:02 +0000 Original-Received: (at 66885-done) by debbugs.gnu.org; 9 Jan 2024 21:29:45 +0000 Original-Received: from localhost ([127.0.0.1]:41138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNJfM-0002IP-Jg for submit@debbugs.gnu.org; Tue, 09 Jan 2024 16:29:44 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:60498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNJfK-0002IB-8M for 66885-done@debbugs.gnu.org; Tue, 09 Jan 2024 16:29:43 -0500 Original-Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D230EFA0D9; Tue, 9 Jan 2024 21:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1704835769; bh=DdZQtKIkYMOALv6opo24T4DaB0rFkBbTISLiMHEKnt0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=s9eGxn2W6fydBCN5Jb9YW31o7BeiZwlHGr0lPoLp+r1VAd9kBWtaclG2+SbbkUgZu DcFqEbH+1DsPtM5BSRpAUspitpZhly2oBzfiTjtqzo8pnLIpUzJ9hRdSfqvAxFEwWF QLHG9txfqzGapchjP1GtIFQFgKzHMiLpo5Fda6qs= In-Reply-To: (Britt Anderson's message of "Fri, 5 Jan 2024 11:24:07 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277662 Archived-At: On 01/05/24 11:24 AM, Britt Anderson wrote: >>Hi Britt, I'm finally getting around to testing this. I set up mu with a >>local maildir, and so far I'm not able to reproduce the problem. I mark >>two maildir groups and search for unread messages with "mark:unread". >> >>The search arguments constructed by gnus-search look like: >> >>("find" "--nocolor" "--muhome=3D/home/eric/.cache/mu" "" "" "flag:unread" >>"and" "(" "maildir:/mails" "or" "maildir:/Welcome" ")" "--format=3Dplain" >>"--fields=3Dl") > > Thanks for getting back to me. I can get results with a similar > command on the command line, but the same search in gnus still > returns empty. My mail (for three different addresses) lives in > /home/britt/.local/mail with the unique part of the directory > hierarchy following the above. I edited my gnus.el to remove that > common part as the "remove prefix", but still returned empty. > > >>I'm not sure what else to try! Even if mu is returning results from >>other Gnus backends, that shouldn't cause a failure. Though mu has the >>"path:" key we can use with remove-prefix... >> >>The last things to try would be: setting `gnus-verbose' to 10, trying >>the search, and telling me what you find in *Message*, and... > > I tried this and only got: > > #+begin_verbatim > Doing mu query on (nnmaildir+b3l-archives:y2023)... > Group nnselect:nnselect-87zfxjahkq.fsf contains no messages This is really weird, after the "Doing mu query on" message, you should have either gotten a "Search engine returned N results" message, or an error buffer pop-up. With `gnus-verbose' at 10 I don't know how you'd get this particular message situation. > Quit > No other window to select > Quit > C-M-x is undefined > 10 (#o12, #xa, ?\C-j) > You can run the command =E2=80=98eval-expression=E2=80=99 with M-: > 10 (#o12, #xa, ?\C-j) > Mark set [2 times] > #+end_verbatim > > That "10" at the end is me evaluating gnus-verbose to verify it was set > to 10. The details of the mu command are not displayed.=20 > >> >>eval'ing this version of the mu command method, that includes the >>"path:" key. Does this fix the problem? >> >>(cl-defmethod gnus-search-indexed-search-command ((engine gnus-search-mu) >> (qstring string) >> query &optional groups) >> (let ((limit (alist-get 'limit query)) >> (thread (alist-get 'thread query))) >> (with-slots (switches config-directory remove-prefix) engine >> `("find" ; command must come first >> "--nocolor" ; mu will always give colored output otherwise >> ,(format "--muhome=3D%s" config-directory) >> ,@switches >> ,(if thread "-r" "") >> ,(if limit (format "--maxnum=3D%d" limit) "") >> ,qstring >> ,@(if groups >> `("and" "(" >> ,@(nbutlast (mapcan (lambda (x) >> (list (concat "maildir:/" x) "or")) >> groups)) >> ")") >> "") >> ,(format "path:%s" (file-name-as-directory >> (expand-file-name remove-prefix "/"))) >> "--format=3Dplain" >> "--fields=3Dl")))) > > I did try this with no change.=20 > > I think you have given it the hero's try. Since it works for you and > not for me I assume it is a problem on my side, and given the limited > number of users it is probably not worth more of your time at this > point. Thanks for all your efforts. Gnus is great and I don't want you > to have to spend too much time on this.=20 Okay, I'm closing the bug report for now, but I really would like gnus-search to be as robust as possible. If anything more jumps out at you, or there are any other further developments, please let me know! Yours, Eric