From 267a247745e4d32cb8fe6483d1462b8e814d730d Mon Sep 17 00:00:00 2001 From: Jai Flack Date: Wed, 16 Sep 2020 17:47:32 +1000 Subject: [PATCH] add option to leave remove-prefix blank --- nnir-mu.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nnir-mu.el b/nnir-mu.el index 5508a84..f89c872 100644 --- a/nnir-mu.el +++ b/nnir-mu.el @@ -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))))