emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 3d0e4a5 184/348: counsel.el (counsel-locate-action-extern)


From: Oleh Krehel
Subject: [elpa] master 3d0e4a5 184/348: counsel.el (counsel-locate-action-extern): Update on w32
Date: Sat, 8 Apr 2017 11:03:52 -0400 (EDT)

branch: master
commit 3d0e4a5b76ec9f5d621de4f2250901c04c50c1ca
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-locate-action-extern): Update on w32
    
    Fixes #688
---
 counsel.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/counsel.el b/counsel.el
index fda6d0e..dde66a0 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1444,15 +1444,16 @@ string - the full shell command to run."
 (defun counsel-locate-action-extern (x)
   "Use xdg-open shell command, or corresponding system command, on X."
   (interactive (list (read-file-name "File: ")))
-  (call-process shell-file-name nil
-                nil nil
-                shell-command-switch
-                (format "%s %s"
-                        (cl-case system-type
-                          (darwin "open")
-                          (windows-nt "start")
-                          (t "xdg-open"))
-                        (shell-quote-argument x))))
+  (if (eq system-type 'windows-nt)
+      (w32-shell-execute "open" x)
+    (call-process shell-file-name nil
+                  nil nil
+                  shell-command-switch
+                  (format "%s %s"
+                          (cl-case system-type
+                            (darwin "open")
+                            (t "xdg-open"))
+                          (shell-quote-argument x)))))
 
 (defalias 'counsel-find-file-extern 'counsel-locate-action-extern)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]