Dired extension to run mac open files.

0 views
Skip to first unread message

Ben Hyde

unread,
May 28, 2004, 9:02:45 PM5/28/04
to xemacs...@googlegroups.com

This binds capital oh, or 'O', in dired to open as if double clicking
in the finder the file under the point.


;;; Dired enhancment.

(defun macosx-click2-file (filename)
(call-process "open" nil 0 nil filename))

(defun dired-macosx-click2-file ()
"In dired, open this file as if the user doubled clicked it in the
finder."
(interactive "")
(macosx-click2-file (dired-get-filename))
(message "Opening..."))

(add-hook 'dired-load-hook
'(lambda ()
(define-key dired-mode-map "O" 'dired-macosx-click2-file)))

Reply all
Reply to author
Forward
0 new messages