[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired not loading directory if in buffer with file from that direct
Re: dired not loading directory if in buffer with file from that directory
Thu, 29 Nov 2001 12:38:37 -0700
Klaus Straubinger wrote:
> However, I fail to understand why the behaviour of "find-file"
> should be a feature. What benefit do you get from the function
> actually doing nothing?
That's why I have this in my .emacs file:
(defadvice find-file (around find-default-filename-run-dired activate)
"Run `\\[dired]' on the current directory (instead of reverting the
buffer) when called interactively, if `find-file-run-dired' is set, no
FILENAME is specified, and the buffer hasn't been modified."
(if (and find-file-run-dired
(equal (ad-get-arg 0) buffer-file-name)
(dired (file-name-directory buffer-file-name))
Kevin Rodgers <address@hidden>