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 19:52:54 +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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5702"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , emacs-devel@gnu.org To: Spencer Baugh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 09 19:54:10 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 1sniaX-0001Dj-WB for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Sep 2024 19:54:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sniZk-0001sh-Qo; Mon, 09 Sep 2024 13:53:20 -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 1sniZU-0000Xj-3p for emacs-devel@gnu.org; Mon, 09 Sep 2024 13:53:07 -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 1sniZO-0008Ux-2w for emacs-devel@gnu.org; Mon, 09 Sep 2024 13:53:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1725904376; bh=9kY1IkR2fa9vphU6ZIlytBCK+dmXmbytw3O28Ki0u1Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oGkhZqVS2UE9ujcoV/dL2L7wfAG3AheS25/EzbkDM1tqA5kUXesUaVp+mLnXGfmtJ yEI4gziTHe8NI4CcQ5FutscXPrbXGC3K6Db75wcwDSmiJ7/Bc+zjyGrXJTwuU8rLrd 2WZ857ITGIZNfXPmSI3uy0jx+zs0n5ptCEEyBBB/oHs/03Uwa0VaqiRsWSy81FWFEf 0q5SD62+ZLp2ULrjmwNa2DphOV7RkSu4vGjBPJSMEQNJbY/aOSMGmWGPuzaCAaj8cQ qVsD8JCUHy+UP8KKRIp6Y80O1vQOcM97BNj2tDBKRXHNO8gX1b9C4PYjw/8Tg51k5u nT8HUfwbhX+3Q== In-Reply-To: (Spencer Baugh's message of "Mon, 9 Sep 2024 12:03:14 -0400") 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:323520 Archived-At: Spencer Baugh writes: > 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=E2=80=AFAM Dmitry Gutov wr= ote: > > 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=20 > 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= =20 > project files, or only project files. > > > (project-root (project-current t)) nil > > (confirm-nonexistent-file-or-buffer)))) > > (find-file filename t)) Great, now done in 466db358772. Thanks, Eshel