GNU logs - #68570, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 18 Jan 2024 16:58:01 +0000
Resent-Message-ID: <handler.68570.B.17055970807389 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 68570 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17055970807389
          (code B ref -1); Thu, 18 Jan 2024 16:58:01 +0000
Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 16:58:00 +0000
Received: from localhost ([127.0.0.1]:56586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rQViI-0001v3-J9
	for submit <at> debbugs.gnu.org; Thu, 18 Jan 2024 11:58:00 -0500
Received: from lists.gnu.org ([2001:470:142::17]:37154)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <foss@HIDDEN>) id 1rQV51-0003pU-H6
 for submit <at> debbugs.gnu.org; Thu, 18 Jan 2024 11:17:23 -0500
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 <foss@HIDDEN>)
 id 1rQV4t-00032K-83
 for bug-gnu-emacs@HIDDEN; Thu, 18 Jan 2024 11:17:15 -0500
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 <foss@HIDDEN>)
 id 1rQV4r-0005GS-In
 for bug-gnu-emacs@HIDDEN; Thu, 18 Jan 2024 11:17:14 -0500
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 <foss@HIDDEN>) id 1rQV4l-00CVMS-V7
 for bug-gnu-emacs@HIDDEN; Thu, 18 Jan 2024 17:17:07 +0100
Message-ID: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
Date: Thu, 18 Jan 2024 17:17:07 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
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@HIDDEN;
 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-Spam-Score: 1.0 (+)
X-Mailman-Approved-At: Thu, 18 Jan 2024 11:57:57 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Subject: bug#68570: Acknowledgement (29.1; recompile might not re-use
 project-compile's buffer)
Message-ID: <handler.68570.B.17055970807389.ack <at> debbugs.gnu.org>
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
X-Gnu-PR-Message: ack 68570
X-Gnu-PR-Package: emacs
Reply-To: 68570 <at> debbugs.gnu.org
Date: Thu, 18 Jan 2024 16:58:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 68570 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
68570: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68570
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
In-Reply-To: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
Resent-From: Pengji Zhang <kunhtkun@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 19 Jan 2024 20:20:01 +0000
Resent-Message-ID: <handler.68570.B68570.170569556925222 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170569556925222
          (code B ref 68570); Fri, 19 Jan 2024 20:20:01 +0000
Received: (at 68570) by debbugs.gnu.org; 19 Jan 2024 20:19:29 +0000
Received: from localhost ([127.0.0.1]:60157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rQvKr-0006Yk-7t
	for submit <at> debbugs.gnu.org; Fri, 19 Jan 2024 15:19:29 -0500
Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:42097)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kunhtkun@HIDDEN>) id 1rQvKp-0006YY-TD
 for 68570 <at> debbugs.gnu.org; Fri, 19 Jan 2024 15:19:28 -0500
Received: by mail-qv1-xf36.google.com with SMTP id
 6a1803df08f44-6818aa08a33so8587696d6.0
 for <68570 <at> debbugs.gnu.org>; Fri, 19 Jan 2024 12:19:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1705695559; x=1706300359; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=TokEejaVxrekNw0AI5xWaxCOqSxH3ITTufqdVuhc4fc=;
 b=cd1HaLsJbhgHPpqndfegiLOJ3no513ISh+F5y6utVhw+CPxJ7vh+WaPGy4F5F9mx+Y
 IJ9PMQeC+1+gkYZTN1foLJbyNaMwrSJck11WOoObnazkzKHEm6Sa7Qf3qSPsNyzEwLHl
 g7XnrKn4C46BoiTlz7WREALUbqF122mCsGCU1BNM6BsvoBtSf1IKEiLd382C3s84Ds+L
 IX5i2p2HnHrwnspF7OWyPbxyrS7XtqMhf9lBAmf0vBX3JduHDyn35YRrSxJq078uZapd
 vsRCPf23wEOlLfZj99Tc73L4HKWOKhWePCgtzNsM50Q2tlG5jlSD7RXbWZk2FAsCNA8q
 p4DQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1705695559; x=1706300359;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=TokEejaVxrekNw0AI5xWaxCOqSxH3ITTufqdVuhc4fc=;
 b=MBUrRPuje8mn3OX3iWigOc1MuSZ3a1coM97hVE9lr135shSQPWNPlsmBd256F6TETh
 tWEFHli3WvlaGz2clgxCA+BMnHNk0ZGVRMSP8BvyhNtMZowxcTgy/81z1KLk7kK97pXZ
 cRq8fBy57W9Eb0Rx+7wN2CRzhe86YFlQiXMz3w4/M1V39EpdW+06BjpsZ6fU5ttJ5pLT
 NFJqOqNlUacPF+9BRBJX1uMqyydppU0tOAJsoAitPqYm0kSaotEUy3Uj7wFs2wN2pmBe
 feRB2yIBALq3MndrjUUvnTl6Ilz77faZ+TXQ+Xp6jb66t4ZnSK1Vj1n9YT2Yg4+K6BiK
 XwMQ==
X-Gm-Message-State: AOJu0YxpZGC//ILS7DLH7nXvPrYcQVPbGa7MvKKSZ5AVQCQeYzchCu36
 udpjyKgQL1BL/Ne7UdYPl+IJaLOnesAL5nplwTMJsgHUVg7MdxeG6sp226yMXC59KYZnSgECOrq
 RsLg0/EEiEFN7HMAeB5Eh/PmbYgWglebq2ro=
X-Google-Smtp-Source: AGHT+IHSWh15lRyuUmaziJoXuiLd0ze7rCyTnoG26FlWpWkouCnYSrw056VvY1BUuftzGbNkwf1jYyf0X8txtSf7qxk=
X-Received: by 2002:a05:6214:f2e:b0:67f:8391:7d40 with SMTP id
 iw14-20020a0562140f2e00b0067f83917d40mr2755061qvb.51.1705695559396; Fri, 19
 Jan 2024 12:19:19 -0800 (PST)
MIME-Version: 1.0
From: Pengji Zhang <kunhtkun@HIDDEN>
Date: Fri, 19 Jan 2024 15:19:08 -0500
Message-ID: <CANOCUixtWwwRR4S_uWsxd0n4u6t3aEx9tZhCe09y9cyByYX+xA@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi!

I think you meant running `M-x recompile' not in a compilation buffer?
While I agree that is convenient, I suppose it is better to only use
`recompile' in a compilation buffer due to security reasons.

`compile-command' is marked as a safe local variable assuming that the
user would be prompted to check and confirm the command before running
it. That is the behavior of `compile' but not `recompile'. For
example, create a file '/tmp/test.c' with the following contents:

    /* Local Variables: */
    /* compile-command: "echo 1" */
    /* End: */

Then:
  - emacs -Q --eval "(require 'compile)"
  - C-x C-f /tmp/test.c
  - M-x recompile

So we could run arbitrary commands without any warning or confirmation.

Instead of a `project-recompile' command, it might be better to make
`recompile' find the existing compilation buffer for the current
buffer, and refuse to run the command (or ask for confirmation) if
there is no such buffer.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 20 Jan 2024 14:29:01 +0000
Resent-Message-ID: <handler.68570.B68570.17057608965556 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Pengji Zhang <kunhtkun@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.17057608965556
          (code B ref 68570); Sat, 20 Jan 2024 14:29:01 +0000
