Add info message in spacemacs/open-in-external-app

This commit is contained in:
syl20bnr 2015-06-22 22:59:27 -04:00
parent 80f1f43df4
commit c44e496e1f
1 changed files with 7 additions and 6 deletions

View File

@ -875,12 +875,13 @@ The body of the advice is in BODY."
(let ((file-path (if (eq major-mode 'dired-mode)
(dired-get-file-for-visit)
(buffer-file-name))))
(when file-path
(cond
((system-is-mswindows) (w32-shell-execute "open" (replace-regexp-in-string "/" "\\\\" file-path)))
((system-is-mac) (shell-command (format "open \"%s\"" file-path)))
((system-is-linux) (let ((process-connection-type nil))
(start-process "" nil "xdg-open" file-path)))))))
(if file-path
(cond
((system-is-mswindows) (w32-shell-execute "open" (replace-regexp-in-string "/" "\\\\" file-path)))
((system-is-mac) (shell-command (format "open \"%s\"" file-path)))
((system-is-linux) (let ((process-connection-type nil))
(start-process "" nil "xdg-open" file-path))))
(message "No file associated to this buffer."))))
(defun spacemacs/next-error (&optional n reset)
"Dispatch to flycheck or standard emacs error."