|
From: | Spencer Baugh |
Subject: | Re: master d879c40f68c: * etc/NEWS: Mention it. |
Date: | Mon, 9 Sep 2024 12:03:14 -0400 |
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))
[Prev in Thread] | Current Thread | [Next in Thread] |