emacs-devel
[Top][All Lists]
Advanced

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

Re: find-file-read-args


From: Stefan Monnier
Subject: Re: find-file-read-args
Date: Mon, 23 Nov 2009 21:33:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> We must be miscommunicating: I don't want to have dired-specific code
>> (including no test for (eq major-mode 'dired-mode)) in read-file-name,
>> because it's ugly.  Can't the same behavior be obtained by changing some
>> code in dired rather than in minibuffer.el?

> I have no idea how to get rid of `dired-get-filename'.
> Grepping for `dired-get-filename' in the source tree shows that
> there are many packages not directly related to Dired that call
> `dired-get-filename'.

Now I wonder: is that code necessary at all?  If dired sets
file-name-at-point-functions, the dired-get-filename would get in the
minibuffer-defaults via file-name-at-point-functions, wouldn't it?

The idea with "no dired-specific code" is that if it's useful for dired
it's also useful for VC-Dir, PCL-CVS, etc...
So it looks like file-name-at-point-functions would be a good way to get
what we want.
WDYT?

> Done below.

Other than the dired issue discussed above, it looks good now, thank you.

> !                         (when (equal (or (car-safe insdef) insdef)
> !                                      (or (car-safe minibuffer-default)
> !                                          minibuffer-default))
> !                           (setq minibuffer-default nil))

I guess this nil should be something like

   (cdr-safe minibuffer-default)


-- Stefan




reply via email to

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