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: compilation-find-file does not allow completing two levels of directory Date: Mon, 15 Jan 2007 16:47:20 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168897678 28528 80.91.229.12 (15 Jan 2007 21:47:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 21:47:58 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 15 22:47:56 2007 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 1H6Zg9-0003RU-MG for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 22:47:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Zg9-0001C6-K0 for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 16:47:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6Zft-0001As-2e for emacs-devel@gnu.org; Mon, 15 Jan 2007 16:47:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Zfq-00016M-5N for emacs-devel@gnu.org; Mon, 15 Jan 2007 16:47:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Zfq-00016A-0S for emacs-devel@gnu.org; Mon, 15 Jan 2007 16:47:26 -0500 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H6Zfp-0008Q4-9t for emacs-devel@gnu.org; Mon, 15 Jan 2007 16:47:25 -0500 Original-Received: from pastel.home ([70.55.83.78]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070115214724.VQCW12977.tomts16-srv.bellnexxia.net@pastel.home> for ; Mon, 15 Jan 2007 16:47:24 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 624598143; Mon, 15 Jan 2007 16:47:20 -0500 (EST) Original-To: Stephen Leake In-Reply-To: (Stephen Leake's message of "Mon\, 15 Jan 2007 14\:33\:18 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) 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:65227 Archived-At: > RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v > retrieving revision 1.413 > diff -u -r1.413 compile.el > --- compile.el 24 Nov 2006 10:29:44 -0000 1.413 > +++ compile.el 15 Jan 2007 19:32:56 -0000 > @@ -1852,17 +1852,7 @@ > (let* ((name (read-file-name > (format "Find this %s in (default %s): " > compilation-error filename) > - spec-dir filename t nil > - ;; Try to make sure the user can only select > - ;; a valid answer. This predicate may be ignored, > - ;; tho, so we still have to double-check afterwards. > - ;; TODO: We should probably fix read-file-name so > - ;; that it never ignores this predicate, even when > - ;; using popup dialog boxes. > - (lambda (name) > - (if (file-directory-p name) > - (setq name (expand-file-name filename name))) > - (file-exists-p name)))) > + spec-dir filename t nil nil)) > (origname name)) > (cond > ((not (file-exists-p name)) Thanks. We can keep the file-exists-p in the predicate. And we should add a comment explaining why the predicate is "incomplete" (otherwise someone might be tempted to redo what I did). Stefan