[PĂ„TCH] notmuch-emacs-mua: set EMACS{,CLIENT} variables to defaults when empty
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 4 Oct 2015 18:59:42 +0000 (21:59 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:43 +0000 (14:49 -0700)
5d/8c0ef187bb063e68677c653c24ed98fbaf9e4a [new file with mode: 0644]

diff --git a/5d/8c0ef187bb063e68677c653c24ed98fbaf9e4a b/5d/8c0ef187bb063e68677c653c24ed98fbaf9e4a
new file mode 100644 (file)
index 0000000..5603493
--- /dev/null
@@ -0,0 +1,80 @@
+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 ED4C86DE158D\r
+ for <notmuch@notmuchmail.org>; Sun,  4 Oct 2015 11:59:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.174\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.174 tagged_above=-999 required=5 tests=[AWL=0.714, \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 0J5Gb679IR13 for <notmuch@notmuchmail.org>;\r
+ Sun,  4 Oct 2015 11:59:43 -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 1C8AE6DE13E2\r
+ for <notmuch@notmuchmail.org>; Sun,  4 Oct 2015 11:59:42 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 2813D100269; Sun,  4 Oct 2015 21:59:44 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: =?utf-8?q?=5BP=C3=84TCH=5D_notmuch-emacs-mua=3A_set_EMACS=7B=2CCLIENT=7D_variables_to_defaults_when_empty?=\r
+Date: Sun,  4 Oct 2015 21:59:42 +0300\r
+Message-Id: <1443985182-20048-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\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 18:59:46 -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