unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Brubeck Unhammer <unhammer@fsfe.org>
To: 47096@debbugs.gnu.org
Subject: bug#47096: 28.0.50; gnus-search notmuch can't find files when using nnimap
Date: Fri, 12 Mar 2021 11:49:14 +0100	[thread overview]
Message-ID: <87sg507il1.fsf@trigram.no> (raw)

If I have a gnus backend for a local dovecot instance like

                          '(nnimap "mbsync"
                                         (nnimap-address "localhost")
                                         (gnus-search-engine notmuch
                                                             (config-file "/home/me/.notmuch-config")
                                                             (remove-prefix "/home/me/.Maildir/"))
                                         (nnimap-shell-program "MAIL=maildir:$HOME/.Maildir /usr/lib/dovecot/imap")
                                         (nnimap-stream shell))

then Gnus isn't able to translate the filenames returned from notmuch
(e.g. inbox/cur/1615384505.697011_1.laptop,U=5667)
into article numbers. It seems to look up using a function that assumes
you're using nnmaildir:

(if (string-match-p "\\`[[:digit:]]+\\'" article)
			(string-to-number article)
		      (nnmaildir-base-name-to-article-number
		       (substring article 0 (string-match ":" article))
		       group nil))

Here the string-match fails because the filename includes hostname and
U= parts, so we get sent to nnmaildir-base-name-to-article-number which
tries to look up current nnmaildir server which is nil and the end
result is that the computed article number is nil and we get no search
results.

I don't know what the correct way to do this is;
there's https://www.emacswiki.org/emacs/NotMuch#h5o-1 which goes via
message-id's, but maybe there's some better way.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2020-12-03 built on laptop
Repository revision: cf448f6bcc7ab3f8ea03bcb8868a67cf0b39d412
Repository branch: feature/native-comp-erc-network-symbol-harfbug2
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.04.2 LTS

Configured using:
 'configure --prefix=/home/me/PREFIX/emacs --with-libsystemd
 --with-pop=yes --with-sound=alsa --without-gconf --with-mailutils
 --with-json --with-cairo --with-nativecomp --with-x=yes
 --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES NATIVE_COMP
THREADS LIBSYSTEMD JSON PDUMPER LCMS2

Important settings:
  value of $LANG: nn_NO.UTF-8
  locale-coding-system: utf-8






             reply	other threads:[~2021-03-12 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 10:49 Kevin Brubeck Unhammer [this message]
2021-03-13 23:02 ` bug#47096: 28.0.50; gnus-search notmuch can't find files when using nnimap Eric Abrahamsen
2021-03-14  8:44   ` Kevin Brubeck Unhammer
2021-03-14 17:17     ` Eric Abrahamsen
2022-06-24 12:46       ` Lars Ingebrigtsen
2022-06-24 17:16         ` Eric Abrahamsen

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=87sg507il1.fsf@trigram.no \
    --to=unhammer@fsfe.org \
    --cc=47096@debbugs.gnu.org \
    /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).