From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#34940: [PATCH 1/1] lisp/gnus/nnir.el: prefer $MAILDIR over $HOME/Mail as notmuch prefix Date: Sat, 01 Jun 2019 20:45:00 +0200 Message-ID: <87a7f1m9g3.fsf@igel.home> References: <20190321204917.14611-1-philip@warpmail.net> <87a7f3t7tp.fsf@bulbul> <87r28d6uuy.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="226129"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: "Philip K." , 34940@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 01 20:46:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hX918-000wiY-Qt for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Jun 2019 20:46:10 +0200 Original-Received: from localhost ([127.0.0.1]:40113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hX917-0001gJ-PW for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Jun 2019 14:46:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hX911-0001fL-SY for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2019 14:46:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hX910-0005yf-Jf for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2019 14:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53345) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hX910-0005yL-7u for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2019 14:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hX910-0008VE-3a for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2019 14:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jun 2019 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 34940-submit@debbugs.gnu.org id=B34940.155941470632613 (code B ref 34940); Sat, 01 Jun 2019 18:46:02 +0000 Original-Received: (at 34940) by debbugs.gnu.org; 1 Jun 2019 18:45:06 +0000 Original-Received: from localhost ([127.0.0.1]:38655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hX905-0008Tx-QA for submit@debbugs.gnu.org; Sat, 01 Jun 2019 14:45:06 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:40296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hX903-0008Tk-US for 34940@debbugs.gnu.org; Sat, 01 Jun 2019 14:45:05 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45GVcG0G72z1rBNc; Sat, 1 Jun 2019 20:45:01 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45GVcF5WyFz1qqkR; Sat, 1 Jun 2019 20:45:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id L8TWw18LFd8Z; Sat, 1 Jun 2019 20:45:00 +0200 (CEST) X-Auth-Info: +kZUItlU4wgzOpDJg9u7hn68fO9VOC3ixBdQ4G49/xeOR1wfup6EFeVa3m5DXZKd Original-Received: from igel.home (ppp-46-244-160-142.dynamic.mnet-online.de [46.244.160.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 1 Jun 2019 20:45:00 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id 3662F2C111F; Sat, 1 Jun 2019 20:45:00 +0200 (CEST) X-Yow: I'm wearing PAMPERS!! In-Reply-To: <87r28d6uuy.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 01 Jun 2019 19:09:09 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160010 Archived-At: On Jun 01 2019, "Basil L. Contovounesios" wrote: >> From 09de2282a0c9dc2e74c61d2dc1b5b2abf64319bf Mon Sep 17 00:00:00 2001 >> From: Philip K >> 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@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."