Opening files with default Windows application from within emacs

前端 未结 8 1597
难免孤独
难免孤独 2021-02-07 21:06

I\'m trying to tweak the dired-find-file function in emacs on Windows XP so that when I open (say) a pdf file from dired it fires up a copy of Acrobat Reader and op

8条回答
  •  甜味超标
    2021-02-07 21:59

    To extend on the 'org-open-file' proposal:

    (defun my-dired-find-file (&optional prefix)
        (interactive "P")
        (if prefix
            (org-open-file (dired-get-file-for-visit) 'system)
          (dired-find-file)))
    
    (define-key dired-mode-map "\r" 'my-dired-find-file)
    

    Will let you open a file externally with `C-u RET'.

    found at http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-11/msg01069.html

提交回复
热议问题