Help! I'm trapped in emacs!

This commit is contained in:
Henrik Lissner 2015-05-09 18:08:12 -04:00
parent 3e8d7d1266
commit 1da1ff4583
26 changed files with 306 additions and 405 deletions

View file

@ -27,8 +27,9 @@
;; Send current file to OSX apps
(defun my-open-with (&optional app-name path)
(interactive)
(let ((app-name (if app-name (concat "-p " app-name)))
(let ((app-name (if app-name (concat "-a " app-name)))
(path (or path (if (eq major-mode 'dired-mode) (dired-get-file-for-visit) (buffer-file-name)))))
(message "Trying: %s" (concat "open " app-name " " (shell-quote-argument path)))
(shell-command (concat "open " app-name " " (shell-quote-argument path)))))