Next: , Previous: , Up: File Names   [Index]


7.3.2.2 Default Directory

default-directory

Each buffer has a default directory, stored in the buffer-local variable default-directory. Emacs always assumes that any relative file name is relative to the default directory,

When you visit a file, Emacs sets default-directory in the visiting buffer to the directory of its file.

pwd

Show the current default directory.

cd DIR

Make DIR become the current buffer’s default directory.