* [PATCH] cli/help: give a hint about notmuch-emacs-mua
@ 2017-10-26 21:27 Daniel Kahn Gillmor
2017-11-30 5:55 ` Daniel Kahn Gillmor
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-10-26 21:27 UTC (permalink / raw)
To: Notmuch Mail
"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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-10-26 21:27 [PATCH] cli/help: give a hint about notmuch-emacs-mua Daniel Kahn Gillmor
@ 2017-11-30 5:55 ` Daniel Kahn Gillmor
2017-11-30 9:08 ` Tomi Ollila
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-11-30 5:55 UTC (permalink / raw)
To: Notmuch Mail
On Thu 2017-10-26 18:27:51 -0400, Daniel Kahn Gillmor wrote:
> "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.
Ping! i don't think this patch is complex or objectionable. Can it be
merged?
--dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-11-30 5:55 ` Daniel Kahn Gillmor
@ 2017-11-30 9:08 ` Tomi Ollila
2017-11-30 14:13 ` Daniel Kahn Gillmor
0 siblings, 1 reply; 10+ messages in thread
From: Tomi Ollila @ 2017-11-30 9:08 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
> On Thu 2017-10-26 18:27:51 -0400, Daniel Kahn Gillmor wrote:
>> "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.
>
> Ping! i don't think this patch is complex or objectionable. Can it be
> merged?
it may (*) look like we don't have #if WITH_EMACS (**) cpp macros defined ???
Tomi
(*) did not check...
(**) this is emacs-specific stull, less generic that other hints (if that
matters) ...
Sorry to cause confusion...
>
> --dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-11-30 9:08 ` Tomi Ollila
@ 2017-11-30 14:13 ` Daniel Kahn Gillmor
2017-12-03 13:26 ` Tomi Ollila
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-11-30 14:13 UTC (permalink / raw)
To: Tomi Ollila, Notmuch Mail
On Thu 2017-11-30 11:08:05 +0200, Tomi Ollila wrote:
> On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
>
>> On Thu 2017-10-26 18:27:51 -0400, Daniel Kahn Gillmor wrote:
>>> "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.
>>
>> Ping! i don't think this patch is complex or objectionable. Can it be
>> merged?
>
> it may (*) look like we don't have #if WITH_EMACS (**) cpp macros defined ???
>
> Tomi
>
> (*) did not check...
>
> (**) this is emacs-specific stull, less generic that other hints (if that
> matters) ...
>
> Sorry to cause confusion...
confusion is right! i don't understand what you're saying, sorry. are
you suggesting a different change somehow? Want to propose a different patch?
--dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-11-30 14:13 ` Daniel Kahn Gillmor
@ 2017-12-03 13:26 ` Tomi Ollila
2017-12-04 15:44 ` Daniel Kahn Gillmor
2017-12-04 18:43 ` [PATCH v2] " Daniel Kahn Gillmor
0 siblings, 2 replies; 10+ messages in thread
From: Tomi Ollila @ 2017-12-03 13:26 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
> On Thu 2017-11-30 11:08:05 +0200, Tomi Ollila wrote:
>> On Thu, Nov 30 2017, Daniel Kahn Gillmor wrote:
>>
>>> On Thu 2017-10-26 18:27:51 -0400, Daniel Kahn Gillmor wrote:
>>>> "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.
>>>
>>> Ping! i don't think this patch is complex or objectionable. Can it be
>>> merged?
>>
>> it may (*) look like we don't have #if WITH_EMACS (**) cpp macros defined ???
>>
>> Tomi
>>
>> (*) did not check...
>>
>> (**) this is emacs-specific stull, less generic that other hints (if that
>> matters) ...
>>
>> Sorry to cause confusion...
>
> confusion is right! i don't understand what you're saying, sorry. are
> you suggesting a different change somehow? Want to propose a different
> patch?
My thought was that even though user may compile notmuch without emacs
support (and notmuch-emacs-mua not installed) we would be hinting
`notmuch emacs-mua` command to exist.
Tomi
>
> --dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-12-03 13:26 ` Tomi Ollila
@ 2017-12-04 15:44 ` Daniel Kahn Gillmor
2017-12-04 18:44 ` Daniel Kahn Gillmor
2017-12-04 18:43 ` [PATCH v2] " Daniel Kahn Gillmor
1 sibling, 1 reply; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-12-04 15:44 UTC (permalink / raw)
To: Tomi Ollila, Notmuch Mail
On Sun 2017-12-03 15:26:32 +0200, Tomi Ollila wrote:
> My thought was that even though user may compile notmuch without emacs
> support (and notmuch-emacs-mua not installed) we would be hinting
> `notmuch emacs-mua` command to exist.
Currently, if the user *does* compile with emacs support, and installs
it, we are hinting that "notmuch emacs-mua" *doesn't* exist.
Given that "notmuch emacs-mua" does exist somewhere (even if it's not in
the local installation), i prefer the error in the direction of
inclusion.
But maybe you'll find my revised version
(id:20171204154333.27505-1-dkg@fifthhorseman.net) mitigates the error
you're pointing out?
--dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] cli/help: give a hint about notmuch-emacs-mua
2017-12-03 13:26 ` Tomi Ollila
2017-12-04 15:44 ` Daniel Kahn Gillmor
@ 2017-12-04 18:43 ` Daniel Kahn Gillmor
2017-12-04 20:56 ` Tomi Ollila
2017-12-07 12:31 ` David Bremner
1 sibling, 2 replies; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-12-04 18:43 UTC (permalink / raw)
To: Notmuch Mail
"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.
---
configure | 1 +
notmuch.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index bd034f91..f1974520 100755
--- a/configure
+++ b/configure
@@ -1185,6 +1185,7 @@ COMMON_CONFIGURE_CFLAGS = \\
\$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\
-DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\
-DHAVE_GETLINE=\$(HAVE_GETLINE) \\
+ -DWITH_EMACS=\$(WITH_EMACS) \\
-DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\
-DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\
-DHAVE_STRSEP=\$(HAVE_STRSEP) \\
diff --git a/notmuch.c b/notmuch.c
index d5bf7902..2d193aa8 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -172,6 +172,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." }
};
@@ -487,7 +491,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.15.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] cli/help: give a hint about notmuch-emacs-mua
2017-12-04 15:44 ` Daniel Kahn Gillmor
@ 2017-12-04 18:44 ` Daniel Kahn Gillmor
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2017-12-04 18:44 UTC (permalink / raw)
To: Tomi Ollila, Notmuch Mail
On Mon 2017-12-04 10:44:40 -0500, Daniel Kahn Gillmor wrote:
> But maybe you'll find my revised version
> (id:20171204154333.27505-1-dkg@fifthhorseman.net) mitigates the error
> you're pointing out?
sorry, that should be id:20171204184310.17125-1-dkg@fifthhorseman.net --
the previous message-id was never sent.
--dkg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] cli/help: give a hint about notmuch-emacs-mua
2017-12-04 18:43 ` [PATCH v2] " Daniel Kahn Gillmor
@ 2017-12-04 20:56 ` Tomi Ollila
2017-12-07 12:31 ` David Bremner
1 sibling, 0 replies; 10+ messages in thread
From: Tomi Ollila @ 2017-12-04 20:56 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
On Mon, Dec 04 2017, Daniel Kahn Gillmor wrote:
> "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.
+1
Tomi
> ---
> configure | 1 +
> notmuch.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index bd034f91..f1974520 100755
> --- a/configure
> +++ b/configure
> @@ -1185,6 +1185,7 @@ COMMON_CONFIGURE_CFLAGS = \\
> \$(GMIME_CFLAGS) \$(TALLOC_CFLAGS) \$(ZLIB_CFLAGS) \\
> -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \$(VALGRIND_CFLAGS) \\
> -DHAVE_GETLINE=\$(HAVE_GETLINE) \\
> + -DWITH_EMACS=\$(WITH_EMACS) \\
> -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\
> -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\
> -DHAVE_STRSEP=\$(HAVE_STRSEP) \\
> diff --git a/notmuch.c b/notmuch.c
> index d5bf7902..2d193aa8 100644
> --- a/notmuch.c
> +++ b/notmuch.c
> @@ -172,6 +172,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." }
> };
> @@ -487,7 +491,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.15.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] cli/help: give a hint about notmuch-emacs-mua
2017-12-04 18:43 ` [PATCH v2] " Daniel Kahn Gillmor
2017-12-04 20:56 ` Tomi Ollila
@ 2017-12-07 12:31 ` David Bremner
1 sibling, 0 replies; 10+ messages in thread
From: David Bremner @ 2017-12-07 12:31 UTC (permalink / raw)
To: Daniel Kahn Gillmor, Notmuch Mail
Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
> "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.
pushed,
d
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-12-07 12:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 21:27 [PATCH] cli/help: give a hint about notmuch-emacs-mua Daniel Kahn Gillmor
2017-11-30 5:55 ` Daniel Kahn Gillmor
2017-11-30 9:08 ` Tomi Ollila
2017-11-30 14:13 ` Daniel Kahn Gillmor
2017-12-03 13:26 ` Tomi Ollila
2017-12-04 15:44 ` Daniel Kahn Gillmor
2017-12-04 18:44 ` Daniel Kahn Gillmor
2017-12-04 18:43 ` [PATCH v2] " Daniel Kahn Gillmor
2017-12-04 20:56 ` Tomi Ollila
2017-12-07 12:31 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).