]> git.notmuchmail.org Git - notmuch/commitdiff
Don't involve the shell in notmuch searches
authorDavid Benjamin <davidben@MIT.EDU>
Fri, 4 Jun 2010 00:29:32 +0000 (20:29 -0400)
committerCarl Worth <cworth@cworth.org>
Fri, 29 Oct 2010 21:13:51 +0000 (14:13 -0700)
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>
emacs/notmuch.el

index a84852756d66366ef54be50924f210ea485821f5..d1543f4bd8bd915de2ea503f44fdbd09572dd34c 100644 (file)
@@ -795,13 +795,13 @@ The optional parameters are used as follows:
       (erase-buffer)
       (goto-char (point-min))
       (save-excursion
-       (let ((proc (start-process-shell-command
+       (let ((proc (start-process
                     "notmuch-search" buffer
-                    (concat notmuch-command " search "
-                            (if oldest-first
-                                "--sort=oldest-first "
-                              "--sort=newest-first ")
-                            (shell-quote-argument query)))))
+                    notmuch-command "search"
+                    (if oldest-first
+                        "--sort=oldest-first"
+                      "--sort=newest-first")
+                    query)))
          (set-process-sentinel proc 'notmuch-search-process-sentinel)
          (set-process-filter proc 'notmuch-search-process-filter))))
     (run-hooks 'notmuch-search-hook)))