Variable: insert-default-directory

insert-default-directory is a customizable variable defined in minibuffer.el.gz.

Value

t

Documentation

Non-nil means when reading a filename start with default dir in minibuffer.

When the initial minibuffer contents show a name of a file or a directory, typing RETURN without editing the initial contents is equivalent to typing the default file name.

If this variable is non-nil, the minibuffer contents are always initially non-empty, and typing RETURN without editing will fetch the default name, if one is provided. Note however that this default name is not necessarily the same as initial contents inserted in the minibuffer, if the initial contents is just the default directory.

If this variable is nil, the minibuffer often starts out empty. In that case you may have to explicitly fetch the next history element to request the default name; typing RETURN without editing will leave the minibuffer empty.

For some commands, exiting with an empty minibuffer has a special meaning, such as making the current buffer visit no file in the case of set-visited-file-name.

View in manual

Probably introduced at or before Emacs version 1.6.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defcustom insert-default-directory t
  "Non-nil means when reading a filename start with default dir in minibuffer.

When the initial minibuffer contents show a name of a file or a directory,
typing RETURN without editing the initial contents is equivalent to typing
the default file name.

If this variable is non-nil, the minibuffer contents are always
initially non-empty, and typing RETURN without editing will fetch the
default name, if one is provided.  Note however that this default name
is not necessarily the same as initial contents inserted in the minibuffer,
if the initial contents is just the default directory.

If this variable is nil, the minibuffer often starts out empty.  In
that case you may have to explicitly fetch the next history element to
request the default name; typing RETURN without editing will leave
the minibuffer empty.

For some commands, exiting with an empty minibuffer has a special meaning,
such as making the current buffer visit no file in the case of
`set-visited-file-name'."
  :type 'boolean)