Don't involve the shell in notmuch searches

The shell isn't needed to interpret any of the arguments, so don't
bother using it at all.

Signed-off-by: David Benjamin <davidben@mit.edu>
This commit is contained in:
David Benjamin 2010-06-03 20:29:32 -04:00 committed by Carl Worth
parent 14f1a79f44
commit adbfff40ca

View file

@ -795,13 +795,13 @@ The optional parameters are used as follows:
(erase-buffer) (erase-buffer)
(goto-char (point-min)) (goto-char (point-min))
(save-excursion (save-excursion
(let ((proc (start-process-shell-command (let ((proc (start-process
"notmuch-search" buffer "notmuch-search" buffer
(concat notmuch-command " search " notmuch-command "search"
(if oldest-first (if oldest-first
"--sort=oldest-first " "--sort=oldest-first"
"--sort=newest-first ") "--sort=newest-first")
(shell-quote-argument query))))) 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)))