From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 49E896DE0C19 for ; Thu, 26 Oct 2017 14:28:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.033 X-Spam-Level: X-Spam-Status: No, score=-0.033 tagged_above=-999 required=5 tests=[AWL=-0.033] 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 VVRpoC43k8w0 for ; Thu, 26 Oct 2017 14:28:24 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id DCB6A6DE01EA for ; Thu, 26 Oct 2017 14:28:23 -0700 (PDT) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id DAD7CF99A for ; Thu, 26 Oct 2017 17:28:23 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 00E60201D2; Thu, 26 Oct 2017 17:27:51 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH] cli/help: give a hint about notmuch-emacs-mua Date: Thu, 26 Oct 2017 17:27:51 -0400 Message-Id: <20171026212751.4459-1-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.14.2 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 26 Oct 2017 21:28:25 -0000 "notmuch help" doesn't mention "notmuch-emacs-mua" even though we support it through the try_external_command() mechanism. In addition, "notmuch help emacs-mua" doesn't work, even though we ship the appropriate manpage. This changeset fixes both of these problems. --- notmuch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notmuch.c b/notmuch.c index efbe32ff..8eab561b 100644 --- a/notmuch.c +++ b/notmuch.c @@ -172,6 +172,8 @@ static command_t commands[] = { "Re-index all messages matching the search terms." }, { "config", notmuch_config_command, NOTMUCH_CONFIG_OPEN, "Get or set settings in the notmuch configuration file." }, + { "emacs-mua", NULL, 0, + "send mail with notmuch and emacs." }, { "help", notmuch_help_command, NOTMUCH_CONFIG_CREATE, /* create but don't save config */ "This message, or more detailed help for the named command." } }; @@ -487,7 +489,8 @@ main (int argc, char *argv[]) notmuch_process_shared_options (command_name); command = find_command (command_name); - if (!command) { + /* if command->function is NULL, try external command */ + if (!command || !command->function) { /* This won't return if the external command is found. */ if (try_external_command(argv + opt_index)) fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n", -- 2.14.2