From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: project-compilation-buffer-name-function and recompile Date: Sun, 21 Jan 2024 07:06:16 +0200 Message-ID: <61c7a411-e2c6-4a67-ada2-27688addea5d@gutov.dev> References: <3474d4d5-5270-4cd4-94a2-efb9d24caa85@jbornemann.de> <67225982-2d03-427c-bed8-94ac6d67cf42@gutov.dev> <57166a9d-876a-4a01-b3eb-6c38227ee62e@jbornemann.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17352"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: =?UTF-8?Q?J=C3=B6rg_Bornemann?= , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 21 06:06:50 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 1rRQ2i-0004I0-0n for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jan 2024 06:06:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRQ2N-000353-Fe; Sun, 21 Jan 2024 00:06:27 -0500 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 1rRQ2L-00034X-Gq for emacs-devel@gnu.org; Sun, 21 Jan 2024 00:06:25 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRQ2I-0001LG-ED for emacs-devel@gnu.org; Sun, 21 Jan 2024 00:06:24 -0500 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 77F733200392; Sun, 21 Jan 2024 00:06:20 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 21 Jan 2024 00:06:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1705813579; x=1705899979; bh=krpZn9rdWf1rWCda7HMIRpeJ0xueZCfaE/SKpTZmz34=; b= oyc/qaO4x5Fk11HCg6hX2LDVOnG0taZW2pG0LOIPlOMuQZwEk5NKNvaoJACZKVZQ 1+a2ALmSQ0p7/jUhAFI9cwlYo+lNPMSIpGyqOK72v8jASYrjmExSPlCl74RTzUMX D88n3giKEe64IgEIY8VpUWJPaFsltuFh1OUAY43a+sqivv1FEV89FLxV/Y37Hgq6 PtxQL7Rekg9o5ACYPQ2+mmB6EWmdwOSrcD+O0WEiS70K1zfHogm+hzkrtNr6iybx AgA7I8oz/5dKMMf896EokVFBOo2Wj1O7XzE8pmHbhxNhz9D0xRg71Lv+7K9ihH1o I6dhTxxQNMLCKbVWWda2Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705813579; x= 1705899979; bh=krpZn9rdWf1rWCda7HMIRpeJ0xueZCfaE/SKpTZmz34=; b=U rbs5iyddOaUCLpXjh/+SbnRlp1V4McAQDpKmu7g2olFWPnHycsgFX/eikEH1KAQP CCkKFX8frXmkIPyPuzx5J15ZJNUrqvqYbxIiBdoEfJ8Ot1w/l/mzbeb2PMw3etDh HQ2bRSBvsm1MahJ7ptsOfFi67RI5c9n3nvsGV1ZDdYOj48RG5ZpryOZPwyIcIuxY QAvQfKJvm0ZHEZCK82qHbGOMuepg4YEwgKuIYSgyL78m8hMB2fNDlygGVDC9va+6 FXEkBLvrmSn5nIOVEPrlHLSbN+mzx1k7fRDlYCx5zYHv/GTVm5qFmD90DjNwkMu0 WGjt5tgJV1CnepjQt/w0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekfedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu thhovhdruggvvheqnecuggftrfgrthhtvghrnhepueeitdekgefghefhffekhfegieekve fhjefhffevfeektdegheehvedtleehffeinecuffhomhgrihhnpehmrghsthgvrhhinhhg vghmrggtshdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 21 Jan 2024 00:06:18 -0500 (EST) Content-Language: en-US In-Reply-To: <57166a9d-876a-4a01-b3eb-6c38227ee62e@jbornemann.de> Received-SPF: pass client-ip=64.147.123.24; envelope-from=dmitry@gutov.dev; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 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:315165 Archived-At: On 19/01/2024 17:05, Jörg Bornemann wrote: > On 1/19/24 01:45, Dmitry Gutov wrote: > >> Alternatively, you could add around-advice to recompile which would >> temporarily bind compilation-buffer-file-name-function. > > Nice, thanks for the suggestion! > >>> Although I'm thinking by now that it might be more consistent to have >>> a separate project-recompile command in addition to >>> recompile.  What do you think? >> >> The command could look like this: >> >>    (defun project-recompile (&optional edit-command) >>      (interactive "P") >>      (let ((compilation-buffer-name-function >> project-compilation-buffer-name-function )) >>        (recompile edit-command))) >> >> It probably doesn't deserve a default key binding in >> project-prefix-map, but you could the same way to invoke it as you did >> with 'recompile'. > > FWIW, I've filed this - as suggested by Eli - as bug#68570. All right, let's continue there. > I agree that project-recompile wouldn't deserve a default key binding > since recompile doesn't have one. > >> TBF, whenever I need to do a recompile-y action, I usually switch to >> the corresponding compilation buffer and press 'g'. That usually has >> the same effect and doesn't require remembering an extra command. > > That also works.  It seems to be a common suggestion (for example [1]) > though to key-bind recompile instead of switching to the compilation > buffer first. I suppose it's a valid preference (otherwise we wouldn't have that command, I guess). > > > Cheers, > > Joerg > > [1] https://www.masteringemacs.org/article/compiling-running-scripts-emacs