Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change directory in Emacs dired

Tags:

In dired+ in Emacs 23.2.1, how do I navigate to a different directory ("change directory")?

I know how to move up a directory with ^ and how to move to different directory lines with < and >, but I have been unable to find a command which allows me to navigate to a new directory (by typing in the name) without quiting the current dired window and creating a new one.

like image 512
SabreWolfy Avatar asked Apr 19 '12 19:04

SabreWolfy


People also ask

How do I change directory in Emacs?

Right click the shortcut, select Properties , and type the path to your desktop in the Start In field. If you're using Emacs from the command line, default-directory starts as the directory where you started Emacs (the cwd).

How do I navigate folders in Emacs?

In Emacs, type M-x dired. You will be prompted for the directory to open. Type in the directory to display, or press Return to open the default directory.

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 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.


2 Answers

C-x C-v will open a file in the current window. If instead of a file you give the name of a directory it will open it in dired.

like image 175
Nicolas Dudebout Avatar answered Sep 18 '22 13:09

Nicolas Dudebout


You can also use a in dired to visit the file/dir at point, discarding the dired buffer you were in, so you don't leave all the ancestor dired buffers around.

And if you use dired-jump, then C-x C-j can be used from dired or file buffers to jump to the parent directory (with point conveniently on the file/directory that you came from).

M-: (info "(dired-x) Optional Installation Dired Jump") RET

like image 28
phils Avatar answered Sep 17 '22 13:09

phils