Received: (at 68570) by debbugs.gnu.org; 20 Jan 2024 14:28:16 +0000
Received: from localhost ([127.0.0.1]:33194 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRCKW-0001RY-2b
	for submit <at> debbugs.gnu.org; Sat, 20 Jan 2024 09:28:16 -0500
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42335)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rRCKS-0001RH-3X
 for 68570 <at> debbugs.gnu.org; Sat, 20 Jan 2024 09:28:14 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.nyi.internal (Postfix) with ESMTP id 3AE4A5C00C4;
 Sat, 20 Jan 2024 09:28:03 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Sat, 20 Jan 2024 09:28:03 -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=1705760883;
 x=1705847283; bh=i01UFDZt16gH2XG7gXe6r83kws2CoVK0ZxsCLAV3LHg=; b=
 GPIxWlXp7pXoPEWGbqM0Cm886YhyKpjUamGeRSjzdx2VyMnMVq7RqPnd1fkoGwDT
 nzzegGLvHx00Jb8ncYULbD4wM55nRCiA6fec8MuJSASWZMaL7UN918+j7yltMjTh
 V3mBFDMf9NERk8vYpIVbZ8js2SBfTaZTnRJUPUYWBwx5YZYQVTyNaIT2ZkhFPQgI
 prb5ldg86tZbUomoE9dw8HJg6s5IWUxvl8CEIiqH8ZOVEibCtabJ6c7ZDhckvVRu
 SMZCC+4aU7XBn0R5wJPWETWs15nEeEBpfLlKlkxxPUnuaDKlaJ+qk0clq/cFFQks
 zqUmZbPdPWJhcWftqSUqfA==
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=1705760883; x=
 1705847283; bh=i01UFDZt16gH2XG7gXe6r83kws2CoVK0ZxsCLAV3LHg=; b=X
 DfPJ59xDPd3AY0o0lfBvYtrkyjO+AZm4pj4kiiT3WQLeRsIZrTiPQNO+wylGNfGI
 s6UuCjw+HxgisgC5yTrQJtvWZcd1mHmGS1dVNFLtzM18MnME2qATbnSWNU8S5pbs
 0+A7QrvFuLzN3HbDnJxlZhKYUbsfZljihsq7q1fQgU0OvmdIMaGde2fgSa+JIPjQ
 LmrJDeqjm+qneOpIr4EryVxCpEbCgsF2wn/ccu/PtqPfdMwDdcKpxOhuYDIuPT8C
 O6X5+GiwoEKDZEKJZCIJ5RZ1+gWTJYkT6qv6IJcKLCC6m3jRSa6M8k5B6xIUaWJf
 hVHD3xdB4wR2zs36MXjpA==
X-ME-Sender: <xms:ctirZSBeI9M0MggIRdl9KxlQxT-gq-FNbZ-gex9NmyG5NWZE0uPxMQ>
 <xme:ctirZcjvFXrqJsoavbJ8_dZ-E9ZY_RK1dy0o1f1CQRtvqrTcy2uL-5hiO0DdM1kWz
 9ub8UKDSqnMmxcc5Jo>
X-ME-Received: <xmr:ctirZVkghST_F3tKNvwsRNc72fXhFJrRqh33SlME0BxSVaVV8RYdKapWWNC6lp0n3Jm_6Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekvddgieeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje
 ertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu
 thhovhdruggvvheqnecuggftrfgrthhtvghrnheptdfhuedvtdevleegueelvedvjeevhe
 ffveevhedvuefftdefhfdvueeggfetgfdtnecuvehluhhsthgvrhfuihiivgeptdenucfr
 rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:ctirZQwormzXwzpFyNiidF6AoTrayKDjnSjUEIcO_KS_iSW3yTglWA>
 <xmx:ctirZXSZdU0ZuAVu9LLUhyUeDVdJe-poYhQAI1SNd0r5aLCPYF0MGA>
 <xmx:ctirZbYqxzJzfPFJUNkH8L28LcoNjI0xmtruYyxkJ27FywqIjkUpfg>
 <xmx:c9irZY6PaoAWPTNsUUIrHs6v4QONW-RONsyZqfaEb6KcRDqgL-iVDw>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 20 Jan 2024 09:28:02 -0500 (EST)
Message-ID: <c40de7c4-b452-48d5-90ab-beb9e3bd32dc@HIDDEN>
Date: Sat, 20 Jan 2024 16:27:58 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <CANOCUixtWwwRR4S_uWsxd0n4u6t3aEx9tZhCe09y9cyByYX+xA@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CANOCUixtWwwRR4S_uWsxd0n4u6t3aEx9tZhCe09y9cyByYX+xA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 19/01/2024 22:19, Pengji Zhang wrote:
> I think you meant running `M-x recompile' not in a compilation buffer?
> While I agree that is convenient, I suppose it is better to only use
> `recompile' in a compilation buffer due to security reasons.
> 
> `compile-command' is marked as a safe local variable assuming that the
> user would be prompted to check and confirm the command before running
> it. That is the behavior of `compile' but not `recompile'. For
> example, create a file '/tmp/test.c' with the following contents:
> 
>      /* Local Variables: */
>      /* compile-command: "echo 1" */
>      /* End: */
> 
> Then:
>    - emacs -Q --eval "(require 'compile)"
>    - C-x C-f /tmp/test.c
>    - M-x recompile
> 
> So we could run arbitrary commands without any warning or confirmation.

It seems like you found a security issue in 'M-x recompile'. It's 
orthogonal to this feature request, though.

> Instead of a `project-recompile' command, it might be better to make
> `recompile' find the existing compilation buffer for the current
> buffer, and refuse to run the command (or ask for confirmation) if
> there is no such buffer.

This sounds like a good plan for fixing the above issue.

But the step "find the existing compilation buffer for the current 
buffer" requires compilation-buffer-name-function to be set to an 
appropriate value. And project-compile only binds it temporarily.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 21 Jan 2024 05:10:03 +0000
Resent-Message-ID: <handler.68570.B68570.170581378528602 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170581378528602
          (code B ref 68570); Sun, 21 Jan 2024 05:10:03 +0000
Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 05:09:45 +0000
Received: from localhost ([127.0.0.1]:36338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRQ5Z-0007RF-2v
	for submit <at> debbugs.gnu.org; Sun, 21 Jan 2024 00:09:45 -0500
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:42649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rRQ5X-0007R2-KO
 for 68570 <at> debbugs.gnu.org; Sun, 21 Jan 2024 00:09:44 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.west.internal (Postfix) with ESMTP id 4D5CC3200A5A;
 Sun, 21 Jan 2024 00:09:34 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Sun, 21 Jan 2024 00:09:34 -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=1705813773;
 x=1705900173; bh=NbwExfH7zRfDA9k2ZC0rCszPlnPR5fmOV6BxILcpg6Q=; b=
 Cwi3wvM4I2ZoFIXiURwlRnm5EjbHTCrHDC6fs7eqZ8BdaHpf94mqH+1ePgJLUwdv
 nvoNXwxGsa7dxrs3464tYYRMzr90yH55NKb5DTSCAnHibukFXgFtwKawJzKEo1e1
 tOOz63CP3OEnTkzkzQL8ZUPci9AOM96xhRu/cYYuy+9l01XCHy1dnoEWaWSirHbJ
 zg0PGGuv3yWf8325XuIenDuvgb/iHPpwHQwaCgZsgCr/L+lpdw8Zt76Xt9xSDR3n
 CpiMJJFDuMh+eSJMLv84BV5Cm5etUFn66Mob5vn3n46PlgyY41TiM6t8Cf/Um4jp
 NIyq5810nz5nXiFKAKf/5Q==
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=1705813773; x=
 1705900173; bh=NbwExfH7zRfDA9k2ZC0rCszPlnPR5fmOV6BxILcpg6Q=; b=L
 9cBXajgE/cOO+L7WfRrdkCZXCYUR5u3IcjmT52ZfPK+hsor6eUZ3CwDeCvIvU9xX
 nMT6gmLDL76o7fRUCGUbmAW/FLNWBtOspnfmH1Tkg3+5++HmXXjND3w6la6ecS6S
 dzzcJOjCh24I542CuAuri8hPPm21Ioou5x5DNClBJ6UzpOBxBoog/jKma1wTPbGb
 qQPdbYf46vIBImTZsqJSTIPaVZQa0u0MoGclWwz1eoQuBhfzf40Z1YvzACczVgu1
 KJNl5+Sj2yjiM1X8Vy7MNI3qrPExePtgJBzpCwosiaFhnUt3mCMwWnLXl5jzvMLW
 gcjm4hqtbidTdenxV8FAw==
X-ME-Sender: <xms:DaesZUI1eH9miXGZZD6G69vEOqWHJuSAqacORia0d9oQUnd5O21JUQ>
 <xme:DaesZUIV1uIHbUtaIHb8SNhHyk6rLgk7H6BKPRXZnQ7LtjzwWcrfDp-3npQpxvYZM
 us5csQn43_oZ5o09DE>
X-ME-Received: <xmr:DaesZUuxeLjDApB0TOr8YbtmnfmllYMbYdgVOfQyu5yFfgXdIkwmLZUJKcyUa7EFZAJT>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekfedgjeekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke
 ertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu
 thhovhdruggvvheqnecuggftrfgrthhtvghrnhepgeeugeetffduvdejvedvleeliedtfe
 dtudfhfeefffejudekveejvdeffffgveegnecuvehluhhsthgvrhfuihiivgeptdenucfr
 rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:DaesZRZLtLoGzqSqrw5b0E79hsbPzfx9FFtGOAmOblGyyiAYdxDcYg>
 <xmx:DaesZbaAxQKisCX5gWR0s0LrdO01RHccbIgTddjsVQEBXInDNhm_6g>
 <xmx:DaesZdDtaZyawELeL_PBbW4TAeW37f9Lu4Yj4JMrKoUP0D1Kp8aspw>
 <xmx:DaesZcCM0Br9fDiSdZrp1R6I9yQEHn2Ijc-Ag5afB_7hl5fZ0eJl_w>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 21 Jan 2024 00:09:32 -0500 (EST)
Message-ID: <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
Date: Sun, 21 Jan 2024 07:09:31 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 18/01/2024 18:17, Jörg Bornemann wrote:
> Although I'm thinking by now that it might be more consistent to have a 
> separate project-recompile command in addition to
> recompile.

I've pushed to master a new command called that (commit 0a07603ae8d), 
like discussed on the mailing list.

Not sure if we should close this report now, or perhaps keep it open to 
discuss the security issue.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 21 Jan 2024 18:20:02 +0000
Resent-Message-ID: <handler.68570.B68570.17058611526307 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.17058611526307
          (code B ref 68570); Sun, 21 Jan 2024 18:20:02 +0000
Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 18:19:12 +0000
Received: from localhost ([127.0.0.1]:38973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRcPY-0001df-Hp
	for submit <at> debbugs.gnu.org; Sun, 21 Jan 2024 13:19:12 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:51015)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rRcPV-0001dQ-4S
 for 68570 <at> debbugs.gnu.org; Sun, 21 Jan 2024 13:19:11 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 5718720002;
 Sun, 21 Jan 2024 18:18:57 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN> (Dmitry Gutov's
 message of "Sun, 21 Jan 2024 07:09:31 +0200")
Organization: LINKOV.NET
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
Date: Sun, 21 Jan 2024 20:18:44 +0200
Message-ID: <86il3m1zi7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Although I'm thinking by now that it might be more consistent to have
>> a separate project-recompile command in addition to
>> recompile.
>
> I've pushed to master a new command called that (commit 0a07603ae8d), like
> discussed on the mailing list.

Shouldn't now 'g' in project buffers use 'project-recompile'?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 21 Jan 2024 18:34:01 +0000
Resent-Message-ID: <handler.68570.B68570.17058619957822 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.17058619957822
          (code B ref 68570); Sun, 21 Jan 2024 18:34:01 +0000
Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 18:33:15 +0000
Received: from localhost ([127.0.0.1]:39013 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRcd8-000226-Ta
	for submit <at> debbugs.gnu.org; Sun, 21 Jan 2024 13:33:15 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53733)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rRcd6-00021r-DQ
 for 68570 <at> debbugs.gnu.org; Sun, 21 Jan 2024 13:33:13 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 4957E5C0095;
 Sun, 21 Jan 2024 13:33:03 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute3.internal (MEProxy); Sun, 21 Jan 2024 13:33:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :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=1705861983;
 x=1705948383; bh=JPSUl77XEE99dvdiQloE1RO9FHBGV+N4/MbDHGJUCDY=; b=
 mKyxd9Uf2VboFqCPk8QNlwrtN0aZFBqZBK7DJtHUuVvMd16W0QjLI+iEJQbUtPxK
 YpVJ4odU/5xx1hilOy9CR5Vti0bp5f/yV75d51tidhCNGkPZCrq4YpB31ai96eIF
 sZ9dIPsrKm5upwfQXl6hQcuE9QFJGhsC515GyjsTdCKHfzNz2Zb5dgkWGU0Z9k/s
 zGVE7+Pr1rAtKnTmd5LW78UuCgre7ytXPR4lsdOC/mnCQRNIATmyKgOND1RJRZeD
 GFvxSHAJDY9NtzWHuEIaifPR2t2Zzn7mkIwXq5uf7qEiDOWxN/QybNrcF4Y2gUKp
 B8XxmZVyKLCwTXjO79s9wA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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=1705861983; x=
 1705948383; bh=JPSUl77XEE99dvdiQloE1RO9FHBGV+N4/MbDHGJUCDY=; b=I
 PKdwUU6Ffk8QJh1RKh/yxwCxCYj1dD+LwjMBnHXgyAxsbbOzxv+b0MdCGoY7BxH7
 MvF2ouwNTUBCNvhfHs059/RFTQQt0LCqZX/yiblpu36okzj6JHHc8PdcKAkoz0uS
 XfCns3g57HqNPlYDYkwHiOKrJ+lrVlj/aEXSrJLSrzE9gtqwYOPKYEUWFj0WOgH/
 awtdnnA0frlDgQSzOLHs39HvqWpyrabN2Q4U6VTj/GHT9IqXvX6Tm0kdmnPbD/WE
 LjLQHl+60p4A/xfNmNHos9XHWrQfFgy6yYQ1cjHpCRFoaM+evPWgxsJDCNXaNoVm
 yaIKBahTuBjgeNGPdnB2Q==
X-ME-Sender: <xms:X2OtZcGzAE2WCeDM7oD4E6AUxDdkAlk1Z1sVCtkxcGIn29WD7qJF5Q>
 <xme:X2OtZVULrsab0SahHioUxr76GnQzJmoQpqCimC1_tMRzvUeHlrXLmeA7DeUwJ7vRY
 Zmj_PCqA4SVEFcx050>
X-ME-Received: <xmr:X2OtZWKJBRa8NScG8P277JHAd8xTDgOcdqqHzD-IT_RqI_9cG_YJXRa0vS4dEfa6A45d>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekgedgudduvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveeg
 udejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:X2OtZeH2BEEzl1u97-j0xX7dZAtaJvq8gggWYnCRv13I3OJ8tLxadA>
 <xmx:X2OtZSUImxY_yEiIYz1auHceIvpuAETU3aWIyeFmFj3Z-42mntZKYw>
 <xmx:X2OtZRNSVgKhFScrFPW1vuy42BxIXqYciy6wSuErUXYu4PrgjE5DAg>
 <xmx:X2OtZVed1f83H1myeTkgmwDfcE6vJPslN2wQ6UriigelTgqbDM8T7A>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 21 Jan 2024 13:33:02 -0500 (EST)
Message-ID: <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
Date: Sun, 21 Jan 2024 20:33:00 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86il3m1zi7.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 21/01/2024 20:18, Juri Linkov wrote:
>>> Although I'm thinking by now that it might be more consistent to have
>>> a separate project-recompile command in addition to
>>> recompile.
>> I've pushed to master a new command called that (commit 0a07603ae8d), like
>> discussed on the mailing list.
> Shouldn't now 'g' in project buffers use 'project-recompile'?

I don't know if it should - AFAICS 'M-x recompile' doesn't rename the 
current buffer, so it seems like the current behavior is already correct.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Jan 2024 07:56:02 +0000
Resent-Message-ID: <handler.68570.B68570.170591014719235 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170591014719235
          (code B ref 68570); Mon, 22 Jan 2024 07:56:02 +0000
Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 07:55:47 +0000
Received: from localhost ([127.0.0.1]:39818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRp9n-00050B-5M
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2024 02:55:47 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:37741)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rRp9k-0004zr-Ov
 for 68570 <at> debbugs.gnu.org; Mon, 22 Jan 2024 02:55:45 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id CD3F12000F;
 Mon, 22 Jan 2024 07:55:33 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN> (Dmitry Gutov's
 message of "Sun, 21 Jan 2024 20:33:00 +0200")
Organization: LINKOV.NET
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
Date: Mon, 22 Jan 2024 09:31:22 +0200
Message-ID: <86fryp7ubp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>> Although I'm thinking by now that it might be more consistent to have
>>>> a separate project-recompile command in addition to
>>>> recompile.
>>> I've pushed to master a new command called that (commit 0a07603ae8d), like
>>> discussed on the mailing list.
>> Shouldn't now 'g' in project buffers use 'project-recompile'?
>
> I don't know if it should - AFAICS 'M-x recompile' doesn't rename the
> current buffer, so it seems like the current behavior is already correct.

This patch would allow 'recompile' to use the renamed project compilation buffer:

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index ab4504fa027..58bf2401dac 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1395,7 +1395,10 @@ project-compile
         (compilation-buffer-name-function
          (or project-compilation-buffer-name-function
              compilation-buffer-name-function)))
