summaryrefslogtreecommitdiff
path: root/openwith.el
diff options
context:
space:
mode:
authorjpkotta <jpkotta@shannon>2012-05-30 13:58:06 -0500
committerSean Whitton <spwhitton@spwhitton.name>2017-01-28 20:49:38 -0700
commitbcf44d00f4f60b5ebbebff32b3960cc1dc80002b (patch)
tree75ff97d2c4555f21fdf0e7641688d9acefcafa70 /openwith.el
parent04e303cb9fc7945219763859784fe03abe49ad29 (diff)
simplify openwith-open and use exec to get rid of extra shell process
Diffstat (limited to 'openwith.el')
-rw-r--r--openwith.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/openwith.el b/openwith.el
index 1478939..73efae1 100644
--- a/openwith.el
+++ b/openwith.el
@@ -77,13 +77,9 @@ where the symbol 'file' is replaced by the file to be opened."
(let ((shell-file-name "/bin/sh"))
(start-process-shell-command
"openwith-process" nil
- (mapconcat 'identity
- (concatenate 'list
- '("nohup")
- (list command)
- (mapcar 'shell-quote-argument arglist)
- '(">/dev/null"))
- " "))))
+ (concat "exec nohup " command " "
+ (mapconcat 'shell-quote-argument arglist " ")
+ " >/dev/null"))))
(defun openwith-file-handler (operation &rest args)
"Open file with external program, if an association is configured."