Subject: Re: bug#6636: 24.0.50; special dired feature confuse all dired commands.

From: Thierry Volpiatto <[email-masked]>
Date: Sun, 18 Jul 2010 07:24:05 +0200

Chong Yidong <[email-masked]> writes:

> "Drew Adams" <[email-masked]> writes:
>
>> The is in `dired-buffers-for-dir'.  It has this code:
>>
>> (file-name-non-directory dired-directory)
>>
>> This is wrong. `dired-directory' has every right to be a cons, as it
>> is in this case.
>>
>> Function `dired-buffers-for-dir' was introduced in 23.1, creating this
>> regression wrt Emacs 22.3 and prior releases.
>
> I see the bug, but I don't know where you got the idea that this is a
> regression.  dired-buffers-for-dir has been unchanged since 1997 (except
> for the removal one unused local variable, which does not affect the
> present behavior bug).
>
> I'll check in a fix.

Nice, 
also it would be good to use in many places in emacs something
like:

,----
| (defun anything-c-current-directory ()
|   "Return current-directory name at point.
| Useful in dired buffers when there is inserted subdirs."
|   (if (eq major-mode 'dired-mode)
|       (dired-current-directory)
|       default-directory))
`----

instead of just `default-directory'

(e.g vc-dir, even if i don't use it)

-- 
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997