From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: master d879c40f68c: * etc/NEWS: Mention it. Date: Mon, 09 Sep 2024 10:42:47 +0200 Message-ID: References: <172563947472.4957.18260024928108489506@vcs2.savannah.gnu.org> <20240906161755.0CEECC2BC7A@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9207"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 09 10:43:40 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1snZzo-0002Eq-1j for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Sep 2024 10:43:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snZz9-0001Yi-4o; Mon, 09 Sep 2024 04:42:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snZz5-0001Xz-Jl for emacs-devel@gnu.org; Mon, 09 Sep 2024 04:42:55 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snZz0-0000sC-N9 for emacs-devel@gnu.org; Mon, 09 Sep 2024 04:42:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1725871369; bh=RRyWic5KC2XqtTRWcpipjJ0FuoZ1PpHPkHUqYKD1o8k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=wiWHN2CQVzIDZcDCRDXO7+2W1v8AJuDRduCZB5rIN6oK3KagZTKHnHc2SYp5qfQrm h9lJNMgfjiQ9WG6u0aJ17dArw8SuksryMXraoZjywPIS0PU65R4xbhmAiMHWZhrBcu e5UOaq7tVcFubbwNIaAHwHOcvUiB74uxXTbkRdhHYseYK50rjHePfllXG/CEZVYrM3 f3dM8Y2XLs4bXZWss0AWXR8mldWaerY2eleuoIly1aAXj7emntymYVXktv6nQB3JRU b6Qwye3uIYrzpihAoqBD2wK+O5wBY44jllmaUtj24OrJBbq442HAQ8hRtDEjM/K+VQ 5AOd0UVyUZukA== In-Reply-To: <20240906161755.0CEECC2BC7A@vcs2.savannah.gnu.org> (Dmitry Gutov's message of "Fri, 6 Sep 2024 12:17:54 -0400 (EDT)") X-Hashcash: 1:20:240908:sbaugh@janestreet.com::YtSfklKfoRawukZB:LhO X-Hashcash: 1:20:240908:emacs-devel@gnu.org::rcEnjEblFG2OICe0:2x+5 Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323513 Archived-At: Hi, Dmitry Gutov 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---