-    (call-interactively #'compile)))
+    (with-current-buffer (call-interactively #'compile)
+      (when project-compilation-buffer-name-function
+        (setq-local compilation-buffer-name-function
+                    project-compilation-buffer-name-function)))))
 
 (defun project-recompile (&optional edit-command)
   "Run `recompile' with appropriate buffer."

Then 'project-recompile' won't be needed anymore.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Jan 2024 09:44:01 +0000
Resent-Message-ID: <handler.68570.B68570.170591658830338 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170591658830338
          (code B ref 68570); Mon, 22 Jan 2024 09:44:01 +0000
Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 09:43:08 +0000
Received: from localhost ([127.0.0.1]:39891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRqpc-0007tA-9i
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2024 04:43:08 -0500
Received: from ms-10.1blu.de ([178.254.4.101]:50796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <foss@HIDDEN>) id 1rRpqB-0006CV-0r
 for 68570 <at> debbugs.gnu.org; Mon, 22 Jan 2024 03:39:36 -0500
Received: from [79.242.69.12] (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 <foss@HIDDEN>) id 1rRpq5-003GdO-BI;
 Mon, 22 Jan 2024 09:39:29 +0100
Message-ID: <ea257886-9167-4a56-bb2a-9734c0ddd6b8@HIDDEN>
Date: Mon, 22 Jan 2024 09:39:29 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
In-Reply-To: <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Con-Id: 36794
X-Con-U: 0-jb
X-Originating-IP: 79.242.69.12
X-Spam-Score: -0.0 (/)
X-Mailman-Approved-At: Mon, 22 Jan 2024 04:43:02 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 1/21/24 06:09, Dmitry Gutov wrote:

> I've pushed to master a new command called that (commit 0a07603ae8d), 
> like discussed on the mailing list.

Thanks!

> Not sure if we should close this report now, or perhaps keep it open to 
> discuss the security issue.

What security concerns do you have?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Jan 2024 09:44:02 +0000
Resent-Message-ID: <handler.68570.B68570.170591658930345 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
Cc: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170591658930345
          (code B ref 68570); Mon, 22 Jan 2024 09:44:02 +0000
Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 09:43:09 +0000
Received: from localhost ([127.0.0.1]:39893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRqpg-0007tM-PU
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2024 04:43:09 -0500
Received: from ms-10.1blu.de ([178.254.4.101]:49090)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <foss@HIDDEN>) id 1rRptS-0006HX-7O
 for 68570 <at> debbugs.gnu.org; Mon, 22 Jan 2024 03:42:58 -0500
Received: from [79.242.69.12] (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 <foss@HIDDEN>) id 1rRptN-003KKF-9u;
 Mon, 22 Jan 2024 09:42:53 +0100
Message-ID: <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
Date: Mon, 22 Jan 2024 09:42:53 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
In-Reply-To: <86fryp7ubp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Con-Id: 36794
X-Con-U: 0-jb
X-Originating-IP: 79.242.69.12
X-Spam-Score: -0.0 (/)
X-Mailman-Approved-At: Mon, 22 Jan 2024 04:43:02 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 1/22/24 08:31, Juri Linkov wrote:

> This patch would allow 'recompile' to use the renamed project compilation buffer:
> 
[...]
> 
> Then 'project-recompile' won't be needed anymore.

IIUC that sets `compilation-buffer-name-function' in the buffer that was 
active when you ran `project-compile'.  If you run `recompile' in 
another buffer of the project then `recompile' won't re-use the 
`project-compile' buffer.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Jan 2024 18:21:02 +0000
Resent-Message-ID: <handler.68570.B68570.170594763312948 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170594763312948
          (code B ref 68570); Mon, 22 Jan 2024 18:21:02 +0000
Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 18:20:33 +0000
Received: from localhost ([127.0.0.1]:41757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRyuO-0003Mm-Uo
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2024 13:20:33 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rRyuJ-0003MT-5a
 for 68570 <at> debbugs.gnu.org; Mon, 22 Jan 2024 13:20:31 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 615065C01BA;
 Mon, 22 Jan 2024 13:20:17 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute3.internal (MEProxy); Mon, 22 Jan 2024 13:20:17 -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=1705947617;
 x=1706034017; bh=kyFjGDoQy9bjQm2Y0Nm+1bSlRA5D7zrLtOyofgBNZI0=; b=
 Tp68y/FgZhvubkLHI0ltMMSxMr2xBGYZZRvSJWmBI3V1p0+N9UXfQOZTXv8Aehl4
 dYzTMxCFW/Z6Mo7D9NRgCMwc4lAK2AX1gELEdEXhYkD7eP32lCI4IBhfcoVSqIGV
 fTDnnH6bJtvFydt+qSdWqExiNR+M4/z7wLt+inmBxPax+9H190mSpnfphKCVEa+M
 yRAxhnrsywbpFoRMoYqFdo6jCUSbbie3uoDjjJYPqUC1X+vAGt7AeaaU7UkRVFYS
 pa1Rl8qa4UGSttVd+asRGm6yTuuvEz8Ygc9FedbW3tgGLEJ9l8y5CS9/lpGspWre
 Uj/gBFdodYUZdC9T4wjhmQ==
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=1705947617; x=
 1706034017; bh=kyFjGDoQy9bjQm2Y0Nm+1bSlRA5D7zrLtOyofgBNZI0=; b=T
 ksic/2eUm+uMbKvxWNp+Qtqotya/Ms6eQvllrePyWZ6k7UeSMMo+8HhFTpX+zZEz
 hJkgEGamBPlqnvo1hqlY2awCfq4CKqX8dKzi5fAnlcLBPXJS0HhcX9bR1aJVTW8l
 4dll2YS+9j3E9l57xQc89aLVD+zV0ihJQ+9dPwaYkiHfKv2RGE5wo3HxPqo3qNdH
 dyF3SpgodbGnuH/Ob1VNuFc+L5sjWOtO8nzKxqzRFNbLtid5EQL/YLEzbRAVVnTN
 u+8O09xADYRLWuM8T9eYnHCn+GNyg0pN5IEpfBww835aNrfLaTv4VKoRALy7KqzL
 3RuFzujqgnqt94pEC0c3A==
X-ME-Sender: <xms:4LGuZdVxvZvYObFx5T6JZQCHMpcCg7Z3so6MaKCpfdPIqOyTd9f4Aw>
 <xme:4LGuZdnxQHKpTW1LL6AqbFpjsBbBOgJEGV_gxaYvRQ4g94nIlDHZhUIzJ7DmPJCFr
 ydcUgUKLLtal-1vok0>
X-ME-Received: <xmr:4LGuZZZHXBiUQlWB2lI5DLiZrnbznyUocrWqfboFaa-SEFvSf6suQRcKOQgRX0Jiyndn>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekiedguddutdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth
 ekredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg
 uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeeifffguefhheetieehtddtveejud
 ffteetleehgfelhefhteeuleekieeiveffudenucffohhmrghinhepghhnuhdrohhrghen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhith
 hrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:4LGuZQWrxp67VflJpo-rnRvIHseU3grvew56oV9E6GMTOzqJSb52GA>
 <xmx:4LGuZXkTHVOCANyF-kL82EL4Pg1hupi31RqeDmMVx-CIbJx5dIXxSg>
 <xmx:4LGuZdecUuUiEpZQyyDrTUbsvwnKB2Nb4SKimr6JUEgC4fEBQqZEJA>
 <xmx:4bGuZWuBVh8Z-zQwh6roGfKluVXMnod8Zf8RnjE6tt92HHy5dwN-sQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 22 Jan 2024 13:20:15 -0500 (EST)
Message-ID: <1b65ffc8-7497-4ef2-aa8e-013c63565e4c@HIDDEN>
Date: Mon, 22 Jan 2024 20:20:13 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <ea257886-9167-4a56-bb2a-9734c0ddd6b8@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ea257886-9167-4a56-bb2a-9734c0ddd6b8@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 22/01/2024 10:39, Jörg Bornemann wrote:
>> Not sure if we should close this report now, or perhaps keep it open 
>> to discuss the security issue.
> 
> What security concerns do you have?

The one mentioned by Penji Zhang in 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68570#8

I suppose he didn't Cc you, so you didn't see the message.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Jan 2024 18:21:03 +0000
Resent-Message-ID: <handler.68570.B68570.170594764912981 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, Juri Linkov <juri@HIDDEN>
Cc: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170594764912981
          (code B ref 68570); Mon, 22 Jan 2024 18:21:03 +0000
Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 18:20:49 +0000
Received: from localhost ([127.0.0.1]:41761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rRyuf-0003NJ-9v
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2024 13:20:49 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43143)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rRyud-0003N6-BT
 for 68570 <at> debbugs.gnu.org; Mon, 22 Jan 2024 13:20:48 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 051005C01AD;
 Mon, 22 Jan 2024 13:20:38 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 22 Jan 2024 13:20:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :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=1705947638;
 x=1706034038; bh=4zLsHCD2X4cKhcxv7eBfM6gD5tZhQ9FJS6u4EPEZe1k=; b=
 dePFssI4+Y+WEjzaWc2zhjnxPuW+sjd5qmpzERR0m8Klhf0n7L+LIdu1RuTAZJHS
 Q7gvSZP5eQIjwwfv9YqaBH5Wvtk22smw7sDr4t50JkdP1HJQnXch4vrcNigD3Ewy
 8QsOP12x6Byb+0HK9pv5xMwBU6U4thfML5hYqOzuhtzIUVPjJd1eoaX4Tw3s1ZGH
 sJC14d6/vcFwrMd7WUFf51LxqZF7qKDz4AbEnMIlDIfx94pRxBwGBtRm8ZAb69I4
 aBBe1dyArlRPEPNovDr5oRtLl+11oLArKjDc937WDW7+edli3ViZFQSgAnBF4UOd
 jpUIhFNLa1qW7yhPMnj/nA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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=1705947638; x=
 1706034038; bh=4zLsHCD2X4cKhcxv7eBfM6gD5tZhQ9FJS6u4EPEZe1k=; b=O
 tbcOab/zCU59/oCN6cotaxkWpIA8DV0rW+t0vTPqAt7xuzMAiFevnz96iuZu7GCo
 fL+2ieoEUKpdc1K3IT+hfI8zJylNuX20tNVHoM0r6aCH9Xh62qWeQywUznHWIukE
 8bxIUcyYfrLkqkP3gOreX5i3LnsPGvWh8W/sIOz7BpR+dDlya7U3yhl+xXKUrGRL
 io0Qm5GQdYzybS1949YVMUUzSbBWPJkcyVPHNCRhTf71112/InXwIbu5v9ImR4AW
 36/U3EA6Mr9JQ1UKb0QESJhibJlzroTrVg9/+5ZH115AsXNem/GNSuf1ppImWjsv
 KS38RmA5lbxbOUN0Sw1WA==
X-ME-Sender: <xms:9bGuZbgbP95CHfaU-N3e1nRuq16derHkS7Fh43wBhxsq0Z7f6K1Elw>
 <xme:9bGuZYA5XLkrv2qCz912scjOWgaFd127g-4VJemjKnc_FxIi5LcZjOIUzxfywlxpe
 Q5VjHIy6abSGDiH-Ug>
X-ME-Received: <xmr:9bGuZbHTTcHdiy-Gq4g5LHoZ2gjjehIAo4CvFuyEmZEdsmAnhcwpA7aZYYfTlawfUn-S>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekiedguddutdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheff
 ueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:9bGuZYSUYySx4TYCe0SZMWq6wsplIg4UYw6gptzyKTwJJm0M9QbnZQ>
 <xmx:9bGuZYyYyJMivWCyG8R8cOgfQzzHYOphqVFgOAk8pXHS-8efQR6bow>
 <xmx:9bGuZe5Xba9JrDWlbbKxWCRfv8gnEvRjCsWBzYnBdszGM_bgLFHkmQ>
 <xmx:9rGuZVosfxg7fArcNZkmTlEX9-K3PCFEn7JKqzxlai-29QQ2BHr06g>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 22 Jan 2024 13:20:36 -0500 (EST)
Message-ID: <0316c445-5539-43a1-88a8-530714f0f133@HIDDEN>
Date: Mon, 22 Jan 2024 20:20:36 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 22/01/2024 10:42, Jörg Bornemann wrote:
> On 1/22/24 08:31, Juri Linkov wrote:
> 
>> This patch would allow 'recompile' to use the renamed project 
>> compilation buffer:
>>
> [...]
>>
>> Then 'project-recompile' won't be needed anymore.
> 
> IIUC that sets `compilation-buffer-name-function' in the buffer that was 
> active when you ran `project-compile'.  If you run `recompile' in 
> another buffer of the project then `recompile' won't re-use the 
> `project-compile' buffer.

Yes, that doesn't sound optimal.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Jan 2024 07:11:02 +0000
Resent-Message-ID: <handler.68570.B68570.170599380427862 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170599380427862
          (code B ref 68570); Tue, 23 Jan 2024 07:11:02 +0000
Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 07:10:04 +0000
Received: from localhost ([127.0.0.1]:42116 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSAv6-0007FK-10
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2024 02:10:04 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:55771)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rSAv2-0007EG-1T
 for 68570 <at> debbugs.gnu.org; Tue, 23 Jan 2024 02:10:01 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 0BE561C0002;
 Tue, 23 Jan 2024 07:09:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 ("=?UTF-8?Q?J=C3=B6rg?=
 Bornemann"'s message of "Mon, 22 Jan 2024 09:42:53 +0100")
Organization: LINKOV.NET
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
Date: Tue, 23 Jan 2024 09:09:28 +0200
Message-ID: <867ck0leif.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> This patch would allow 'recompile' to use the renamed project compilation buffer:
>>
> [...]
>> Then 'project-recompile' won't be needed anymore.
>
> IIUC that sets `compilation-buffer-name-function' in the buffer that was
> active when you ran `project-compile'.  If you run `recompile' in another
> buffer of the project then `recompile' won't re-use the `project-compile'
> buffer.

Recompiling from a non-compilation buffer has security concerns.

The patch that I proposed above is intended only for
recompiling from a compilation buffer.  It sets
`compilation-buffer-name-function' in the compilation buffer.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Jan 2024 12:23:02 +0000
Resent-Message-ID: <handler.68570.B68570.17060125246918 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>, =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Cc: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.17060125246918
          (code B ref 68570); Tue, 23 Jan 2024 12:23:02 +0000
Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 12:22:04 +0000
Received: from localhost ([127.0.0.1]:42387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSFn1-0001nU-TF
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2024 07:22:04 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rSFn0-0001mw-5z
 for 68570 <at> debbugs.gnu.org; Tue, 23 Jan 2024 07:22:02 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.nyi.internal (Postfix) with ESMTP id 0DA385C014B;
 Tue, 23 Jan 2024 07:21:52 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Tue, 23 Jan 2024 07:21:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :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=fm2; t=1706012512;
 x=1706098912; bh=QT+6PAMEe+Y1nmHc0FuG4O4/LU+TrJgXRqG+73yUf2c=; b=
 bWUP3EV5LHbi08S/qD34rBAoAv+jErsBxBqseQxO8RTw08aMwEXC7fxwHrL7ipit
 bTOuQXeFKDIjMkPddjqcPeg09ixm8ekNFEjrWLV4VOM3rP1JdeLFNGZ1/nni7VoK
 vWeTeKs5UnuAGFcAKfmOLMMOPOTJRbsgfTzRML/no8lW0LGFSYn5m071xsh/0kXP
 YYoBzAEQIP5uolad3jV4P2rS+X//zf3qiYM/8AuLfxrANAC6t3SMjUIv831cNoFm
 kE4zUsYpGCPqz59ZLDY8wbnNBc3HvUl6h09VU4kbh04xjAcegubUG5NEHSHBjYiQ
 h0oVQGyU6Xz6xlLhyEaxMg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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=1706012512; x=
 1706098912; bh=QT+6PAMEe+Y1nmHc0FuG4O4/LU+TrJgXRqG+73yUf2c=; b=S
 y0uJXNXk1Vn+V/MjrZDRTCrPNz3c1G7+dDLAyGBg4d49JE58bxDgNjdfRUJSxnJi
 tQjoOEu9SfZGOsRLMUky59BPVVY8HyDWLaacUoGpX2Su/wKjAWB0kmGHQzVRIiPe
 mcb47l5XhRRO54vPIeF+d6b5QtTvJN06b2uRy/2etSqluM3uaVfY1PRpkMuv/rwu
 c/ODmtx9fFk+7JZLIr+5IheCu4KW1I0ozrHHX0UUepmPAGZheodzGaPFiUGHUf2C
 WkK7sy9y8aRWSAKfxUVV7h6T/z+Cl3JCCkFqws97xc0X0v+Je76CTg8CKYiosRwl
 U2zoltr+ovarELfgDtO+g==
X-ME-Sender: <xms:X6-vZX47evpy7i7JiGqY4OiLJHDpYTJBeF8szRLqF-YjY0R1vcDcSg>
 <xme:X6-vZc6knNuC3Z7v6OJcdJQy9p3ZHUjG_OQR-cw6-Pnb8iV1nOVWEWEimPAKo1np0
 Knlb5w9AwXWfeUjy1k>
X-ME-Received: <xmr:X6-vZeeXC8fO8k4t_WIpvLlu_WI8BPEbMFHP1brLiDFH7mLZ1mffvzJxNPOVbhaHsUOx>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekkedgfeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:X6-vZYKjQMoMiiilQJf_orAnLhO2L4jb7tEXDpOvgtsX7NKfLdT1bQ>
 <xmx:X6-vZbIuiOQEhB71m9erqEiGrtHXY1MfZWu7quPx7_AezrQDI3ZbRQ>
 <xmx:X6-vZRxq7pBPX7r2nGBLVtHCvU9GhvWwdgyuOPQxM1xuLMnSuaxoKQ>
 <xmx:YK-vZRjdA7MKUy6YS5IXFmZo-k5zbqAWrSiCxehOz4ofrqjD8TSVww>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 23 Jan 2024 07:21:50 -0500 (EST)
Message-ID: <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
Date: Tue, 23 Jan 2024 14:21:50 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <867ck0leif.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 23/01/2024 09:09, Juri Linkov wrote:
>>> This patch would allow 'recompile' to use the renamed project compilation buffer:
>>>
>> [...]
>>> Then 'project-recompile' won't be needed anymore.
>> IIUC that sets `compilation-buffer-name-function' in the buffer that was
>> active when you ran `project-compile'.  If you run `recompile' in another
>> buffer of the project then `recompile' won't re-use the `project-compile'
>> buffer.
> Recompiling from a non-compilation buffer has security concerns.
> 
> The patch that I proposed above is intended only for
> recompiling from a compilation buffer.  It sets
> `compilation-buffer-name-function' in the compilation buffer.

I think it behaves correctly inside the compilation buffer already? At 
least it did when I tested.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Jan 2024 14:47:01 +0000
Resent-Message-ID: <handler.68570.B68570.1706021174807 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
Cc: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.1706021174807
          (code B ref 68570); Tue, 23 Jan 2024 14:47:01 +0000
Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 14:46:14 +0000
Received: from localhost ([127.0.0.1]:42559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSI2U-0000Cs-OH
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2024 09:46:14 -0500
Received: from ms-10.1blu.de ([178.254.4.101]:58244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <foss@HIDDEN>) id 1rSGcx-000621-TZ
 for 68570 <at> debbugs.gnu.org; Tue, 23 Jan 2024 08:15:44 -0500
Received: from [62.220.2.194] (helo=[10.9.78.72])
 by ms-10.1blu.de with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
 (envelope-from <foss@HIDDEN>) id 1rSGcr-00BCsg-8p;
 Tue, 23 Jan 2024 14:15:37 +0100
Message-ID: <ab32c28a-71b1-49c2-b9e1-a35931817551@HIDDEN>
Date: Tue, 23 Jan 2024 14:15:36 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US, de-DE
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
 <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
From: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>
In-Reply-To: <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Con-Id: 36794
X-Con-U: 0-foss
X-Originating-IP: 62.220.2.194
X-Spam-Score: -0.0 (/)
X-Mailman-Approved-At: Tue, 23 Jan 2024 09:46:09 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 1/23/24 13:21, Dmitry Gutov wrote:

>> The patch that I proposed above is intended only for
>> recompiling from a compilation buffer.  It sets
>> `compilation-buffer-name-function' in the compilation buffer.
> 
> I think it behaves correctly inside the compilation buffer already? At 
> least it did when I tested.

Yes.  I can confirm that pressing g in a compilation buffer that's named 
by project-compilation-name-buffer-function is already working correctly.

After reading Pengji's security concern (thanks Dmitry for pointing me 
to it) I also think that it would be more favorable to let recompile 
re-use a compilation buffer.  That would indeed make project-recompile 
superfluous.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Jan 2024 17:33:01 +0000
Resent-Message-ID: <handler.68570.B68570.170603113120732 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, Juri Linkov <juri@HIDDEN>
Cc: 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170603113120732
          (code B ref 68570); Tue, 23 Jan 2024 17:33:01 +0000
Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 17:32:11 +0000
Received: from localhost ([127.0.0.1]:43955 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSKd9-0005OK-48
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2024 12:32:11 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55411)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rSKd7-0005O7-J4
 for 68570 <at> debbugs.gnu.org; Tue, 23 Jan 2024 12:32:10 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailout.nyi.internal (Postfix) with ESMTP id 30E9D5C0102;
 Tue, 23 Jan 2024 12:31:59 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Tue, 23 Jan 2024 12:31:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :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=fm2; t=1706031119;
 x=1706117519; bh=Blb7SJ1To4qu9TdDUo8UWumP32PXM4AhHEW72OAGN+M=; b=
 JH77+Q8SCJfTjGIpmuwtIxaxAYo+75sQrWExxcNR2onXCLXkEm3yWcuk0eZ7fm6K
 PLkIqq16fzfIiaXCiobJmUcaGSdA6PoW0jaLIwOYv43vm8JTiqIBU58+a8PmYPuV
 AuJQopmVJZMGNX/ElBsv87k99IOqKSl1QYS9bJoowngtxpwrvpOqFdrJXzlqePxP
 DNx/L31jBWArJ/oxfqPuNwhH1gQIOtpv1MiTt8hCVt3W5ZjkqbH+3bBnpDa1/S69
 u/jm22MujY27iWM0XC/5mjrqH5dc4+CNwZ8TsiJr6PO6jgfcfMpOTZa8g0aOPo1p
 doK5UcMcDZdUw6dyUoz/Hw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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=1706031119; x=
 1706117519; bh=Blb7SJ1To4qu9TdDUo8UWumP32PXM4AhHEW72OAGN+M=; b=A
 oDPRyCerJYFsZ5Gg5f+w4x5OLf9Dthh6Z67c8zbZHdPAQP5K/d4KSpcaQaobac/K
 ngH39uygfiDAWWzkrBDbM6QctS4AeFzWMFW2Q+LVTnLTOhM8pvIUJQoxGchHljkv
 GUYjgwGyFjegUWS8KXw08gyyUpuF1Fn2ZHXVekpbrh8AV7shoXDrldnzTynoSldI
 +ICxY5Y1Ct8kOWHmx+LHJ0Ah0YeWEQ66DaZ9+Vu4dVkE9+oZzYUir6+7vokvPrsr
 qsAVyLsFV5pGT2sHYCqlilVMiB4ERzyRe3BqUNX27V7uqhfPeSyBds5oqJZHPt9N
 MIt0tAdyE6xv7xS57MVDg==
X-ME-Sender: <xms:DvivZWRgUp5I_6ZyvUrC3Fq403Vl8lc4fWgepGhsces4-bAH89SuHQ>
 <xme:DvivZbz-0kctRpm33N4O5JLNyXUBSEY1NM3JPmu8I0mxppdo_IzKnMCypz7gdZxBQ
 uoElG1KL6DgWjsHzSc>
X-ME-Received: <xmr:DvivZT22Y_q6QCfKpT8lnSD-xXP9Nn0Moes7S1ooP214LjVLRmnKs2kFBiw9vUGbeGdJ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekkedguddttdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheff
 ueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:DvivZSDSTl3UqNRofVVl25imaYrl7hLJRM0QeqJNF0d5rfaIq6jSRg>
 <xmx:DvivZfj7Gz1rJonrPJCUVmWC0-0O5dM8BFVh8hLQenDw4oUkdSoiXw>
 <xmx:DvivZeq00QKblYjxmQWAkO8ZWj39IAeaymuhujv3b5eJh-zyBsw-gw>
 <xmx:D_ivZXYBolWCxPzvD0BbajUbi1c0cCxdCFTKUwhGJmVFQrLfiJK-Og>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 23 Jan 2024 12:31:57 -0500 (EST)
Message-ID: <b0afe005-5c63-4731-80cd-f546d9dd08cd@HIDDEN>
Date: Tue, 23 Jan 2024 19:31:55 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
 <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
 <ab32c28a-71b1-49c2-b9e1-a35931817551@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ab32c28a-71b1-49c2-b9e1-a35931817551@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 23/01/2024 15:15, Jörg Bornemann wrote:
> After reading Pengji's security concern (thanks Dmitry for pointing me 
> to it) I also think that it would be more favorable to let recompile 
> re-use a compilation buffer.  That would indeed make project-recompile 
> superfluous.

I don't know if it would: the compilation buffer might not be the only 
one - or the existing one might not belong to the current project.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Jan 2024 08:02:02 +0000
Resent-Message-ID: <handler.68570.B68570.170608328425694 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170608328425694
          (code B ref 68570); Wed, 24 Jan 2024 08:02:02 +0000
Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 08:01:24 +0000
Received: from localhost ([127.0.0.1]:44383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSYCJ-0006gL-TH
	for submit <at> debbugs.gnu.org; Wed, 24 Jan 2024 03:01:24 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:49721)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rSYCH-0006g5-My
 for 68570 <at> debbugs.gnu.org; Wed, 24 Jan 2024 03:01:22 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 62830FF808;
 Wed, 24 Jan 2024 08:01:09 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN> (Dmitry Gutov's
 message of "Tue, 23 Jan 2024 14:21:50 +0200")
Organization: LINKOV.NET
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
 <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
Date: Wed, 24 Jan 2024 09:46:51 +0200
Message-ID: <86bk9b6vu4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Recompiling from a non-compilation buffer has security concerns.
>> The patch that I proposed above is intended only for
>> recompiling from a compilation buffer.  It sets
>> `compilation-buffer-name-function' in the compilation buffer.
>
> I think it behaves correctly inside the compilation buffer already? At
> least it did when I tested.

Sorry, I didn't show my compilation function:

(setopt project-compilation-buffer-name-function
        (lambda (name-of-mode)
          (generate-new-buffer-name
           (project-prefixed-buffer-name name-of-mode))))

Currently 'g' doesn't create a new compilation buffer, because
'compilation--default-buffer-name' just reuses the current buffer.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Jan 2024 12:08:01 +0000
Resent-Message-ID: <handler.68570.B68570.170609803630843 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170609803630843
          (code B ref 68570); Wed, 24 Jan 2024 12:08:01 +0000
Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 12:07:16 +0000
Received: from localhost ([127.0.0.1]:44661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSc2G-00081O-9y
	for submit <at> debbugs.gnu.org; Wed, 24 Jan 2024 07:07:16 -0500
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:33205)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rSc2D-000819-Vj
 for 68570 <at> debbugs.gnu.org; Wed, 24 Jan 2024 07:07:15 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.west.internal (Postfix) with ESMTP id 5A1AA3200A06;
 Wed, 24 Jan 2024 07:07:02 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Wed, 24 Jan 2024 07:07:02 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :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=fm2; t=1706098021;
 x=1706184421; bh=yiZQBfaM+nJfJxff6fUHeBYEtgsnxYejh9XjXK1FZKU=; b=
 Z2b5b0CdAXYY2RwTwQflDSEk188G0xr7MNiNrubsypFNDM67OergzfU1GDL8lBCu
 ax4pa3RHbGm86JgDfTs0BHXLlHqyowuxPHbJsswz2aHSf8LUCbKtYqayqNDaWZBu
 nsfhMouG775oH0Y28nqmYrdDq/7IYDfwJBwNwdiHjP2PGuzr9KyIzEt0iW8+qgRN
 o5CzN5WZ0ETB9kjMinEYb8XFahwDPk2K+dWHVR8XaOeVb/vAfiyvAR/9Orh3TlmF
 tRkih8JT825Dpd8w8OusKLnj3pUul0SIUs1A5Af6XTEOWYZmiwq6qHddLi1kiX4x
 rXA1LGmWSfY355t7YtN3dw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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=1706098021; x=
 1706184421; bh=yiZQBfaM+nJfJxff6fUHeBYEtgsnxYejh9XjXK1FZKU=; b=o
 iiYBCeQkRxPb4DFX+yS3SkbxX0VbElkgccerzcTReIz3nsON3iX/FlcHx4660qm3
 UM2FFJBOqIvTTVqNB17k3KBlWvu1JMzXQWDmSpmfWSJzayoalPTiN1vLvsdaU9r2
 SmrROfDhV+1wNsdB4NMZE6O5apDj4UWf+vzYubKH5v5A/o0loAjDhd02s9sopr6v
 dopVjjasyPDYnvHhQbEKLKTso0uxPn7YO7YgP/Kt3ViFZWPAgWZYRyBxjOJkSHR/
 J+yNoJLXFEjTk4ljeWlnzr1gBtn9m3/dUmRjQ3Pu4+1zs15GSGpAWYdr5p/ryJHN
 zbc0PGs4VDYz+schLke1A==
X-ME-Sender: <xms:Zf2wZeMMl_Q5zbD5ppoKf6BpX6QiWASUb02yAdUkKjaHr1wUYLjM3w>
 <xme:Zf2wZc-KHt3835JcWot-f1da4dgwgzs4gx_sFKUO1SeRr4nAY15VKzEzE0RrQP89c
 QxxRV3qKQCQ2McfrFc>
X-ME-Received: <xmr:Zf2wZVRs6wY_1YXPRHgakqOM2hOAhqPvBhY_N9Jer-XOTCaarQvRwGo5XdNkWsDqBbQf>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeluddgfeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:Zf2wZesD5G8HBZ9LHN6_gtI5nAJA9u3aI3-KDqZm2wJpHipu-tz44w>
 <xmx:Zf2wZWeRgiLHiQMRzNdlMCYGTPEAvnZ0diR9YQXBdQmfiZaCe8rWYA>
 <xmx:Zf2wZS0PFd4X9uO0LsoixTmHrTE_cNlM0uB8ckZgW9-tN3CMq-cURQ>
 <xmx:Zf2wZaGBIax7tDJLLhx98d9v5gvVrZXHxl9RvRs01Z-BFdTwpVuRPA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 24 Jan 2024 07:07:00 -0500 (EST)
Message-ID: <fe9d05b3-7e92-43a3-a949-2ea9c8e32454@HIDDEN>
Date: Wed, 24 Jan 2024 14:06:57 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
 <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
 <86bk9b6vu4.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86bk9b6vu4.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 24/01/2024 09:46, Juri Linkov wrote:
>>> Recompiling from a non-compilation buffer has security concerns.
>>> The patch that I proposed above is intended only for
>>> recompiling from a compilation buffer.  It sets
>>> `compilation-buffer-name-function' in the compilation buffer.
>> I think it behaves correctly inside the compilation buffer already? At
>> least it did when I tested.
> Sorry, I didn't show my compilation function:
> 
> (setopt project-compilation-buffer-name-function
>          (lambda (name-of-mode)
>            (generate-new-buffer-name
>             (project-prefixed-buffer-name name-of-mode))))
> 
> Currently 'g' doesn't create a new compilation buffer, because
> 'compilation--default-buffer-name' just reuses the current buffer.

Is that bad?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Jan 2024 17:14:01 +0000
Resent-Message-ID: <handler.68570.B68570.170611638811817 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68570
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: =?UTF-8?Q?J=C3=B6rg?= Bornemann <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
Received: via spool by 68570-submit <at> debbugs.gnu.org id=B68570.170611638811817
          (code B ref 68570); Wed, 24 Jan 2024 17:14:01 +0000
Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 17:13:08 +0000
Received: from localhost ([127.0.0.1]:46492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rSgoB-00034S-Ly
	for submit <at> debbugs.gnu.org; Wed, 24 Jan 2024 12:13:08 -0500
Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:57693)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rSgo6-00033r-6Y
 for 68570 <at> debbugs.gnu.org; Wed, 24 Jan 2024 12:13:02 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 0FB6C40004;
 Wed, 24 Jan 2024 17:12:44 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <fe9d05b3-7e92-43a3-a949-2ea9c8e32454@HIDDEN> (Dmitry Gutov's
 message of "Wed, 24 Jan 2024 14:06:57 +0200")
Organization: LINKOV.NET
References: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@HIDDEN>
 <320b09d1-2af4-4110-bdf3-94da122f3dd6@HIDDEN>
 <86il3m1zi7.fsf@HIDDEN>
 <60842df3-8a64-4bde-b6d6-f94b9a964a17@HIDDEN>
 <86fryp7ubp.fsf@HIDDEN>
 <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 <867ck0leif.fsf@HIDDEN>
 <0598898e-8e25-43b1-92c0-4596ad242ec8@HIDDEN>
 <86bk9b6vu4.fsf@HIDDEN>
 <fe9d05b3-7e92-43a3-a949-2ea9c8e32454@HIDDEN>
Date: Wed, 24 Jan 2024 19:11:35 +0200
Message-ID: <86o7da1ws8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>> Recompiling from a non-compilation buffer has security concerns.
>>>> The patch that I proposed above is intended only for
>>>> recompiling from a compilation buffer.  It sets
>>>> `compilation-buffer-name-function' in the compilation buffer.
>>> I think it behaves correctly inside the compilation buffer already? At
>>> least it did when I tested.
>> Sorry, I didn't show my compilation function:
>> (setopt project-compilation-buffer-name-function
>>          (lambda (name-of-mode)
>>            (generate-new-buffer-name
>>             (project-prefixed-buffer-name name-of-mode))))
>> Currently 'g' doesn't create a new compilation buffer, because
>> 'compilation--default-buffer-name' just reuses the current buffer.
>
> Is that bad?

It's very useful to always create a unique buffer for every compilation:
this allows keeping error messages from previous compilations.
I propose even to add such an option to the choice list in
project-compilation-buffer-name-function, e.g.:

(defcustom project-compilation-buffer-name-function nil
  :type '(choice (const :tag "Default" nil)
                 (const :tag "Prefixed with project name"
                        project-prefixed-buffer-name)
                 (const :tag "Prefixed and unique with project name"
                        project-prefixed-unique-buffer-name)
                 (function :tag "Custom function")))

The previous patch would be needed as well since currently
there is no way to allow unique project compilation buffers.





Last modified: Wed, 24 Jan 2024 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.