GNU bug report logs -
#34940
[PATCH 1/1] lisp/gnus/nnir.el: prefer $MAILDIR over $HOME/Mail as notmuch prefix
Previous Next
Reported by: Philip K <philip <at> warpmail.net>
Date: Thu, 21 Mar 2019 20:54:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 34940 <at> debbugs.gnu.org (full text, mbox):
On Jun 01 2019, "Basil L. Contovounesios" <contovob <at> tcd.ie> wrote:
>> From 09de2282a0c9dc2e74c61d2dc1b5b2abf64319bf Mon Sep 17 00:00:00 2001
>> From: Philip K <philip <at> warpmail.net>
>> Date: Fri, 31 May 2019 09:10:18 +0200
>> Subject: [PATCH] lisp/gnus/nnir.el: prefer $MAILDIR over $HOME/Mail as notmuch
>> prefix
>>
>> ---
>> lisp/gnus/nnir.el | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
>> index 9d59a4db0d..b07390ec81 100644
>> --- a/lisp/gnus/nnir.el
>> +++ b/lisp/gnus/nnir.el
>> @@ -507,7 +507,8 @@ Instead, use this:
>> :type '(repeat (string))
>> :group 'nnir)
>>
>> -(defcustom nnir-notmuch-remove-prefix (concat (getenv "HOME") "/Mail/")
>> +(defcustom nnir-notmuch-remove-prefix (concat (getenv "MAILDIR")
>> + (getenv "HOME") "/Mail/")
>
> Shouldn't this be:
>
> (or (getenv "MAILDIR")
> (concat (getenv "HOME") "/Mail/"))
>
> which BTW I think is better as:
>
> (or (getenv "MAILDIR")
> (expand-file-name "Mail/" (getenv "HOME")))
That needs to quote regexp meta characters, and (getenv "HOME") is "~".
(regexp-quote (or (getenv "MAILDIR") (expand-file-name "~/Mail)))
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
This bug report was last modified 5 years and 332 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.