all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#47096: 28.0.50; gnus-search notmuch can't find files when using nnimap
@ 2021-03-12 10:49 Kevin Brubeck Unhammer
  2021-03-13 23:02 ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Brubeck Unhammer @ 2021-03-12 10:49 UTC (permalink / raw)
  To: 47096

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-24 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-12 10:49 bug#47096: 28.0.50; gnus-search notmuch can't find files when using nnimap Kevin Brubeck Unhammer
2021-03-13 23:02 ` 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.