GNU bug report logs - #79658
31.0.50; 'C-x p c' in VC compilation-mode buffer shouldn't try to redo the VC operation

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sun, 19 Oct 2025 15:04:01 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 79658 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org:
bug#79658; Package emacs. (Sun, 19 Oct 2025 15:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org. (Sun, 19 Oct 2025 15:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; 'C-x p c' in VC compilation-mode buffer shouldn't try to
 redo the VC operation
Date: Sun, 19 Oct 2025 16:03:27 +0100
[Message part 1 (text/plain, inline)]
X-debbugs-cc: dmitry <at> gutov.dev

If you use 'C-x v +', wait for the pull, and then do 'C-x p c', Emacs
will propose redoing the pull command.  But clearly the user's intention
here is to compile the new version of the project they just updated.

I'm not sure that VC's use of compilation-mode for its pull/push buffers
is a great idea -- I think it's confusing how the buffer only goes into
compilation-mode after the first command has finished running -- but I
don't propose to make any fundamental changes to that in order to fix
this bug.

Attached is a proposed fix.

-- 
Sean Whitton
[0001-project-compile-Ignore-compile-command-from-vc-compi.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79658; Package emacs. (Sun, 19 Oct 2025 23:06:06 GMT) Full text and rfc822 format available.

Message #8 received at 79658 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Sean Whitton <spwhitton <at> spwhitton.name>, 79658 <at> debbugs.gnu.org
Subject: Re: bug#79658: 31.0.50; 'C-x p c' in VC compilation-mode buffer
 shouldn't try to redo the VC operation
Date: Mon, 20 Oct 2025 02:05:35 +0300
Hi!

On 19/10/2025 18:03, Sean Whitton wrote:
> If you use 'C-x v +', wait for the pull, and then do 'C-x p c', Emacs
> will propose redoing the pull command.  But clearly the user's intention
> here is to compile the new version of the project they just updated.
> 
> I'm not sure that VC's use of compilation-mode for its pull/push buffers
> is a great idea -- I think it's confusing how the buffer only goes into
> compilation-mode after the first command has finished running -- but I
> don't propose to make any fundamental changes to that in order to fix
> this bug.
> 
> Attached is a proposed fix.

Thanks for the patch.

Do you think it would make sense, instead, to set 'compile-command' to 
nil in vc-compilation-mode? Or kill the local value anyway.

If not, then do we expect it to be used in other scenarios?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79658; Package emacs. (Mon, 20 Oct 2025 14:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 79658 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 79658 <at> debbugs.gnu.org
Subject: Re: bug#79658: 31.0.50; 'C-x p c' in VC compilation-mode buffer
 shouldn't try to redo the VC operation
Date: Mon, 20 Oct 2025 15:17:58 +0100
Hello,

On Mon 20 Oct 2025 at 02:05am +03, Dmitry Gutov wrote:

> Hi!
>
> On 19/10/2025 18:03, Sean Whitton wrote:
>> If you use 'C-x v +', wait for the pull, and then do 'C-x p c', Emacs
>> will propose redoing the pull command.  But clearly the user's intention
>> here is to compile the new version of the project they just updated.
>> I'm not sure that VC's use of compilation-mode for its pull/push buffers
>> is a great idea -- I think it's confusing how the buffer only goes into
>> compilation-mode after the first command has finished running -- but I
>> don't propose to make any fundamental changes to that in order to fix
>> this bug.
>> Attached is a proposed fix.
>
> Thanks for the patch.
>
> Do you think it would make sense, instead, to set 'compile-command' to nil in
> vc-compilation-mode? Or kill the local value anyway.
>
> If not, then do we expect it to be used in other scenarios?

I think that we are relying on how if you type 'g' in the *vc-foo*
buffer it'll retry the push, if it failed.  That would break without
compile-command.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79658; Package emacs. (Wed, 05 Nov 2025 16:10:02 GMT) Full text and rfc822 format available.

Message #14 received at 79658 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 79658 <at> debbugs.gnu.org
Subject: Re: bug#79658: 31.0.50; 'C-x p c' in VC compilation-mode buffer
 shouldn't try to redo the VC operation
Date: Wed, 05 Nov 2025 16:09:51 +0000
Hello Dmitry,

On Mon 20 Oct 2025 at 03:17pm +01, Sean Whitton wrote:

> Hello,
>
> On Mon 20 Oct 2025 at 02:05am +03, Dmitry Gutov wrote:
>
>> Hi!
>>
>> On 19/10/2025 18:03, Sean Whitton wrote:
>>> If you use 'C-x v +', wait for the pull, and then do 'C-x p c', Emacs
>>> will propose redoing the pull command.  But clearly the user's intention
>>> here is to compile the new version of the project they just updated.
>>> I'm not sure that VC's use of compilation-mode for its pull/push buffers
>>> is a great idea -- I think it's confusing how the buffer only goes into
>>> compilation-mode after the first command has finished running -- but I
>>> don't propose to make any fundamental changes to that in order to fix
>>> this bug.
>>> Attached is a proposed fix.
>>
>> Thanks for the patch.
>>
>> Do you think it would make sense, instead, to set 'compile-command' to nil in
>> vc-compilation-mode? Or kill the local value anyway.
>>
>> If not, then do we expect it to be used in other scenarios?
>
> I think that we are relying on how if you type 'g' in the *vc-foo*
> buffer it'll retry the push, if it failed.  That would break without
> compile-command.

Do you have any further comments here, or would you be okay with me
installing this?  It's a hack, but it's a usability improvement, and we
can do away with it if we can come up with something better than
compilation-mode for VC buffers.

Thanks.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79658; Package emacs. (Thu, 06 Nov 2025 02:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 79658 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 79658 <at> debbugs.gnu.org
Subject: Re: bug#79658: 31.0.50; 'C-x p c' in VC compilation-mode buffer
 shouldn't try to redo the VC operation
Date: Thu, 6 Nov 2025 04:38:52 +0200
Hi Sean,

On 05/11/2025 18:09, Sean Whitton wrote:
> Do you have any further comments here, or would you be okay with me
> installing this?  It's a hack, but it's a usability improvement, and we
> can do away with it if we can come up with something better than
> compilation-mode for VC buffers.

Ok, let's go ahead.

I wondered if there is a broader class of features that set 
compile-command while not doing any "real" compilation, but at least 
in-tree there aren't much. So let's just blacklist vc-compilation-mode 
for now.




This bug report was last modified today.

Previous Next


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