X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;h=fa866d8645ee72ee00f7bc410a2a239e653f53f4;hp=539ac58c445a6e4dd222e987f3e255dde5aa4519;hb=de80ede3dfa88d50a3a4d34cedfcd71b8bde165b;hpb=5bdb8549f619bbcd9fcd6161749dabbb1710dab9 diff --git a/notmuch.c b/notmuch.c index 539ac58c..fa866d86 100644 --- a/notmuch.c +++ b/notmuch.c @@ -167,6 +167,10 @@ 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." }, +#if WITH_EMACS + { "emacs-mua", NULL, 0, + "send mail with notmuch and emacs." }, +#endif { "help", notmuch_help_command, NOTMUCH_CONFIG_CREATE, /* create but don't save config */ "This message, or more detailed help for the named command." } }; @@ -480,7 +484,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",