GNU bug report logs - #68570
29.1; recompile might not re-use project-compile's buffer

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jörg Bornemann <foss@HIDDEN>; dated Thu, 18 Jan 2024 16:58:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added indication that bug 68570 blocks68697 Request was from Sean Whitton <spwhitton@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 2 May 2024 07:12:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 03:12:26 2024
Received: from localhost ([127.0.0.1]:42011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2QcD-0001sV-QG
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 03:12:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45178)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s2QcC-0001sO-Aj
 for 68570 <at> debbugs.gnu.org; Thu, 02 May 2024 03:12:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s2Qbl-0002lX-6A; Thu, 02 May 2024 03:11:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=iezKbEnQanVLUog33v3ak/i+AVEjaWVywpu3FE0pcD0=; b=aRB5Xmq3eewE
 57F2voq47L/8gLWUo93NdMrtLuUvKBUMtG0nX5ubGQ0s6WRF3TnuuXF21O5SLJ8mLti9XChjLuWkP
 r2H8s6dqm6Lp/nKb8TlhFlUt5AsdzBitMLKFcwOA28RjI4LUsLSNjtjaito7g9sqAbLaQRef5dvD5
 /560IQcB3GHvCpVqTg2XcTWYmMB5sQGag6GHWYlCwCAh7TzrUp/UiV7dC09Bl/gxOzPvrOqZY+VVZ
 f1ftrdgpa9X2xCrWIGDxVE4nZU18Wb8ZXKX7GO+Pcjnf0oFF4UpHmUpyqMRFSr8MoJf9Ov1x5kiOr
 941uI9YWaqIWoickQL+0Gg==;
Date: Thu, 02 May 2024 10:11:53 +0300
Message-Id: <86sez0n0w6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86msp87nnz.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 02 May 2024 09:16:40 +0300)
Subject: Re: bug#68570: 29.1;
 recompile might not re-use project-compile's buffer
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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
 <86a5oqmzmp.fsf@HIDDEN>
 <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN>
 <86fry57ar4.fsf@HIDDEN>
 <153e53c0-1673-4eb4-9c31-2be677ca2f08@HIDDEN>
 <86msp87nnz.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68570
Cc: dmitry@HIDDEN, 68570 <at> debbugs.gnu.org
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: -3.3 (---)

> Cc: 68570 <at> debbugs.gnu.org
> From: Juri Linkov <juri@HIDDEN>
> Date: Thu, 02 May 2024 09:16:40 +0300
> 
> >>> We could make a new option in compile.el which would determine whether to
> >>> do this in general: when non-nil, 'compilation-start' would save the
> >>> current dynamic value of 'compilation-buffer-name-function', and
> >>> 'recompile' would call it again.
> >> A new option would be nice, but it's so broken that I don't know
> >> if it helps.  For example, 'M-x compile RET' in a compilation buffer
> >> doesn't prefill the minibuffer with the current compilation command,
> >> but uses the default command that makes no sense.
> >
> > If it did so (pre-filled the command), perhaps you would just use 'M-x
> > compile', in cases when you do want the new buffer to be created?
> >
> > But it seems to work fine to me, including in 'emacs -Q':
> >
> > * 'M-x compile', input 'ls', RET.
> > * *compilation* buffer create.
> > * 'M-x compile' again, in any window (old or new) - 'ls' is pre-filled as
> >  the input.
> 
> Sorry for the delay, I tried to fix it, but it's too much broken.
> Here is the test case for 'emacs -Q':
> 1. add such line to .dir-locals.el:
>   ((nil . ((compile-command . "ls -la"))))
> 2. M-x compile
> 3. confirm that it's "ls -la" indeed
> 4. edit the minibuffer, replace "ls -la" with e.g. "ls" and type RET
> 5. in *compilation* buffer again type: M-x compile
> 6. the minibuffer contains "make -k "

I'm not sure I agree that this makes no sense.  We have the
"M-x recompile" command for a reason.  "M-x compile" can be
used after running a compilation command once or more, and
it is not outlandish for "M-x compile" to return to the original
default value, to allow running more than a single compilation
conveniently, without too much editing in the minibuffer.

> PS: I realized now this is related to bug#70136
> where Augusto posted the patch that fixes this bug.

Re-reading the dir-locals each time a command is run might not
always make sense, IMO.

