notmuch.el: Quote arguments to protect from shell interpretation.

We want to allow the user to be able to use search expressions with
parentheses and semi-colons, etc. and we definitely don't want the
shell interpreting those!
This commit is contained in:
Carl Worth 2009-11-24 19:08:53 -08:00
parent 93af7b5745
commit adef907918

View file

@ -1033,7 +1033,7 @@ This function advances point to the next line when finished."
(let ((proc (start-process-shell-command (let ((proc (start-process-shell-command
"notmuch-search" buffer notmuch-command "search" "notmuch-search" buffer notmuch-command "search"
(if oldest-first "--sort=oldest-first" "--sort=newest-first") (if oldest-first "--sort=oldest-first" "--sort=newest-first")
query))) (shell-quote-argument query))))
(set-process-sentinel proc 'notmuch-search-process-sentinel) (set-process-sentinel proc 'notmuch-search-process-sentinel)
(set-process-filter proc 'notmuch-search-process-filter)))) (set-process-filter proc 'notmuch-search-process-filter))))
(run-hooks 'notmuch-search-hook))) (run-hooks 'notmuch-search-hook)))