How can I open files externally in Emacs dired mode?

Gustavo Alip picture Gustavo Alip · Jul 27, 2011 · Viewed 14.7k times · Source

I want to open a pdf with evince instead of DocView mode. Is there a possibility to open a file with a specific command like 'evince'?

Answer

Rafe Kettler picture Rafe Kettler · Jul 27, 2011

Yes. Use ! while in dired to run a shell command on a file.

In the case of evince, it's smarter to use &, though, which will run the command asynchronously, so emacs will still be usable while you have the PDF open.