Skip to content

Instantly share code, notes, and snippets.

@yujiorama
Created June 8, 2010 01:28
Show Gist options
  • Save yujiorama/429477 to your computer and use it in GitHub Desktop.
Save yujiorama/429477 to your computer and use it in GitHub Desktop.
(defun explorer (&optional args)
(interactive)
(let ((dir (expand-file-name args)))
(cond ((not (file-directory-p dir))
(message "%s can't open." dir))
(t
(w32-shell-execute "explore" dir)))))
(defun dired-exec-explorer ()
""
(interactive)
(explorer (dired-current-directory)))
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map "E" 'dired-exec-explorer)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment