shell-command-to-string -> doom-call-process #1887

Minor optimization to remove a layer of indirection when starting
processes.
This commit is contained in:
Henrik Lissner 2019-11-07 18:20:38 -05:00
parent 873fc5c0db
commit 44d5e097c9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 46 additions and 45 deletions

View file

@ -100,7 +100,7 @@
(interactive)
(let* ((msg-path (car (plist-get (notmuch-tree-get-message-properties) :filename)))
(temp (make-temp-file "notmuch-message-" nil ".eml")))
(shell-command-to-string (format "cp '%s' '%s'" msg-path temp))
(doom-call-process "cp" msg-path temp)
(start-process-shell-command "email" nil (format "xdg-open '%s'" temp))))
;;;###autoload
@ -108,7 +108,7 @@
(interactive)
(let* ((msg-path (car (plist-get (notmuch-show-get-message-properties) :filename)))
(temp (make-temp-file "notmuch-message-" nil ".eml")))
(shell-command-to-string (format "cp '%s' '%s'" msg-path temp))
(doom-call-process "cp" msg-path temp)
(start-process-shell-command "email" nil (format "xdg-open '%s'" temp))))