(nnir-notmuch-remove-prefix): Respect MAILDIR

* lisp/gnus/nnir.el (nnir-notmuch-remove-prefix): Respect MAILDIR
and regexp-quote the result (bug#34940).
This commit is contained in:
Andreas Schwab 2019-06-22 14:55:06 +02:00 committed by Lars Ingebrigtsen
parent 68d8872875
commit d038d31c37

View file

@ -507,14 +507,15 @@ Instead, use this:
:type '(repeat (string))
:group 'nnir)
(defcustom nnir-notmuch-remove-prefix (concat (getenv "HOME") "/Mail/")
(defcustom nnir-notmuch-remove-prefix
(regexp-quote (or (getenv "MAILDIR") (expand-file-name "~/Mail")))
"The prefix to remove from each file name returned by notmuch
in order to get a group name (albeit with / instead of .). This is a
regular expression.
This variable is very similar to `nnir-namazu-remove-prefix', except
that it is for notmuch, not Namazu."
:version "24.1"
:version "27.1"
:type '(regexp)
:group 'nnir)