Kevin Rodgers <[EMAIL PROTECTED]> writes:

> It should signal an error, that the directory doesn't exist.  How
> does one create a buffer whose default-directory doesn't exist?

One finds a file or creates a buffer which isn't associated with a
file, but has default-directory set anyway, and then has someone else:

  rename the directory containing the file
or
  rename one of the directories higher up the tree
or
  umount the filesystem holding the file
or
  ...

I don't see why I shouldn't be allowed to pipe the contents of a
buffer through 'wc -w' for example to count the words in the buffer
just because the buffer's default-directory doesn't exist.

In the case where I first saw this bug, the buffer in question wasn't
associated with a file at all.  I had simply typed "C-x b tmp RET" to
create a temporary buffer.  I was in a '*shell*' buffer at the time,
which was in the "~/tmp/foo" directory.  The 'tmp' buffer which I
created therefore had a default-directory of "~/tmp/foo" - a directory
which I then deleted before attempting to run a shell command on the
contents of the tmp buffer.

Note that when checking for the existance of default-directory, we
need to take the filename handlers into account.  /ssh:[EMAIL PROTECTED]:/tmp
might look like a bad pathname, but it makes sense to Tramp.


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to