diff --git a/core/core-osx.el b/core/core-osx.el index 4fa98ef46..db443265b 100644 --- a/core/core-osx.el +++ b/core/core-osx.el @@ -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) diff --git a/init/my-bindings.el b/init/my-bindings.el index 163ce8b17..a2121384b 100644 --- a/init/my-bindings.el +++ b/init/my-bindings.el @@ -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))