More flexible send-to-program functions
This commit is contained in:
parent
e2e38273ba
commit
bc1881def9
2 changed files with 20 additions and 14 deletions
|
@ -28,21 +28,25 @@
|
|||
(setq appName (concat "-a " appName ".app")))
|
||||
(shell-command (concat "open " appName " " (shell-quote-argument path))))
|
||||
|
||||
(defun my-open-with (appName)
|
||||
(defun my-open-with (appName file)
|
||||
(interactive "sApp name: ")
|
||||
(my--open-file-with buffer-file-name appName))
|
||||
(my--open-file-with file appName))
|
||||
|
||||
(defun my-send-to-transmit ()
|
||||
(interactive) (my-open-with "Transmit"))
|
||||
(defun my-send-to-transmit (file)
|
||||
(interactive "f")
|
||||
(my-open-with "Transmit" file))
|
||||
|
||||
(defun my-send-to-launchbar ()
|
||||
(interactive) (my-open-with "LaunchBar"))
|
||||
(defun my-send-to-launchbar (file)
|
||||
(interactive "f")
|
||||
(my-open-with "LaunchBar" file))
|
||||
|
||||
(defun my-send-dir-to-launchbar ()
|
||||
(interactive) (my--open-file-with default-directory "LaunchBar"))
|
||||
(defun my-send-dir-to-launchbar (dir)
|
||||
(interactive "D")
|
||||
(my--open-file-with dir "LaunchBar"))
|
||||
|
||||
(defun my-send-dir-to-finder ()
|
||||
(interactive) (my--open-file-with default-directory "Finder"))
|
||||
(defun my-send-dir-to-finder (dir)
|
||||
(interactive "D")
|
||||
(my--open-file-with dir "Finder"))
|
||||
|
||||
|
||||
(provide 'core-osx)
|
||||
|
|
|
@ -72,10 +72,12 @@
|
|||
"\\ ]" 'next-buffer
|
||||
"\\ [" 'previous-buffer
|
||||
|
||||
"\\ o f" 'my-send-dir-to-finder
|
||||
"\\ o u" 'my-send-to-transmit
|
||||
"\\ o l" 'my-send-to-launchbar
|
||||
"\\ o L" 'my-send-dir-to-launchbar
|
||||
"\\ o f" (λ (my-send-dir-to-finder default-directory))
|
||||
"\\ o F" 'my-send-dir-to-finder
|
||||
"\\ o u" (λ (my-send-to-transmit buffer-file-name))
|
||||
"\\ o U" 'my-send-to-transmit
|
||||
"\\ o l" (λ (my-send-to-launchbar buffer-file-name))
|
||||
"\\ o L" 'my-send-to-launchbar
|
||||
|
||||
;; tmux: cd (default-directory)
|
||||
"\\ o t" (λ (ex:tmux-chdir nil t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue