Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dired - open files in another Emacs window

Tags:

emacs

dired

I want to have two Emacs windows on the screen: one for Dired and one for code. But when I click on a file in the Dired buffer the file opens in the the same window, in place of the Dired buffer. Can I change this behaviour?

like image 610
ceth Avatar asked Apr 02 '12 07:04

ceth


People also ask

How do I open a new window in Emacs?

To open a new frame, select Make New Frame from the Files menu or press C-x 5 2 (for make-frame). Emacs makes a new frame containing the current buffer and puts it on top of the current frame. These lines set up sizes for the width and height of Emacs frames.

How do you Dired in Emacs?

In order to invoke Dired in Emacs, all you need to do is type C-x C-f . In the “minibuffer” at the bottom of your Emacs frame, you'll see “Find file:” and a prompt to enter a directory path. Press RET after entering your directory and you will see a listing for that directory. This is where the fun begins.

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.


1 Answers

Why are you clicking on things with a mouse? I thought you're using Emacs?

Move point to the line you're interested in and press o to open it in another window or C-o to open the file but stay on Dired buffer.

If you must do it with the mouse, use middle-click to do the same thing.

like image 67
event_jr Avatar answered Oct 04 '22 00:10

event_jr