X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;fp=emacs%2Fnotmuch-lib.el;h=9693185f69dde5cfb7a8615f739e328d928d6603;hp=207ea4c21749ba295fc87d033f0ad1845b25f0e6;hb=eb226437e1c0da6da86c04c78cbdd2020b982ad6;hpb=88224bde6248ed03a1c548e437abb12caa382b79 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 207ea4c2..9693185f 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -869,6 +869,11 @@ You may need to restart Emacs or upgrade your notmuch package.")) default" (notmuch--apply-with-env #'process-lines program args)) +(defun notmuch--make-process (&rest args) + "Wrap make-process, binding DEFAULT-DIRECTORY to a safe +default" + (notmuch--apply-with-env #'make-process args)) + (defun notmuch--call-process-region (start end program &optional delete buffer display &rest args) @@ -950,7 +955,7 @@ status." (let* ((command (or (executable-find notmuch-command) (error "Command not found: %s" notmuch-command))) (err-buffer (generate-new-buffer " *notmuch-stderr*")) - (proc (make-process + (proc (notmuch--make-process :name name :buffer buffer :command (cons command args)