aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch-lib.el
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-29 12:23:32 -0700
committerDavid Bremner <david@tethera.net>2021-09-11 10:27:38 -0300
commiteb226437e1c0da6da86c04c78cbdd2020b982ad6 (patch)
tree5d99f26dc5a43adef8e13594d24cd97ad43553db /emacs/notmuch-lib.el
parent88224bde6248ed03a1c548e437abb12caa382b79 (diff)
emacs: wrap make-process
Provide a safe working directory.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r--emacs/notmuch-lib.el7
1 files changed, 6 insertions, 1 deletions
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)