www.delorie.com/gnu/docs/emacs/dired-x_18.html   search  
 
Buy the book!


Dired Extra Version 2 User's Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. Multiple Dired Directories and Non-Dired Commands

An Emacs buffer can have but one working directory, stored in the buffer-local variable default-directory. A Dired buffer may have several subdirectories inserted, but it still has only one working directory: that of the top-level Dired directory in that buffer. For some commands it is appropriate that they use the current Dired directory instead of default-directory, e.g., find-file and compile.

A general mechanism is provided for special handling of the working directory in special major modes:

default-directory-alist
Default: ((dired-mode . (dired-current-directory)))

Alist of major modes and their notion of default-directory, as a lisp expression to evaluate. A resulting value of nil is ignored in favor of default-directory.

default-directory
Function with usage like variable default-directory, but knows about the special cases in variable default-directory-alist.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003