[PATCH] emacs: Modify notmuch-show-get-message-id to return message-id unprefixed with "id:".
Tomi Ollila
tomi.ollila at iki.fi
Thu Oct 27 06:52:19 PDT 2011
On Thu 27 Oct 2011 05:52, Jameson Graef Rollins <jrollins at finestructure.net> writes:
> On Tue, 11 Oct 2011 01:46:43 +0200, Thomas Schwinge
> <thomas at schwinge.name> wrote:
>> On Sun, 9 Oct 2011 15:35:48 -0700, Jameson Graef Rollins
>> <jrollins at finestructure.net> wrote:
>> > (defun notmuch-show-get-message-id ()
>> > "Return the message id of the current message."
>> > - (concat "id:\"" (notmuch-show-get-prop :id) "\""))
>> > + (concat "\"" (notmuch-show-get-prop :id) "\""))
>>
>> Shouldn't the double quotes be removed here, too? (And be re-added in
>> the other places where id: is added.)
>
> In point of fact, do we need these quotes around message IDs at all?
> Can message IDs have characters that would need to be escaped for the
> shell?
Is there intermediate shell run when emacs run these commands, if not,
then shell expansion isn't happen. If there is, then the "simplest" way
to avoid shell expansion is to put strings in '' -quotes and replace
all intermediate ':s with '\'' (meaning single ' expands to ''\''' ;)
>
> This seems to also be related to the issue brought up by Erlend Simonsen
> in [0], where emacs 24 seems to be shell-quoting things as needed.
>
> So maybe these quotes aren't actually needed at all?...
These quotes are needed if emacs uses intermediate shell and emacs
doesn't quote itself. if there is functionality change between emacs
23 and emacs 24 here, then that's interesting.
>
> jamie.
>
Tomi
More information about the notmuch
mailing list