(lemacs.info)Minibuffer File


Next: Minibuffer Edit Prev: Minibuffer Up: Minibuffer

Minibuffers for File Names
==========================

   Sometimes the minibuffer starts out with text in it.  For example,
when you are supposed to give a file name, the minibuffer starts out
containing the "default directory", which ends with a slash.  This
informs you in which directory the file will be looked for if you do
not specify a different one. For example, the minibuffer might start
out with:

     Find File: /u2/emacs/src/

where `Find File: ' is the prompt.  Typing `buffer.c' specifies the file
`/u2/emacs/src/buffer.c'.  To find files in nearby directories, use
`..'; thus, if you type `../lisp/simple.el', the file that you visit
will be the one named
`/u2/emacs/lisp/simple.el'.  Alternatively, you can use  `M-DEL' to
kill directory names you don't want (Note: Words.).

   You can also type an absolute file name, one starting with a slash
or a tilde, ignoring the default directory.  For example, to find the
file `/etc/termcap', just type the name, giving:

     Find File: /u2/emacs/src//etc/termcap

Two slashes in a row are not normally meaningful in Unix file names, but
they are allowed in GNU Emacs.  They mean, "ignore everything before the
second slash in the pair."  Thus, `/u2/emacs/src/' is ignored, and you
get the file `/etc/termcap'.

   If you set `insert-default-directory' to `nil', the default
directory is not inserted in the minibuffer.  This way, the minibuffer
starts out empty.  But the name you type, if relative, is still
interpreted with respect to the same default directory.


automatically generated by info2www