Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counsel-locate-action-extern doesn't work on Windows 10 #688

Closed
oantolin opened this issue Sep 23, 2016 · 1 comment
Closed

counsel-locate-action-extern doesn't work on Windows 10 #688

oantolin opened this issue Sep 23, 2016 · 1 comment

Comments

@oantolin
Copy link

oantolin commented Sep 23, 2016

On Windows 10 counsel-locate-action-extern just opens a cmd terminal (and then doesn't actually run start. The current version is:

(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))))

Changing it to the following worked for me:

(defun counsel-locate-action-extern (x)
  "Use xdg-open shell command, or corresponding system command, on X."
  (interactive (list (read-file-name "File: ")))
  (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)))))

(I really should (re)learn how to make pull requests.)

@abo-abo
Copy link
Owner

abo-abo commented Sep 26, 2016

Thanks, I'll trust you that the fix will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants