unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: read-directory-name
Date: Fri, 6 May 2005 20:48:55 -0500 (CDT)	[thread overview]
Message-ID: <200505070148.j471mtT20941@raven.dms.auburn.edu> (raw)
In-Reply-To: <200505070120.j471Kjq20923@raven.dms.auburn.edu> (message from Luc Teirlinck on Fri, 6 May 2005 20:20:45 -0500 (CDT))

>From my prior message:

   >From the following ielm run it appears that the Elisp documentation is
   still correct, even though the code and docstring have changed (on
   April 23) since I checked all of this quite a while ago:

   ELISP> default-directory
   "~/"
   ELISP> (read-directory-name "Directory: " "/etc/")
   "~/"
   ELISP> 

   To get the second line, I just presses RET with /etc/ in the
   minibuffer.

Of course, here is the read-directory-name code:

  (unless dir
    (setq dir default-directory))
  (unless default-dirname
    (setq default-dirname
      (if initial (concat dir initial) default-directory)))
  (read-file-name prompt dir (or default-dirname 
				 (if initial (expand-file-name initial dir)
				   dir))
		  mustmatch initial 'file-directory-p))

If both initial and default-dirname are nil, the second unless-form
default-dirname to default-directory.  The or-form then passes
default-directory to read-file-name.  From the docstring, it would
appear that this is not intentional.

Sincerely,

Luc.

  reply	other threads:[~2005-05-07  1:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-07  1:20 read-directory-name Luc Teirlinck
2005-05-07  1:48 ` Luc Teirlinck [this message]
2005-05-07  1:52   ` read-directory-name Luc Teirlinck
2005-05-07  2:34   ` read-directory-name Luc Teirlinck
2005-05-07  2:47     ` read-directory-name Luc Teirlinck
2005-05-07  2:56       ` read-directory-name Luc Teirlinck
2005-05-09 21:32         ` read-directory-name Juri Linkov
2005-05-08 22:45 ` read-directory-name Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505070148.j471mtT20941@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).