From 5eb8bf5143033d572ac682ac93979a9ffdf0dad6 Mon Sep 17 00:00:00 2001 From: "C.Li" Date: Wed, 7 Aug 2013 20:49:21 +0800 Subject: [PATCH] open file in new session, new process --- core/prelude-core.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index 56e858c..154e801 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -41,13 +41,14 @@ With a prefix ARG always prompt for command to use." (interactive "P") (when buffer-file-name - (shell-command (concat + (start-process "prelude-open-with-processes" + "external-file-buffer" + "setsid" (cond ((and (not arg) (eq system-type 'darwin)) "open") ((and (not arg) (member system-type '(gnu gnu/linux gnu/kfreebsd))) "xdg-open") (t (read-shell-command "Open current file with: "))) - " " - (shell-quote-argument buffer-file-name))))) + (shell-quote-argument buffer-file-name)))) (defun prelude-buffer-mode (buffer-or-name) "Retrieve the `major-mode' of BUFFER-OR-NAME."