add option to leave remove-prefix blank

This commit is contained in:
Jai Flack 2020-09-16 17:47:32 +10:00
parent ea43bd12e7
commit 267a247745
Signed by: jflack
GPG Key ID: 1337AEA30052317F
1 changed files with 9 additions and 1 deletions

View File

@ -51,7 +51,9 @@
in order to get a group name. Generally this should be set to
your path to your mail directory. This is a regular expression.
If it is `nil' then the maildir returned from mu will be used instead.
If it is `nil' then the maildir returned from mu will be used
instead. This can be an expensive process but works without any
configuration.
This is very similar to `nnir-notmuch-remove-prefix' and
`nnir-namazu-remove-prefix'."
@ -106,6 +108,12 @@ This is very similar to `nnir-notmuch-remove-prefix' and
(when (and (string-match article-pattern artno)
(not (null dirnam)))
(unless prefix
(setq prefix (string-trim-right filenam
(concat (regexp-quote
(plist-get objcons
:maildir))
".*"))))
(print (list dirnam artno "" prefix server artlist))
(nnir-add-result dirnam artno "" prefix server artlist))))