all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Sloppy Directory Completion
Date: Wed, 17 Mar 2010 08:58:25 -0700 (PDT)	[thread overview]
Message-ID: <31ed6c0c-f8d0-445f-b3ec-c1249b531844@q21g2000yqm.googlegroups.com> (raw)
In-Reply-To: jwvocin9gmd.fsf-monnier+gnu.emacs.help@gnu.org

On 17 mar, 15:18, Stefan Monnier <monn...@iro.umontreal.ca> wrote:
> > Why doesn't Emacs complete on directories only in for example dired
> > (C-x d)?
> > Is this a bug or a todo?
>
> I think it's a bug.
>
>         Stefan

Firstly dired should uses dired-read-dir-and-switches which in turn
uses read-directory-name and not read-file-name which we could expect.
I believe this is todo.

Secondly from the definition of read-directory-name we can deduce that
it will not work as long as PREDICATE argument in read-file-name() is
not respected. I wrote about this in another thread today here on
gnu.emacs.help.

/Nordlöw

Definition follows

(defun read-directory-name (prompt &optional dir default-dirname
mustmatch initial)
  "..."
  (unless dir
    (setq dir default-directory))
  (read-file-name prompt dir (or default-dirname
				 (if initial (expand-file-name initial dir)
				   dir))
		  mustmatch initial
		  'file-directory-p))


  reply	other threads:[~2010-03-17 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 11:41 Sloppy Directory Completion Nordlöw
2010-03-17 14:18 ` Stefan Monnier
2010-03-17 15:58   ` Nordlöw [this message]
2010-05-05 11:46   ` Ehud Karni
2010-05-05 14:53     ` Stefan Monnier
2010-05-05 14:59       ` Ehud Karni

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

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

  git send-email \
    --in-reply-to=31ed6c0c-f8d0-445f-b3ec-c1249b531844@q21g2000yqm.googlegroups.com \
    --to=per.nordlow@gmail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.