Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I open files externally in Emacs dired mode?

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'?

like image 836
Gustavo Alip Avatar asked Jul 27 '11 13:07

Gustavo Alip


People also ask

What is Emacs Dired mode?

Dired is the main mode for Emacs file-manager operations. The name “Dired” stands for “directory editor”. A single Dired buffer can display the contents of a single directory, or it can include listings of one or more sub-directories.

How do you use Dired?

To enter into a directory, move to its listing in the Dired buffer, and simply hit the return key. To view a file, you can place the cursor on its entry and use the f or v key, or simply hit the return key.

How do I create a Dired folder?

The command + ( dired-create-directory ) reads a directory's name, and creates that directory. It signals an error if the directory already exists.

How do I move files in Emacs?

Open dired for a directory containing files you want to work with. Then use C , R , or D when the cursor is on the line of a file to copy, rename/move or delete the file, respectively. This can also be done for multiple files by marking them.

How do I open a file in another window Emacs?

To open a file or directory in another window, press o. Note that every time you open a new directory, Emacs will open a new dired buffer. After a while, you can clog your Emacs session with unused dired buffers. Pressing the a key to open a directory will open it in the same buffer.

How do I open a dired buffer in Emacs?

The enter key opens the respective file or directory. To open a file or directory in another window, press o. Note that every time you open a new directory, Emacs will open a new dired buffer. After a while, you can clog your Emacs session with unused dired buffers.

What is the use of Dired in Emacs?

Dired is a directory editor in GNU Emacs. It opens a buffer containing a list of directories and files to operate on. It is a ‘read-only’ mode and hence you cannot input any text. This article explores some of the basic commands that can be used in Dired mode.

What do I need to know about working with Emacs?

Working with Emacs means that you will need to access, create files and manage files on your drives. Emacs comes shipped with dired, a powerful file manager. This article explains the basic principles of that package.


1 Answers

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.

like image 177
Rafe Kettler Avatar answered Sep 21 '22 09:09

Rafe Kettler