Opening files with default Windows application from within emacs

前端 未结 8 1613
难免孤独
难免孤独 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:37

    I have this in my .emacs:

    (setq dired-guess-shell-alist-user
      (list
        (list "\\.*$" "cmd /k")
      ))
    

    This will open the file using cmd.exe which will use whatever program is associated with the file extension. Tested to work on Windows 8 and GNU Emacs 24.2.1.

提交回复
热议问题