[PATCH] notmuch-emacs-mua: set EMACS{, CLIENT} variables to defaults when empty
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 4 Oct 2015 13:47:36 +0000 (16:47 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:43 +0000 (14:49 -0700)
61/59113f0d65217e0293b0f9a77f78bba4264ea6 [new file with mode: 0644]

diff --git a/61/59113f0d65217e0293b0f9a77f78bba4264ea6 b/61/59113f0d65217e0293b0f9a77f78bba4264ea6
new file mode 100644 (file)
index 0000000..d64165c
--- /dev/null
@@ -0,0 +1,78 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id CFEF46DE0B26\r
+ for <notmuch@notmuchmail.org>; Sun,  4 Oct 2015 06:47:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.177\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.177 tagged_above=-999 required=5 tests=[AWL=0.717, \r
+ RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id SQj1TdyWrmz3 for <notmuch@notmuchmail.org>;\r
+ Sun,  4 Oct 2015 06:47:36 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 3E2846DE014A\r
+ for <notmuch@notmuchmail.org>; Sun,  4 Oct 2015 06:47:36 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 91BFB100269; Sun,  4 Oct 2015 16:47:37 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] notmuch-emacs-mua: set EMACS{,\r
+ CLIENT} variables to defaults when empty\r
+Date: Sun,  4 Oct 2015 16:47:36 +0300\r
+Message-Id: <1443966456-16562-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 04 Oct 2015 13:47:38 -0000\r
+\r
+... in addition to doing this when these variables are unset.\r
+\r
+It is more useful to use defaults (emacs or emacsclient) than empty\r
+string as a command name.\r
+---\r
+\r
+Without this:\r
+\r
+$ EMACS= ./notmuch-emacs-mua\r
+./notmuch-emacs-mua: line 150: exec: --: invalid option\r
+exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]\r
+zsh: exit 2     EMACS= ./notmuch-emacs-mua\r
+\r
+ notmuch-emacs-mua | 4 ++--\r
+ 1 file changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua\r
+index 016fa12613c4..4404cd7c33b8 100755\r
+--- a/notmuch-emacs-mua\r
++++ b/notmuch-emacs-mua\r
+@@ -30,8 +30,8 @@ escape ()\r
+     printf -v $2 '%s' "${__escape_arg__//\"/\\\"}"\r
+ }\r
\r
+-EMACS=${EMACS-emacs}\r
+-EMACSCLIENT=${EMACSCLIENT-emacsclient}\r
++EMACS=${EMACS:-emacs}\r
++EMACSCLIENT=${EMACSCLIENT:-emacsclient}\r
\r
+ PRINT_ONLY=\r
+ NO_WINDOW=\r
+-- \r
+2.0.0\r
+\r