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: Dmitry Gutov
Subject: Re: master d879c40f68c: * etc/NEWS: Mention it.
Date: Mon, 9 Sep 2024 14:40:30 +0300
User-agent: Mozilla Thunderbird

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]