Next: , Previous: , Up: Practicals   [Index]


9.4 Dired

You can manipulate directories and files using Emacs’s directory editor, ‘Dired’. ‘Dired’ makes an Emacs buffer containing a listing of a directory, and optionally some of its subdirectories. The buffer is normally read-only. ‘Dired’ also works with remote directories.

Ways to access ‘Dired’:

From IDO Mode

C-x C-f C-d’ when finding files to open a dired buffer in that file’s current directory.

As a command

M-x dired’ [directory|pattern]

As a key bind

C-x d’; ‘C-x 4 d’; ‘C-x 5 d’ [directory|pattern]

Ex: M-x dired <RET> ~/foo/ | ~/foo/*.el | ~/foo/*/*.el <RET>
dired-jump

C-x C-j’; ‘C-x 4 C-j’ open a Dired buffer and move point to the line corresponding to the current file.

C-udired

specify the ls switches in the minibuffer

Dired Buffer is usually based upon ls -al. This can be configured using dired-listing-switches.

See also the following extensions:

Wdired

allows one to edit the Dired buffer directly to make changes

Dired-X

Dired Extra’ — the extra features of Dired mode