From: Carl Worth Date: Wed, 25 Nov 2009 03:08:53 +0000 (-0800) Subject: notmuch.el: Quote arguments to protect from shell interpretation. X-Git-Tag: 0.1~335 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=adef90791867001f859d3b3fdcb46d265148cd11;p=notmuch.git 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! --- diff --git a/notmuch.el b/notmuch.el index 9a209545..551048ad 100644 --- a/notmuch.el +++ b/notmuch.el @@ -1033,7 +1033,7 @@ This function advances point to the next line when finished." (let ((proc (start-process-shell-command "notmuch-search" buffer notmuch-command "search" (if oldest-first "--sort=oldest-first" "--sort=newest-first") - query))) + (shell-quote-argument query)))) (set-process-sentinel proc 'notmuch-search-process-sentinel) (set-process-filter proc 'notmuch-search-process-filter)))) (run-hooks 'notmuch-search-hook)))