emacs-devel
[Top][All Lists]
Advanced

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

Re: master d879c40f68c: * etc/NEWS: Mention it.


From: Spencer Baugh
Subject: Re: master d879c40f68c: * etc/NEWS: Mention it.
Date: Mon, 9 Sep 2024 12:03:14 -0400

I'm fine with this change.  "Find file in root: " seems like it would be a decent prompt.

On Mon, Sep 9, 2024 at 7:40 AM Dmitry Gutov <dmitry@gutov.dev> wrote:
On 09/09/2024 11:42, Eshel Yaron wrote:
> Nitpick: I find the use of call-interactively with a constant argument
> slightly awkward.  What do y'all think about a revision along the
> following lines?

Yeah, I think that works too (the only real duplication is the call to
confirm-nonexistent-file-or-buffer, that's minor).

> --8<---------------cut here---------------start------------->8---
> ;;;###autoload
> (defun project-find-file-in-root (filename)
>    "Edit file FILENAME.
> Interactively, prompt for FILENAME, defaulting to the root directory of
> the current project."
>    (declare (interactive-only find-file))
>    (interactive
>     (list (read-file-name "Find project file: "

Maybe "Find in root: "? The command variant doesn't necessarily show all
project files, or only project files.

>                           (project-root (project-current t)) nil
>                           (confirm-nonexistent-file-or-buffer))))
>    (find-file filename t))


reply via email to

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