bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired not loading directory if in buffer with file from that directo


From: Andreas Schwab
Subject: Re: dired not loading directory if in buffer with file from that directory
Date: 29 Nov 2001 16:48:18 +0100
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.1.30

Klaus Straubinger <address@hidden> writes:

|> address@hidden (Eli Zaretskii) wrote:
|> 
|> > On Thu, 29 Nov 2001, Klaus Straubinger wrote:
|> >>     Attempting to load a directory with "find-file" does nothing
|> >>     if performed in a buffer containing a file from that directory.
|> <snip>
|> > I think that's a feature, although quite a few users (myself included)
|> > tend to be surprised by it from time to time ;-)
|> >
|> > FWIW, I solve it by using "C-x d" at all times.
|> 
|> Thank you for your suggestion; it works perfectly.
|> 
|> However, I fail to understand why the behaviour of "find-file"
|> should be a feature.

It's a property of read-file-name:

read-file-name is a built-in function.
(read-file-name PROMPT &optional DIR DEFAULT-FILENAME MUSTMATCH INITIAL)

Read file name, prompting with PROMPT and completing in directory DIR.
Value is not expanded---you must call `expand-file-name' yourself.
Default name to DEFAULT-FILENAME if user enters a null string.
 (If DEFAULT-FILENAME is omitted, the visited file name is used,
  except that if INITIAL is specified, that combined with DIR is used.)
Fourth arg MUSTMATCH non-nil means require existing file's name.
 Non-nil and non-t means also require confirmation after completion.
Fifth arg INITIAL specifies text to start with.
DIR defaults to current buffer's directory default.

Andreas.

-- 
Andreas Schwab                                  "And now for something
address@hidden                          completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



reply via email to

[Prev in Thread] Current Thread [Next in Thread]