From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: find-file-read-args Date: Mon, 23 Nov 2009 21:33:43 -0500 Message-ID: References: <3b31caf90911051613w80af4cu61352a29ce5dcd77@mail.gmail.com> <87vdhoe73d.fsf@mail.jurta.org> <87y6mkb6qr.fsf@mail.jurta.org> <87bpjfiark.fsf@mail.jurta.org> <871vk8uo0q.fsf@mail.jurta.org> <87ocn8ayrw.fsf@mail.jurta.org> <4AFBE741.1040506@gmx.at> <87tyx05849.fsf@mail.jurta.org> <871vjz27lw.fsf@mail.jurta.org> <4B003A50.30601@gmx.at> <4B025430.1010204@gmx.at> <87my2ljxun.fsf@mail.jurta.org> <87bpit1ql9.fsf@mail.jurta.org> <87aaydrle7.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259030043 4197 80.91.229.12 (24 Nov 2009 02:34:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 02:34:03 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 24 03:33:56 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NClE4-0004mS-5p for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2009 03:33:56 +0100 Original-Received: from localhost ([127.0.0.1]:53023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NClE3-0003A9-KS for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2009 21:33:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NClDy-00039o-39 for emacs-devel@gnu.org; Mon, 23 Nov 2009 21:33:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NClDt-000384-IH for emacs-devel@gnu.org; Mon, 23 Nov 2009 21:33:49 -0500 Original-Received: from [199.232.76.173] (port=35793 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NClDt-000381-E9 for emacs-devel@gnu.org; Mon, 23 Nov 2009 21:33:45 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:61327 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NClDt-0005bB-2L for emacs-devel@gnu.org; Mon, 23 Nov 2009 21:33:45 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsFAL/UCkvO+IIa/2dsb2JhbACBTtUZhDwEigI X-IronPort-AV: E=Sophos;i="4.47,275,1257138000"; d="scan'208";a="49895603" Original-Received: from 206-248-130-26.dsl.teksavvy.com (HELO pastel.home) ([206.248.130.26]) by ironport2-out.pppoe.ca with ESMTP; 23 Nov 2009 21:33:43 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id BB41780E5; Mon, 23 Nov 2009 21:33:43 -0500 (EST) In-Reply-To: <87aaydrle7.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 23 Nov 2009 23:17:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117658 Archived-At: >> 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