IOW, beware: these suggestions change the long-time behavior of
Emacs, so we should do that only very cautiously, and we shouldn't
be surprised if someone then comes back complaining that we broke
their muscle memory.  The notion that some behavior which makes no
sense to me or you or Augusto is necessarily a bug is IME
fundamentally flawed, since (as we all should know) most things in
Emacs are the result of careful thinking and moreover withstood
testing by many users for many years.  We may not always see the
logic behind the existing behavior, but we should always assume
there is some non-trivial logic.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 2 May 2024 06:19:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 02:19:39 2024
Received: from localhost ([127.0.0.1]:41759 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2Pn9-0004Dr-54
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 02:19:39 -0400
Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:55557)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1s2Pn6-0004DK-Uj
 for 68570 <at> debbugs.gnu.org; Thu, 02 May 2024 02:19:37 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id B971AE0008;
 Thu,  2 May 2024 06:19:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
In-Reply-To: <153e53c0-1673-4eb4-9c31-2be677ca2f08@HIDDEN> (Dmitry Gutov's
 message of "Wed, 7 Feb 2024 20:43:41 +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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
 <86a5oqmzmp.fsf@HIDDEN>
 <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN>
 <86fry57ar4.fsf@HIDDEN>
 <153e53c0-1673-4eb4-9c31-2be677ca2f08@HIDDEN>
Date: Thu, 02 May 2024 09:16:40 +0300
Message-ID: <86msp87nnz.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-Debbugs-Envelope-To: 68570
Cc: 68570 <at> debbugs.gnu.org
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 (-)

>>> We could make a new option in compile.el which would determine whether to
>>> do this in general: when non-nil, 'compilation-start' would save the
>>> current dynamic value of 'compilation-buffer-name-function', and
>>> 'recompile' would call it again.
>> A new option would be nice, but it's so broken that I don't know
>> if it helps.  For example, 'M-x compile RET' in a compilation buffer
>> doesn't prefill the minibuffer with the current compilation command,
>> but uses the default command that makes no sense.
>
> If it did so (pre-filled the command), perhaps you would just use 'M-x
> compile', in cases when you do want the new buffer to be created?
>
> But it seems to work fine to me, including in 'emacs -Q':
>
> * 'M-x compile', input 'ls', RET.
> * *compilation* buffer create.
> * 'M-x compile' again, in any window (old or new) - 'ls' is pre-filled as
>  the input.

Sorry for the delay, I tried to fix it, but it's too much broken.
Here is the test case for 'emacs -Q':
1. add such line to .dir-locals.el:
  ((nil . ((compile-command . "ls -la"))))
2. M-x compile
3. confirm that it's "ls -la" indeed
4. edit the minibuffer, replace "ls -la" with e.g. "ls" and type RET
5. in *compilation* buffer again type: M-x compile
6. the minibuffer contains "make -k "

PS: I realized now this is related to bug#70136
where Augusto posted the patch that fixes this bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 7 Feb 2024 18:44:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 07 13:44:05 2024
Received: from localhost ([127.0.0.1]:57919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rXmtx-0005xo-AM
	for submit <at> debbugs.gnu.org; Wed, 07 Feb 2024 13:44:05 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:48703)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rXmtv-0005xC-Er
 for 68570 <at> debbugs.gnu.org; Wed, 07 Feb 2024 13:44:04 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 647895C00D0;
 Wed,  7 Feb 2024 13:43:44 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Wed, 07 Feb 2024 13:43:44 -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=1707331424;
 x=1707417824; bh=v2JPmG298sXtrndtzf9GXjK8sMO9Se6d5mYcxr7ugtM=; b=
 AMBnD7QPNLWwBHDdBRD2QOwtEPSJBeM9Lpj5AJFpYryGWZdYDEswIIohjAvvpNZD
 FH2hgyhThwOiDze3l8kER5Hl6zQ1fQVbKtFf8LMyiGtqZXjdFa8yng0tQRFg1o2F
 qnBLKsHSyI1+KmW6djr6bT1mUR39D5n26x7fGNtjNtz9NruUEJd3qabR2Te5aTwT
 eMaKPSTU8VfA1vzzxCmk1UewD5ffrv3ZswXxDPTx5J8IJ4Ho6SGuSwpjn5BOmcCR
 TJVCLUdYFirdOc8HK7CWSJiQsk9mCb6T4atyYad05xqE6TRD5j9RmhbLzai4iT72
 tjs/p07JtVEqyFVItm+/vg==
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=1707331424; x=
 1707417824; bh=v2JPmG298sXtrndtzf9GXjK8sMO9Se6d5mYcxr7ugtM=; b=V
 TdLod4GnCBYfv9nQKrXnbeuK9cSh5PBghOb247uyfMHhW1OhU6d0toKvqWkC1oKk
 EW2WHodkBAlWotTn2xBMEkZb7gYCyyHnVvPjNgPC9BgUmRYkUCfmQZwTqmroe3b1
 lburBw2wEMQwbB4QbtNHMXTVHgu0l/qZy8loN+YmtzA5uqm4FImII2r4OW3ivH/V
 nkqDLAGx2kcFcDUFUPFdUraoV8DEiqJrq6cvSNBIZ3wqa2GLz6WLPF3dh3SQAu/T
 FqMlILnsVnD2+cHEJmiIxoeuz38YgRCUBwDm0iKOEIuE1wS0RmPmUFtcJ//3M6bV
 liFlhLHflTREB43JNhcrw==
X-ME-Sender: <xms:X8_DZTYkE0OJacYRRuzkExfFfD7J3smBNNYu4azoGZxSkRcj66qyPw>
 <xme:X8_DZSYLbT8azA3fj0eCbtoWCnKeODA4VRunh6OLkhGrsHRqFXGfvWc9vZ0a7zHoq
 gUNN8apVATF6Lrcz9U>
X-ME-Received: <xmr:X8_DZV872ivIOBpbGnUvlQnh7JvMPR9obIHXsr2jEbOzsXNGdzFDpJTAJHrRwwZqfyCU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtddvgdduudefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:X8_DZZoNuh_r17ttaKV7WiQPpVNhBOZho-glC6j-Oe2nksuLzCEEpQ>
 <xmx:X8_DZerqq_xeu3efy4mm-bcVeklM7GgAFnxDgfdZlsdz7efEx85vQA>
 <xmx:X8_DZfTd3wbHRWr21nYcMhMyTDQypOfNF6-HSMpbJmqJxJ4XZSQApQ>
 <xmx:YM_DZTByB17sijn58r8MJeEumIPwWj3GI-mAi9wPt5voz1puM3vEmQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 7 Feb 2024 13:43:42 -0500 (EST)
Message-ID: <153e53c0-1673-4eb4-9c31-2be677ca2f08@HIDDEN>
Date: Wed, 7 Feb 2024 20:43:41 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>
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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
 <86a5oqmzmp.fsf@HIDDEN>
 <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN>
 <86fry57ar4.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86fry57ar4.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 68570
Cc: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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 06/02/2024 19:39, Juri Linkov wrote:
>> We could make a new option in compile.el which would determine whether to
>> do this in general: when non-nil, 'compilation-start' would save the
>> current dynamic value of 'compilation-buffer-name-function', and
>> 'recompile' would call it again.
> A new option would be nice, but it's so broken that I don't know
> if it helps.  For example, 'M-x compile RET' in a compilation buffer
> doesn't prefill the minibuffer with the current compilation command,
> but uses the default command that makes no sense.

If it did so (pre-filled the command), perhaps you would just use 'M-x 
compile', in cases when you do want the new buffer to be created?

But it seems to work fine to me, including in 'emacs -Q':

* 'M-x compile', input 'ls', RET.
* *compilation* buffer create.
* 'M-x compile' again, in any window (old or new) - 'ls' is pre-filled 
as the input.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 6 Feb 2024 17:43:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 06 12:43:38 2024
Received: from localhost ([127.0.0.1]:55062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rXPTu-0006jn-Lg
	for submit <at> debbugs.gnu.org; Tue, 06 Feb 2024 12:43:38 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rXPTt-0006jZ-Bc
 for 68570 <at> debbugs.gnu.org; Tue, 06 Feb 2024 12:43:37 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id D3F49C0002;
 Tue,  6 Feb 2024 17:43:16 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
In-Reply-To: <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN> (Dmitry Gutov's
 message of "Sun, 28 Jan 2024 15:42:10 +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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
 <86a5oqmzmp.fsf@HIDDEN>
 <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN>
Date: Tue, 06 Feb 2024 19:39:27 +0200
Message-ID: <86fry57ar4.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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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 (-)

> We could make a new option in compile.el which would determine whether to
> do this in general: when non-nil, 'compilation-start' would save the
> current dynamic value of 'compilation-buffer-name-function', and
> 'recompile' would call it again.

A new option would be nice, but it's so broken that I don't know
if it helps.  For example, 'M-x compile RET' in a compilation buffer
doesn't prefill the minibuffer with the current compilation command,
but uses the default command that makes no sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 28 Jan 2024 13:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 28 08:42:31 2024
Received: from localhost ([127.0.0.1]:56864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rU5Qd-00059g-1L
	for submit <at> debbugs.gnu.org; Sun, 28 Jan 2024 08:42:31 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:52803)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rU5QZ-00059Q-VZ
 for 68570 <at> debbugs.gnu.org; Sun, 28 Jan 2024 08:42:29 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.west.internal (Postfix) with ESMTP id DFD7F3200A7F;
 Sun, 28 Jan 2024 08:42:13 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Sun, 28 Jan 2024 08:42:14 -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=1706449333;
 x=1706535733; bh=v7YWty5hUN3TzPQT/KLu3JK6jWYd2Taz+5Xq6FDZnUs=; b=
 Agk+4pZpPRNkzfzwpFiYHwbG2onBqJp5sp4qoYhrGIUMF8OreiUNKSTUAn3nJgC0
 78P4al1gaQcXIjf88htB588yqItC3itcfaKLw+wOQMzueAE6Ek8OItMNSQUNnUc3
 t8A/BhtNBCj2Gi/Oop7FdXhpnnMKDK3VlCuPTzn0u3L5r+omOwWkUobp2bHy8BCV
 wDIpt1vxHnUpYiL+p7DV4GW5gjtrfych5BxHDiUGP5l9LxVmMYpNbos1opjPRDnj
 WT3NQqup5E41VdfoGJlH7JPcRaQInnfPZD208MwG3NOQe9N5eq8dVo2etPwabCQD
 08VnBo3Ptghl/BEPdBh6Vg==
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=1706449333; x=
 1706535733; bh=v7YWty5hUN3TzPQT/KLu3JK6jWYd2Taz+5Xq6FDZnUs=; b=O
 kgymXJR2J21JWHhW+7UcuBAIR59fHWYbuUxIDxG0jMSi5BejbTAEedwEkJli9prc
 d2NR5rOUTLV+qCi5LtuOXPA3t9pzmHu0iqBKb8jFHiepxtmj/D4C8fugu0rrSj/l
 PIvs5EBfo99cr/RBzkxV3+bNe4C+1dgSbqFH3jC2HEsEP+8QI1k1tBZDYRCU/XEi
 LiniDQBM4IOx5t34M/fLLRxrLWOLzzEpLXTlf80KY0VJo4+wLtTesoJh4u5iB+R+
 1StYAJgHY0UODuka9zVddwGcsn63V2TBK9pcR3VLJhqjfy1OmBlzwbOHLEQ2uBGQ
 hIJOuIVfXPZJvYhWJ/Y5A==
X-ME-Sender: <xms:tFm2ZWzxyj2mSW-yobMdSjtYcKltLzJwQ3yWfsuS4-4wLJIBqOv30g>
 <xme:tFm2ZSTv1SOCC-2bb49tfsa9Fe2UmFferV2ZAOyMFH3sQUiLb0pWziJoDAslfA3mY
 lp4LHs08c47cmRfJTY>
X-ME-Received: <xmr:tFm2ZYWCgRuHzVKjSxladUqqSeQlz9AZOho2SmgRXclBwGdKRE3j_z_BKHB9ntlliT_p>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtvddgheegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepffeifedvleeukedtgfelieegudfgveekfeejveejffetffeuueeugefhveei
 uddvnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc
 frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:tFm2Zch85_7O3B2eQ8YQzmD7WGoqdh7vnbhvhkGcq7bJ_0Ms7efrWg>
 <xmx:tFm2ZYCVTzc0PKJ4JfgND8jT2DnR2cB_jZOPkdwtzAJJEX-srpPT3Q>
 <xmx:tFm2ZdJDGmAgTfiaUokZedaUDQjUT7boS9nPYM8vtb2gROyexQJbpw>
 <xmx:tVm2ZR5Zlv6fKvCX8IVhgUeveMkcIz74Lvtu4kX3n9wIJjeLhatncQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 28 Jan 2024 08:42:11 -0500 (EST)
Message-ID: <7062f157-0e9c-4c72-8edd-5a86d0dfcc43@HIDDEN>
Date: Sun, 28 Jan 2024 15:42:10 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>
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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
 <86a5oqmzmp.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86a5oqmzmp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 68570
Cc: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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 27/01/2024 19:53, Juri Linkov wrote:
>>> It's very useful to always create a unique buffer for every compilation:
>>> this allows keeping error messages from previous compilations.
>>
>> Hmm, but I suppose it can be a personal preference whether a "recompile"
>> should create a new buffer or not.
>>
>> Because it's also reasonable to expect that 'M-x compile' creates a new
>> buffer (e.g. project-prefixed and unique), but 'recompile', or
>> 'revert-buffer' - keep that buffer around and reuse it. When one wants to
>> keep the old contents, they could 'M-x compile' (or 'M-x project-compile')
>> instead.
>>
>> This might be my preference anyway, because OT1H old compilations are often
>> (but not always) handy to have around, OT2H I don't like to have too many
>> buffers, and the above distinction between 'compile' and 'recompile' would
>> be a tool to make that choice.
> 
> A new option could be added indeed.  But currently 'g' after 'compile'
> uses 'compilation-buffer-name-function' that can be configured
> to generate a new buffer.  So it's expected that 'g' after
> 'project-compile' should do the same and use
> 'project-compilation-buffer-name-function', especially
> when it's configured to generate a new buffer.

Again, I'm not sure if it's expected: even if I do like the idea of 
unique per-project compilation buffers, seeing 'g' reuse the existing 
buffer feels pretty natural.

> IOW, I think these two 'compile' and 'project-compile'
> should be in sync in regard to what 'recompile' does.

When I'm saying is that when 'recompile' reuses the current buffer it 
already follows the result of project-compilation-buffer-name-function 
(when it was invoked from project-compile, of course).

>>> 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")))
>>
>> Sounds good.
> 
> There is also a proposal to add the same option
> to 'compilation-buffer-name-function' in bug#68697.

Sounds good to me. We could also ask the reporter there what they think 
'g' should do in such buffers (create a new one or reuse current).

>>> The previous patch would be needed as well since currently
>>> there is no way to allow unique project compilation buffers.
>>
>> The one in 0a07603ae8d?
> 
> Actually I meant https://debbugs.gnu.org/68570#23

We could make a new option in compile.el which would determine whether 
to do this in general: when non-nil, 'compilation-start' would save the 
current dynamic value of 'compilation-buffer-name-function', and 
'recompile' would call it again.

Otherwise the distinction remains that when 'recompile' is invoked 
inside a compilation buffer, the same buffer is used; and when it's 
invoked from some other buffer, a new compilation buffer can be created.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 27 Jan 2024 18:06:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 27 13:06:11 2024
Received: from localhost ([127.0.0.1]:55861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rTn4E-0008EE-Rj
	for submit <at> debbugs.gnu.org; Sat, 27 Jan 2024 13:06:11 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:43953)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1rTn4A-0008DZ-OK
 for 68570 <at> debbugs.gnu.org; Sat, 27 Jan 2024 13:06:09 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 5253A40003;
 Sat, 27 Jan 2024 18:05:51 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
In-Reply-To: <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN> (Dmitry Gutov's
 message of "Fri, 26 Jan 2024 02:44:17 +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>
 <86o7da1ws8.fsf@HIDDEN>
 <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
Date: Sat, 27 Jan 2024 19:53:34 +0200
Message-ID: <86a5oqmzmp.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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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 (-)

>> It's very useful to always create a unique buffer for every compilation:
>> this allows keeping error messages from previous compilations.
>
> Hmm, but I suppose it can be a personal preference whether a "recompile"
> should create a new buffer or not.
>
> Because it's also reasonable to expect that 'M-x compile' creates a new
> buffer (e.g. project-prefixed and unique), but 'recompile', or
> 'revert-buffer' - keep that buffer around and reuse it. When one wants to
> keep the old contents, they could 'M-x compile' (or 'M-x project-compile')
> instead.
>
> This might be my preference anyway, because OT1H old compilations are often
> (but not always) handy to have around, OT2H I don't like to have too many
> buffers, and the above distinction between 'compile' and 'recompile' would
> be a tool to make that choice.

A new option could be added indeed.  But currently 'g' after 'compile'
uses 'compilation-buffer-name-function' that can be configured
to generate a new buffer.  So it's expected that 'g' after
'project-compile' should do the same and use
'project-compilation-buffer-name-function', especially
when it's configured to generate a new buffer.

IOW, I think these two 'compile' and 'project-compile'
should be in sync in regard to what 'recompile' does.

>> 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")))
>
> Sounds good.

There is also a proposal to add the same option
to 'compilation-buffer-name-function' in bug#68697.

>> The previous patch would be needed as well since currently
>> there is no way to allow unique project compilation buffers.
>
> The one in 0a07603ae8d?

Actually I meant https://debbugs.gnu.org/68570#23




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 26 Jan 2024 00:44:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 25 19:44:36 2024
Received: from localhost ([127.0.0.1]:49652 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rTAKi-0001eA-FW
	for submit <at> debbugs.gnu.org; Thu, 25 Jan 2024 19:44:36 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rTAKf-0001ds-F9
 for 68570 <at> debbugs.gnu.org; Thu, 25 Jan 2024 19:44:34 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 8FE345C00A6;
 Thu, 25 Jan 2024 19:44:21 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute3.internal (MEProxy); Thu, 25 Jan 2024 19:44:21 -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=1706229861;
 x=1706316261; bh=aZeNG+5TanN5UOCW5NpyDcuaDohyXmZ16tVHd0kVnTA=; b=
 gWBEh5T4Ksh9W72TAbRhUg0qCEXmUQeaqtrXNfUcrBMzR3dyTpeG3srwhZxuQMoE
 1XOaX7dIrU0hK71zU574BPBIp+W4TPr0/U/bEBNiPkaR/Y5AbqX7Wr2xV1cqGdZ1
 9rg96V4X16UVc3p7HzpmWBVzF+bEJXeSAYOnC0z290x7Drj0tnY9X/BwuCKMmLQV
 R4Y1KK5FWrYS3bXAwGgZitEyvOb+eIyQgidjGjIrAo8igTuZggtUzjrNBtyAdgxq
 3e6a4oW3R7ZGu4NIGry3SBL8lptjXT+SOWKB+p/9JG7DQEFRtemMcfltrippZUyw
 7mlx6qQy2R0xnqoR0GthpQ==
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=1706229861; x=
 1706316261; bh=aZeNG+5TanN5UOCW5NpyDcuaDohyXmZ16tVHd0kVnTA=; b=l
 BJFraQruzFSZQL0NKuEph24CaYBlEir0N1aMvPL6T9v7gjro0CU6e5xM0gjt+vL9
 g+mIqgePIzffcCWW/JcpSFGbWIIXDiQafmiQ+NgrUqoiNlKVRi2NsRkCbqa2+aMR
 OYedcTkPhoKt+N33ELUaxh/9vAzAKSZ6r94WwX6U59CDWZYKHQ2zgmNNpLlAApkt
 7kWcDBfwypJVMOU56bU1vnGBJf5EwZCf57Ifbnc72rOw4AbER/2E8LlcEtufUqaf
 DWUj9CbvLMBC3DMomhJV6Z2ud8X2FmWi2ihTCqVYZRpaa+tPI6ZIUka7Ai+f5oXI
 ao/ABaaqBdu1NuFS/+YTw==
X-ME-Sender: <xms:ZQCzZRKCWM1mLHGyi_4Q3Mt68ijRIrbTbqtkphx-lxOWle7WrHaRtA>
 <xme:ZQCzZdKpGcBJOBjQOoErN226Bs7oyN0WIAKMeQ7PSKCumps1OY0Xd1wXcny189dx4
 edKbgRmPg-oF0H0DfY>
X-ME-Received: <xmr:ZQCzZZtSeHo9DeUjkXKm6Bgf0AgaJFjONhxXpxb3di5MdwNDK1gX-oeXnoDI6KLDqG4Llw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeliedgvdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:ZQCzZSbaORU8rEt4up5pvrHBHvLeUBzMbp5vfwpUvItmAasHCAc2yg>
 <xmx:ZQCzZYbK606m6gPnDJDQEamRjMLR3_1uLVnEDasX_TfWC7DkXWsfmA>
 <xmx:ZQCzZWA7yNpxRtnTvfFWTXtliBOsAsa7tPd5Ecl2GTMdc7yuO61vVQ>
 <xmx:ZQCzZTzEx-fA9ADvBLOWJ2zJ00I0d6ORZFXKvJ_EvF-lC6WNeh5q-Q>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 25 Jan 2024 19:44:20 -0500 (EST)
Message-ID: <2a3f08b8-5334-41c6-8003-707424a8a0fe@HIDDEN>
Date: Fri, 26 Jan 2024 02:44:17 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>
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>
 <86o7da1ws8.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86o7da1ws8.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 68570
Cc: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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 19:11, 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?
> 
> It's very useful to always create a unique buffer for every compilation:
> this allows keeping error messages from previous compilations.

Hmm, but I suppose it can be a personal preference whether a "recompile" 
should create a new buffer or not.

Because it's also reasonable to expect that 'M-x compile' creates a new 
buffer (e.g. project-prefixed and unique), but 'recompile', or 
'revert-buffer' - keep that buffer around and reuse it. When one wants 
to keep the old contents, they could 'M-x compile' (or 'M-x 
project-compile') instead.

This might be my preference anyway, because OT1H old compilations are 
often (but not always) handy to have around, OT2H I don't like to have 
too many buffers, and the above distinction between 'compile' and 
'recompile' would be a tool to make that choice.

> 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")))

Sounds good.

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

The one in 0a07603ae8d?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 17:13:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 24 12:13:08 2024
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>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 12:07:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 24 07:07:16 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>
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-Debbugs-Envelope-To: 68570
Cc: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 24 Jan 2024 08:01:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 24 03:01:24 2024
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>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 17:32:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 12:32:11 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
To: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
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-Debbugs-Envelope-To: 68570
Cc: 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 14:46:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 09:46:14 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US, de-DE
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
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-Debbugs-Envelope-To: 68570
X-Mailman-Approved-At: Tue, 23 Jan 2024 09:46:09 -0500
Cc: 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 12:22:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 07:22:04 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>, =?UTF-8?Q?J=C3=B6rg_Bornemann?=
 <foss@HIDDEN>
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-Debbugs-Envelope-To: 68570
Cc: 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 23 Jan 2024 07:10:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 02:10:04 2024
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>
To: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
In-Reply-To: <871a3ea4-46d9-419e-a375-1d32968ccc88@HIDDEN>
 (=?iso-8859-1?Q?=22J=F6rg?=
 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-Debbugs-Envelope-To: 68570
Cc: Dmitry Gutov <dmitry@HIDDEN>, 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 18:20:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 13:20:49 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
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-Debbugs-Envelope-To: 68570
Cc: 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 18:20:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 13:20:33 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
To: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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-Debbugs-Envelope-To: 68570
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 09:43:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 04:43:09 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
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-Debbugs-Envelope-To: 68570
X-Mailman-Approved-At: Mon, 22 Jan 2024 04:43:02 -0500
Cc: 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 09:43:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 04:43:08 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Dmitry Gutov <dmitry@HIDDEN>, 68570 <at> debbugs.gnu.org
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-Debbugs-Envelope-To: 68570
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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 22 Jan 2024 07:55:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 02:55:47 2024
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>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 18:33:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 21 13:33:15 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Juri Linkov <juri@HIDDEN>
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-Debbugs-Envelope-To: 68570
Cc: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 18:19:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 21 13:19:12 2024
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>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
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-Debbugs-Envelope-To: 68570
Cc: =?iso-8859-1?Q?J=F6rg?= Bornemann <foss@HIDDEN>,
 68570 <at> debbugs.gnu.org
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'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 21 Jan 2024 05:09:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 21 00:09:45 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>, 68570 <at> debbugs.gnu.org
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-Debbugs-Envelope-To: 68570
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 20 Jan 2024 14:28:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 20 09:28:16 2024
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
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Content-Language: en-US
To: Pengji Zhang <kunhtkun@HIDDEN>, 68570 <at> debbugs.gnu.org
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-Debbugs-Envelope-To: 68570
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at 68570 <at> debbugs.gnu.org:


Received: (at 68570) by debbugs.gnu.org; 19 Jan 2024 20:19:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 19 15:19:29 2024
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>
Subject: Re: bug#68570: 29.1;
 recompile might not re-use project-compile's buffer
To: 68570 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 68570
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 16:58:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 18 11:58:00 2024
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
To: bug-gnu-emacs@HIDDEN
From: =?UTF-8?Q?J=C3=B6rg_Bornemann?= <foss@HIDDEN>
Subject: 29.1; recompile might not re-use project-compile's buffer
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-Debbugs-Envelope-To: submit
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.




Acknowledgement sent to Jörg Bornemann <foss@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#68570; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 14 Mar 2025 04:45:01 UTC

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