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