(dired.info)Dired Known Problems


Next: Dired Variable Index Prev: Dired Internals Up: Top

Known Problems with Dired
*************************

   There are some problems with Dired that are either not Dired's fault,
hard to fix or not worth fixing.

   * Renaming directories usually works fine (all affected Dired and
     file buffers are updated), but moving a directory between different
     filesystems (those on different hard disks or different
     partitions) does not work: it creates a plain target file
     containing the contents of the original directory (inodes and
     filenames) or fails completely.

     Unfortunately Emacs' builtin function `rename-file' does not give
     you a clear error message like `cross-device link attempted', but
     rather a spurious `(file-error "Removing old name" "not owner")',
     at least in Emacs 18.55.

     On some systems renaming a directory always fails (even within the
     same filesystem) with the spurious `not owner' error.

   * If `foo' is a symlink to a non-existing file, `(file-exists-p
     "foo")' returns nil.  Thus, Dired will overwite such (strange)
     kinds of symlinks without noticing.

     Dired could test both `file-symlink-p' and `file-exists-p', but
     this would slow down all file operations to catch a very rare case.

   * Copying a directory does not work - it results in a zero-length
     target file.

     This comes from Emacs' `copy-file' function, not from Dired.

     If you really want to copy a directory (recursively), use `!' and
     your favorite shell command to do it (e.g. cp -R or cp -r).

   * Initial spaces in a filename are not recognized.  If I could be
     sure that all `ls' programs insert exactly one space between the
     time and the filename, I could easily fix this.  But `ls' programs
     tend to vary in their amount of white space, and even with one
     `ls' program there is a difference between year and clocktime
     formats
            drwxr-xr-x 2 ab027    thp           512 Aug 13 1990  thp/
            drwxr-xr-x 4 ab027    thp           512 Feb  3 21:59 ./
     If your `ls' supports the `-b' switch and quotes spaces with that
     switch, simply add `b' to your `dired-listing-switches'.  *Note
     Listing Files in Dired::.

     Spaces anywhere but at the beginning do work.

   * In general, only commands that may have targets outside of the
     current directory tree update other buffers (copy, move and link
     commands).

     Especially, deletions, (un)compress, chmod/chgrp/chown update only
     the current buffer.

   * Some compress programs make output even if all goes well.  Dired
     takes output as a sign of trouble and assumes that the subprocess
     failed.

     Redefine function `dired-check-process-checker' suitably to look
     closer at the generated output.  In Emacs 19, the exit status of
     compress will be checked.

   * Aliases like `rm -i' for `rm' or `ls -F' for `ls' can cause
     problems in Dired's (and Emacs') shell command.  (Aliases for `ls'
     only matter if you dired wildcards, because only then the shell is
     used to run `ls'.)  Csh expands aliases only for interactive
     shells, which is probably what you want.  In Bash, you can achieve
     this by testing `PS1' in your `~/.bashrc':
            # `.bashrc' file
            # this test fails when invoked by rsh
            if [ "${PS1-no}" != "no" ]       # is this an interactive shell?
            then
          	  . ~/.bash_alias          # if so, source aliases
            fi

   * Directory names starting with `-' (a minus) may lose when they are
     to be created or removed.  If you care about this, and your rmdir
     and mkdir understand about `--' meaning end of options, change
     `emacs-19.el' accordingly.

     In Emacs 19 the `make-directory' and `remove-directory' operations
     will be builtin, not implemented with `rmdir' and `mkdir'
     subprocesses.

   * `dired-nstd.el': This is still buggy.  For example, after you've
     compressed the last file it may not correctly return that file's
     absolute pathname (`dired-current-directory' erronously returns nil
     because of markers collapsed during redisplay), ultimately leading
     to lisp errors.

   * The regexp-using `%'-commands get into an endless loop if you
     specify a regular expression that matches the empty string.

   * Function `find-alternate-file' in Emacs 18.57 has a bug that causes
     `C-x C-v RET' (which usually re-visits the current buffer) to fail
     on Dired buffers.  This is fixed in the version in `emacs-19.el',
     automatically loaded by Dired.

   * It is not possible to resort the Dired buffer without reverting
     it. That would be hard to implement (and slow to run) given that
     ls date format would have to be parsed for `ls -t' sorting order.


automatically generated by info2www