From: Eshel Yaron <me@eshelyaron.com>
To: emacs-devel@gnu.org
Cc: Spencer Baugh <sbaugh@janestreet.com>, Dmitry Gutov <dmitry@gutov.dev>
Subject: Re: master d879c40f68c: * etc/NEWS: Mention it.
Date: Mon, 09 Sep 2024 10:42:47 +0200 [thread overview]
Message-ID: <m1ttepi5fc.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <20240906161755.0CEECC2BC7A@vcs2.savannah.gnu.org> (Dmitry Gutov's message of "Fri, 6 Sep 2024 12:17:54 -0400 (EDT)")
Hi,
Dmitry Gutov <dgutov@yandex.ru> writes:
> branch: master
> commit d879c40f68c078bdba15122e4e886a2052fbddf4
[...]
> +;;;###autoload
> +(defun project-find-file-in-root ()
> + "..."
> + (interactive)
> + (let* ((pr (project-current t))
> + (default-directory (project-root pr)))
> + (call-interactively #'find-file)))
Nice addition, thanks!
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?
--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: "
(project-root (project-current t)) nil
(confirm-nonexistent-file-or-buffer))))
(find-file filename t))
--8<---------------cut here---------------end--------------->8---
next parent reply other threads:[~2024-09-09 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <172563947472.4957.18260024928108489506@vcs2.savannah.gnu.org>
[not found] ` <20240906161755.0CEECC2BC7A@vcs2.savannah.gnu.org>
2024-09-09 8:42 ` Eshel Yaron [this message]
2024-09-09 11:40 ` master d879c40f68c: * etc/NEWS: Mention it Dmitry Gutov
2024-09-09 16:03 ` Spencer Baugh
2024-09-09 17:52 ` Eshel Yaron
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=m1ttepi5fc.fsf@dazzs-mbp.home \
--to=me@eshelyaron.com \
--cc=dmitry@gutov.dev \
--cc=emacs-devel@gnu.org \
--cc=sbaugh@janestreet.com \
/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).