mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 21:54:10 +01:00
notmuch.el: quote args in notmuch-show to facilitate remote use
Put single-quotes around the argument of the `show --entire-thread' command in notmuch-show. This change should have no effect on normal usage. However, it allows us to use the notmuch.el client with a remote notmuch binary and database over ssh (by, e.g., setting `notmuch-command' to a simple shell script). Without the quotes, ssh will not send the command properly. One very simple example script is as follows. (Note that it requires keypair login to the ssh server.) #!/bin/sh SSH_BIN="/path/to/local/ssh" NOTMUCH_HOST="my.remote.server" NOTMUCH_REMOTE_PATH="/path/to/remote/notmuch" $SSH_BIN $NOTMUCH_HOST $NOTMUCH_REMOTE_PATH $@
This commit is contained in:
parent
8fede71337
commit
9193455fa1
1 changed files with 4 additions and 2 deletions
|
@ -1006,8 +1006,10 @@ used."
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id))
|
(let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" "\'" thread-id))
|
||||||
(args (if query-context (append basic-args (list "and (" query-context ")")) basic-args)))
|
(args (if query-context
|
||||||
|
(append basic-args (list "and (" query-context ")\'"))
|
||||||
|
(append basic-args (list "\'")))))
|
||||||
(apply 'call-process args)
|
(apply 'call-process args)
|
||||||
(when (and (eq (buffer-size) 0) query-context)
|
(when (and (eq (buffer-size) 0) query-context)
|
||||||
(apply 'call-process basic-args)))
|
(apply 'call-process basic-args)))
|
||||||
|
|
Loading…
Reference in a new issue