GNU bug report logs - #47096
28.0.50; gnus-search notmuch can't find files when using nnimap

Previous Next

Package: emacs;

Reported by: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>

Date: Fri, 12 Mar 2021 10:50:02 UTC

Severity: normal

Tags: wontfix

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47096 in the body.
You can then email your comments to 47096 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Fri, 12 Mar 2021 10:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kevin Brubeck Unhammer <unhammer <at> fsfe.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Mar 2021 10:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; gnus-search notmuch can't find files when using nnimap
Date: Fri, 12 Mar 2021 11:49:14 +0100
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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Sat, 13 Mar 2021 23:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 47096 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>
Cc: 47096 <at> debbugs.gnu.org
Subject: Re: bug#47096: 28.0.50; gnus-search notmuch can't find files when
 using nnimap
Date: Sat, 13 Mar 2021 15:02:10 -0800
Kevin Brubeck Unhammer <unhammer <at> fsfe.org> writes:

> 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:

Thanks for the report. Just to be clear, is this something that used to
work before gnus-search landed, and now doesn't? My understanding is
that this part of the code hasn't changed, and this wouldn't have ever
worked, but I'd very much like to know if that's not true.

Basically, there is an ugly bit of heuristics when looking at search
results, and guessing how to handle them. As you've noticed, if the file
name looks like a maildir message, the search code will assume there's
an nnmaildir server involved, and try to find it.

There should be a dedicated method in place to handle a single search
result, which is able to take both the server and the search engine into
account. I've been gnawing on what that might look like, but haven't
implemented it yet.

Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Sun, 14 Mar 2021 08:45:01 GMT) Full text and rfc822 format available.

Message #11 received at 47096 <at> debbugs.gnu.org (full text, mbox):

From: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 47096 <at> debbugs.gnu.org
Subject: Re: bug#47096: 28.0.50; gnus-search notmuch can't find files when
 using nnimap
Date: Sun, 14 Mar 2021 09:44:32 +0100
[Message part 1 (text/plain, inline)]
Eric Abrahamsen <eric <at> ericabrahamsen.net> čálii:

> Just to be clear, is this something that used to
> work before gnus-search landed, and now doesn't? My understanding is
> that this part of the code hasn't changed, and this wouldn't have ever
> worked, but I'd very much like to know if that's not true.

I only just tried it now, so I don't know if it worked before.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Sun, 14 Mar 2021 17:18:01 GMT) Full text and rfc822 format available.

Message #14 received at 47096 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>
Cc: 47096 <at> debbugs.gnu.org
Subject: Re: bug#47096: 28.0.50; gnus-search notmuch can't find files when
 using nnimap
Date: Sun, 14 Mar 2021 10:17:16 -0700
Kevin Brubeck Unhammer <unhammer <at> fsfe.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> čálii:
>
>> Just to be clear, is this something that used to
>> work before gnus-search landed, and now doesn't? My understanding is
>> that this part of the code hasn't changed, and this wouldn't have ever
>> worked, but I'd very much like to know if that's not true.
>
> I only just tried it now, so I don't know if it worked before.

Okay, no, I don't think this is something that works, nor would it
without some effort. I think it might also just be faster to let your
imap server do the searching itself, if you turn full-text indexing on.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Fri, 24 Jun 2022 12:48:01 GMT) Full text and rfc822 format available.

Message #17 received at 47096 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>, 47096 <at> debbugs.gnu.org
Subject: Re: bug#47096: 28.0.50; gnus-search notmuch can't find files when
 using nnimap
Date: Fri, 24 Jun 2022 14:46:58 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Okay, no, I don't think this is something that works, nor would it
> without some effort. I think it might also just be faster to let your
> imap server do the searching itself, if you turn full-text indexing on.

If I understand things correctly, this is something that we're not going
to implement?  So I'm closing this bug report; if I misunderstood,
please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 24 Jun 2022 12:48:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 47096 <at> debbugs.gnu.org and Kevin Brubeck Unhammer <unhammer <at> fsfe.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 24 Jun 2022 12:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47096; Package emacs. (Fri, 24 Jun 2022 17:18:01 GMT) Full text and rfc822 format available.

Message #24 received at 47096 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>, 47096 <at> debbugs.gnu.org
Subject: Re: bug#47096: 28.0.50; gnus-search notmuch can't find files when
 using nnimap
Date: Fri, 24 Jun 2022 10:16:46 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Okay, no, I don't think this is something that works, nor would it
>> without some effort. I think it might also just be faster to let your
>> imap server do the searching itself, if you turn full-text indexing on.
>
> If I understand things correctly, this is something that we're not going
> to implement?  So I'm closing this bug report; if I misunderstood,
> please respond to the debbugs address and we'll reopen.

No, I don't think this is something we'd expect to implement. IMAP and
notmuch are just two separate systems.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Jul 2022 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.