[PATCH] cli/help: give a hint about notmuch-emacs-mua

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Oct 26 14:27:51 PDT 2017


"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



More information about the notmuch mailing list