dired-xdg-open
This commit is contained in:
parent
0424e62dd6
commit
128897bfd3
|
@ -42,3 +42,13 @@ Ask before recursively deleting a directory, though.
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(setq dired-recursive-deletes 'top)
|
||||
#+END_SRC
|
||||
|
||||
Open a file with an external program (that is, through xdg-open) by hitting C-c C-o.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun dired-xdg-open ()
|
||||
"In dired, open the file named on this line."
|
||||
(interactive)
|
||||
(let* ((file (dired-get-filename nil t)))
|
||||
(call-process "xdg-open" nil 0 nil file)))
|
||||
(define-key dired-mode-map (kbd "C-c C-o") 'dired-xdg-open)
|
||||
#+END_SRC
|
||||
|
|
Loading…
Reference in New Issue