[Top][All Lists]
[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
From: |
Richard Stallman |
Subject: |
Re: dired not loading directory if in buffer with file from that directory |
Date: |
Fri, 30 Nov 2001 10:01:29 -0700 (MST) |
(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
(interactive-p)
(equal (ad-get-arg 0) buffer-file-name)
(not (buffer-modified-p)))
(dired (file-name-directory buffer-file-name))
ad-do-it))
If it is clear that this special case is not going to disappoint
anyone, we could put it into find-file.
The one reason why this might disappoint users is if they do
C-x C-f RET as a way of checking if the file has changed on disk.
In that case, it would ask the user whether to reread the file.
- Re: dired not loading directory if in buffer with file from that directory,
Richard Stallman <=