unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Britt Anderson <britt@b3l.xyz>
Cc: 66885-done@debbugs.gnu.org
Subject: bug#66885: 29.1; gnus search with mu always returns empty
Date: Tue, 09 Jan 2024 13:29:27 -0800	[thread overview]
Message-ID: <87wmsifb60.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <ZZgtJ8-cgJKEaE-D@joy> (Britt Anderson's message of "Fri, 5 Jan 2024 11:24:07 -0500")


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=/home/eric/.cache/mu" "" "" "flag:unread"
>>"and" "(" "maildir:/mails" "or" "maildir:/Welcome" ")" "--format=plain"
>>"--fields=l")
>
> 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 ‘eval-expression’ 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. 
>
>>
>>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=%s" config-directory)
>>	,@switches
>>	,(if thread "-r" "")
>>	,(if limit (format "--maxnum=%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=plain"
>>	"--fields=l"))))
>
> I did try this with no change. 
>
> 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. 

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





      parent reply	other threads:[~2024-01-09 21:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 15:01 bug#66885: 29.1; gnus search with mu always returns empty Britt Anderson
2023-11-01 19:19 ` Eric Abrahamsen
2023-11-01 19:28   ` Britt Anderson
2023-11-02 14:10     ` Eric Abrahamsen
2023-11-03 14:33       ` Britt Anderson
2023-11-03 23:32         ` Eric Abrahamsen
2023-11-06 21:33           ` Britt Anderson
2023-11-07  3:47             ` Eric Abrahamsen
2023-11-13 14:33               ` Britt Anderson
2023-11-19 19:46                 ` Eric Abrahamsen
2024-01-01  2:53                   ` Eric Abrahamsen
     [not found]                     ` <ZZgtJ8-cgJKEaE-D@joy>
2024-01-09 21:29                       ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmsifb60.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=66885-done@debbugs.gnu.org \
    --cc=britt@b3l.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).