unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: compilation-find-file does not allow completing two levels of directory
Date: Mon, 15 Jan 2007 16:47:20 -0500	[thread overview]
Message-ID: <jwv64b8j75l.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <uvej8ozk1.fsf@member.fsf.org> (Stephen Leake's message of "Mon\, 15 Jan 2007 14\:33\:18 -0500")

> 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

  reply	other threads:[~2007-01-15 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-15 19:33 compilation-find-file does not allow completing two levels of directory Stephen Leake
2007-01-15 21:47 ` Stefan Monnier [this message]
2007-01-15 23:34   ` Stephen Leake

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=jwv64b8j75l.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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).