(dired.info)Multiple Dired Directories


Next: Dired Local Variables Prev: Virtual Dired Up: Tree Dired Extra

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 still has but 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 opinion on `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'.

   The following dired-x commands take special care about the current
Dired directory:

`find-this-file'
     Bind this to `C-x C-f' as a replacement for `find-file' that will
     prompt for the filename within the current Dired subdirectory, not
     the top level directory.

`find-this-file-other-window'
     Bind this to `C-x 4 C-f' as a replacement for
     `find-file-other-window'.

`dired-smart-shell-command'
     Like function `shell-command', but in the current Tree Dired
     directory.  Bound to `M-!' in Dired buffers.

`dired-smart-background-shell-command'
     Like function `background', but in the current Tree Dired
     directory.  Bound to `M-&' in Dired buffers.

`dired-jump-back'
     (Suggested binding `C-x j') Jump back to dired: If in a file, dired
     the current directory and move to file's line.  If in Dired
     already, pop up a level and goto old directory's line.  In case
     the proper Dired file line cannot be found, refresh the Dired
     buffer and try again.

`dired-jump-back-other-window'
     (Suggested binding `C-x 4 j') Like `dired-jump-back', but to other
     window.

`dired-vm'
     (`V') Run VM on this file (assumed to be a UNIX mail folder).
     Further `v' commands from within VM in that folder will default to
     the folder's directory, not the usual `vm-folder-directory'.

     If you give this command a prefix argument, it will visit the
     folder read-only.  This only works in VM 5, not VM 4.

     If the variable `dired-vm-read-only-folders' is t, `dired-vm' will
     visit all folders read-only.  If it is neither `nil' nor `t',
     e.g., the symbol `'if-file-read-only', only files not writable by
     you are visited read-only.  This is the recommended value if you
     run VM 5.

`dired-rmail'
     Run Rmail on this file (assumed to be mail folder in Rmail/BABYL
     format).


automatically generated by info2www