Next: , Up: File Names   [Index]


7.3.2.1 Minibuffer for File Names

Minibuffer

While in the minibuffer, you can use the usual completion and history commands. Minibuffer history commands offer some special features for reading file names.

find-file (‘C-x C-f’)

use the minibuffer to read a file name argument. Emacs obeys this command by visiting the file: it creates a buffer, copies the contents of the file into the buffer, and then displays the buffer for editing. If the file does not exist, this command creates an empty buffer; Emacs creates the file the first time you save this buffer.

save-buffer (‘C-x C-s’)

you can save the new text in the file by typing ‘C-x C-s’ (save-buffer). This copies the altered buffer contents back into the file

Completion

read-file-name-completion-ignore-case

when non-nil, ignore case when completing file names.

read-buffer-completion-ignore-case

when non-nil, ignore case when completing buffer names.

completion-ignored-extensions

When completing file names, Emacs usually omits certain alternatives that are considered unlikely to be chosen, as determined by this list variable.

It’s value is:

(.annot .cmi .cmti .cmt .cmxs .cmxa .cma .cmx .cmo .o ~ .bin .lbin .so .a .ln .blg .bbl .elc .lof .glo .idx .lot .svn/ .hg/ .git/ .bzr/ CVS/ _darcs/ _MTN/ .fmt .tfm .class .fas .lib .mem .x86f .sparcf .dfsl .pfsl .d64fsl .p64fsl .lx64fsl .lx32fsl .dx64fsl .dx32fsl .fx64fsl .fx32fsl .sx64fsl .sx32fsl .wx64fsl .wx32fsl .fasl .ufsl .fsl .dxl .lo .la .gmo .mo .toc .aux .cp .fn .ky .pg .tp .vr .cps .fns .kys .pgs .tps .vrs .pyc .pyo)

completion-cycle-threshold

If non-nil, completion commands can cycle through completion alternatives. If t, cycling is always used.

Permissive Completion with Confirmation

Minibuffer History

Every argument that you enter with the minibuffer is saved in a minibuffer history list so you can easily use it again later. Emacs keeps separate history lists for several different kinds of arguments. For example, there is a list for file names, used by all the commands that read file names. Other history lists include buffer names, command names (used by M-x), and command arguments (used by commands like query-replace). Use the following arguments to quickly fetch an earlier argument into the minibuffer:


Next: Default Directory, Up: File Names   [Index]