From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Bornemann Newsgroups: gmane.emacs.bugs Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer Date: Thu, 18 Jan 2024 17:17:07 +0100 Message-ID: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@jbornemann.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32327"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 68570@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 18 17:58:17 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rQVib-0008Da-TF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jan 2024 17:58:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQViM-0007Be-4D; Thu, 18 Jan 2024 11:58:02 -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 1rQViK-0007BV-RD for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 11:58:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQViK-0002UG-JB for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 11:58:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQViL-0001vO-Vf for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 11:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?J=C3=B6rg?= Bornemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jan 2024 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68570 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17055970807389 (code B ref -1); Thu, 18 Jan 2024 16:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 16:58:00 +0000 Original-Received: from localhost ([127.0.0.1]:56586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQViI-0001v3-J9 for submit@debbugs.gnu.org; Thu, 18 Jan 2024 11:58:00 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:37154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQV51-0003pU-H6 for submit@debbugs.gnu.org; Thu, 18 Jan 2024 11:17:23 -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 1rQV4t-00032K-83 for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 11:17:15 -0500 Original-Received: from ms-10.1blu.de ([178.254.4.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQV4r-0005GS-In for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 11:17:14 -0500 Original-Received: from [93.228.122.142] (helo=[192.168.188.102]) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rQV4l-00CVMS-V7 for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 17:17:07 +0100 Content-Language: en-US X-Con-Id: 36794 X-Con-U: 0-jb X-Originating-IP: 93.228.122.142 Received-SPF: pass client-ip=178.254.4.101; envelope-from=foss@jbornemann.de; helo=ms-10.1blu.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 18 Jan 2024 11:57:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278438 Archived-At: One can use project-compile to build a project and then call recompile to repeat the compilation. This reuses the buffer named "*compilation*". If I set project-compilation-buffer-name-function to #'project-prefixed-buffer-name, this creates a compilation buffer "*myproject-compilation*" when executing project-compile. Now, recompile won't re-use "*myproject-compilation*" but create a new buffer "*compilation*". To reproduce this behavior, it is enough to start Emacs like this: $ emacs -Q --eval "(setq project-compilation-buffer-name-function #'project-prefixed-buffer-name)" It would be nice if recompile could re-use project-compile's buffer name. I have fixed this locally by setting compilation-buffer-name-function like this: ---snip--- (defun my-compilation-buffer-name (name-of-mode) (if (project-current) (apply project-compilation-buffer-name-function (list name-of-mode)) (compilation--default-buffer-name name-of-mode))) (setq compilation-buffer-name-function #'my-compilation-buffer-name) ---snap--- 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? On one hand is the above fix quite convenient but on the other, compilation-buffer-name-function probably should not have project.el-specific knowledge.