Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: ding@gnus.org
Subject: Re: emacs 28 search not working with nnml
Date: Wed, 23 Jun 2021 14:51:15 +0100	[thread overview]
Message-ID: <87mtrgd6zw.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87bl7wzqpf.fsf@ku.dk>

On Wednesday, 23 Jun 2021 at 14:54, Thomas Alexander Gerds wrote:
> I am using nnml and have all my email downloaded to my laptop using

I have a similar configuration.  My settings look like this:

#+begin_src emacs-lisp
  (setq gnus-secondary-select-methods
        '((nnml "work"
                (gnus-search-engine gnus-search-notmuch
                                    (remove-prefix "/HOME/Mail")
                                    (config-file "/HOME/.notmuch-config")
                                    )
                (get-new-mail t))))

  (add-to-list 'gnus-search-default-engines '(nnml . notmuch))
  (setq gnus-search-notmuch-remove-prefix "/HOME/Mail")
  (with-eval-after-load "gnus-search"
    (cl-defmethod gnus-search-indexed-parse-output :around
      ((e gnus-search-notmuch) s q groups)
      (let ((gs (mapcar (lambda (g) (replace-regexp-in-string "\\." "/" g))
                        groups)))
        (cl-call-next-method e s q gs))))
#+end_src

where HOME in various places above should be replaced by your home
directory.  I have gnus splitting email into various sub-directories of
Mail/.

The last bit was suggested by Jose A. Ortega Ruiz on the gnus newsgroup
[1] sometime in late 2020 and proved to be necessary (at that time) to
get the new search engine to work with nnml.  It basically changes the
file paths from . to / separators.



Footnotes:
[1]  gnus:nntp+news.gwene.org:gmane.emacs.gnus.general#87pn4hc97h.fsf@gnus.jao.io

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.6 on Debian bullseye/sid



  reply	other threads:[~2021-06-23 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 12:54 Thomas Alexander Gerds
2021-06-23 13:51 ` Eric S Fraga [this message]
2021-06-23 15:01   ` Eric Abrahamsen
2021-06-24  5:45     ` Thomas Alexander Gerds
2021-06-24 15:21       ` Eric Abrahamsen
2021-06-24 19:15         ` Thomas Alexander Gerds
2021-06-26  3:48           ` Eric Abrahamsen
2021-06-24 10:01     ` Eric S Fraga

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

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

  git send-email \
    --in-reply-to=87mtrgd6zw.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).