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?
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.
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.
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.
The command + ( dired-create-directory ) reads a directory's name, and creates that directory. It signals an error if the directory already exists.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With