unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jose A. Ortega Ruiz" <mail@jao.io>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: 44509@debbugs.gnu.org
Subject: bug#44509: 28.0.50; Error querying with new gnus-search and notmuch
Date: Sun, 08 Nov 2020 07:09:52 +0000	[thread overview]
Message-ID: <87blg8729u.fsf@gnus.jao.io> (raw)
In-Reply-To: <874km0bgat.fsf@ericabrahamsen.net>

On Sat, Nov 07 2020, Eric Abrahamsen wrote:

> It's something that's come up on gnus.general several times over the
> years, but I think no one's ever sat down and tried to figure out
> exactly how/if it's supposed to work. Thinking about it logically, I
> just don't see how it could. On my filesystem (in the maildir maintained
> by Dovecot), your message has the filename:
>
> 1604808232.M340024P65055.slip,S=3293,W=3369:2,a
>
> And that's how notmuch will return it. If I search for the same message
> via Dovecot's internal search, the UUID is 1116. Is there anything to go
> from one to the other?

Not to my knowledge.  What you say makes sense and i must be
misremembering... i have a helper function that knows how to find in
gnus a message shown by notmuch, and i use that sometimes to search
using notmuch (counsel-notmuch, actually) while keeping gnus as my main
interface.

> In a few days I can try to set this up and see if there's a way to make
> it work.

That'd be really great.  I'm unfortunately not familiar with
nnir/search, or i'd would have dived a bit into it by now, but i'd be
happy to try and test whatever you come up with.

That said, it's possible to tell notmuch to return message ids instead
of filenames.  For instance, one of the results of the query

     notmuch search --format=sexp messages from:Eric to:jao

looks like:

      ((:thread "000000000002e056" :timestamp 1604811194 :date_relative
      "Today 04:53" :matched 2 :total 5 :authors "Eric Abrahamsen| Jose
      A. Ortega Ruiz, help-debbugs@gnu.org" :subject "bug#44509:
      28.0.50; Error querying with new gnus-search and notmuch" :query
      ("id:87361kd1sg.fsf@ericabrahamsen.net
      id:874km0bgat.fsf@ericabrahamsen.net"
      "id:87imag7kkh.fsf@gnus.jao.io
      id:handler.44509.B.160479992727359.ack@debbugs.gnu.org
      id:87v9eg7ec3.fsf@gnus.jao.io") :tags ("inbox" "replied"
      "unread"))

and those values for :query seem to be the ids of this thread.
notmuch-search.el has actually a function notmuch-query-get-message-ids
that directly returns them, and also this one:

  (defun notmuch-query-get-threads (search-terms)
    "Return a list of threads of messages matching SEARCH-TERMS.

where possibly that list contains info from both the path and message
id.

> (BTW have you turned on full text search in your local Dovecot? That
> makes imap searches "fast enough" for me, though I doubt they're as
> fast as notmuch.)

No... i once read that the fastest way was via xapian (if i'm recalling
correctly), but then i saw it's a java thing and lost steam :)

Another reason is that notmuch knows how to index usenet messages just
fine, and i use leafnode to fetch my news to a local server, so i can
play the trick of for instance symlinking leafnode's gwene/gmane message
folders in my ~/var/mail and have a single index for all my mail and
news.  The same function that brings me from notmuch message buffers to
gnus nnimap groups nows how to bring me to nntp groups to.

Cheers,
jao
--
I don't necessarily agree with everything I say.
 -Marshall McLuhan (1911-1980)






  reply	other threads:[~2020-11-08  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08  1:44 bug#44509: 28.0.50; Error querying with new gnus-search and notmuch Jose A. Ortega Ruiz
2020-11-08  2:23 ` Eric Abrahamsen
2020-11-08  2:49   ` Jose A. Ortega Ruiz
2020-11-08  4:53     ` Eric Abrahamsen
2020-11-08  7:09       ` Jose A. Ortega Ruiz [this message]
2020-11-11  5:10         ` Jose A. Ortega Ruiz
     [not found]           ` <uMxcF8JPFQWri9-dIaeTgjGDP3ACtDZ1GqktYJqUzsD2Yh3axLc8KfS50JxW0gyoZYNJsPwSC_j0rx-q8W9AVw==@protonmail.internalid>
2020-11-11 17:51           ` Eric Abrahamsen
2020-11-11 17:56             ` Eric Abrahamsen
2020-11-11 18:29             ` jao
2020-11-11 19:11               ` Eric Abrahamsen
2020-11-11 21:50                 ` jao
2020-11-12  0:29                   ` 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=87blg8729u.fsf@gnus.jao.io \
    --to=mail@jao.io \
    --cc=44509@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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).