GNU bug report logs - #80005
master 08bd8fdbb4c: vc-diff-internal: Call into backend after setting up the major mode

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: Juri Linkov <juri@HIDDEN>; Done: Juri Linkov <juri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 31.0.50, send any further explanations to 80005 <at> debbugs.gnu.org and Juri Linkov <juri@HIDDEN> Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 80005) by debbugs.gnu.org; 15 Dec 2025 07:24:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 15 02:24:33 2025
Received: from localhost ([127.0.0.1]:35938 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vV2wa-0000vi-Ja
	for submit <at> debbugs.gnu.org; Mon, 15 Dec 2025 02:24:32 -0500
Received: from mout-p-103.mailbox.org ([80.241.56.161]:40942)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>)
 id 1vV2wV-0000uq-Su; Mon, 15 Dec 2025 02:24:29 -0500
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:b231:465::2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4dVBQC43Fdz9t6D;
 Mon, 15 Dec 2025 08:24:19 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1765783459;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=+7MZRKLplGWnUBE79VS0u70bFw5X2RuvtyFK75ilLGc=;
 b=ICch3y9QRp0CKHVAZsibj1YLkFgEf4oyHiGa9gN65waPUkn3ZUOTvrxsm2tFIz9KtAE5Ns
 M3L4q35VxHN+Ct2HqYyUz1OjhFxkWM3KMpk/PLsZ1PsNxpzPgzbIp8/GPZHMuOi7wpoofV
 07vtRWjBu7wq91zE58ZWSwMuqNC+IurQtH0xEEt7rxnoDL7L51Up1PVQKpmoXwW6/pva1D
 Og0buE52qtSA/lUDm817RQ/gqEXpHivjZ3cMEa7LtN/8eNg/E1mHE7m7dH+Sl5qe7jYGFI
 xXEt3Pplwd+PNd8L0FZHHgAtJqYB3mVE9bEi++4MT7tGDmHfDi4IB2isvi9feQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#80005: master 08bd8fdbb4c: vc-diff-internal: Call into
 backend after setting up the major mode
In-Reply-To: <87wm2p6jkq.fsf@HIDDEN>
Organization: LINKOV.NET
References: <176563606331.13947.15858782592430797007@HIDDEN>
 <20251213142743.A0EDDC06190@HIDDEN>
 <874ipta8hv.fsf@HIDDEN>
 <87zf7lwd1l.fsf@HIDDEN>
 <87ecox7zzj.fsf@HIDDEN> <87wm2p6jkq.fsf@HIDDEN>
Date: Mon, 15 Dec 2025 09:23:14 +0200
Message-ID: <87v7i8dx99.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4dVBQC43Fdz9t6D
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80005
Cc: 80005 <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 (-)

close 80005 31.0.50
thanks

> Oh, sorry, whereas the diff buffer now is not empty,
> this hook has no effect anymore:
>
>   (add-hook 'diff-mode-hook 'rename-uniquely)

This is fixed now by using '(get-buffer-create "*vc-diff*")'
like there is already 'get-buffer-create' in 'vc-log-internal-common'
for "*vc-change-log*" buffer objects.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80005; Package emacs. Full text available.
bug No longer marked as fixed in versions 31.0.50 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

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


Received: (at 80005) by debbugs.gnu.org; 14 Dec 2025 17:49:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 14 12:49:29 2025
Received: from localhost ([127.0.0.1]:55670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vUqDo-0004X2-RX
	for submit <at> debbugs.gnu.org; Sun, 14 Dec 2025 12:49:29 -0500
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:36562)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>)
 id 1vUqDl-0004WP-6q; Sun, 14 Dec 2025 12:49:27 -0500
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4dTrKm4x2dz9slL;
 Sun, 14 Dec 2025 18:49:16 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1765734556;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=UdtuxheNRVVO4wJZtTbEelWDtkvZgAua9aoXEHOYHgA=;
 b=frnmdMDCjthrKiAyKic6JwIomYvYwZRoVKW+1B2kLNAUk388Mqk5In6XmlrVOcEq1Gy9aq
 fOBFwpGV4TUYySkX2X4abeMnAy/J3eysZql+egJDYsPy9O14ak0DWqWP70LQIj18qG4tKw
 IEavRYyUfc8YbUhwaUnhtO0CLcDQjqeeYjWRpgyg8SKPyYXiUCcof50CGCmh9sxEh/laoH
 D8/3uomgSC/IIWrqhGTNoSwGOyORT+tps87jB8DSlgWTGFUbkKF3308m8ZdPzZcA/KYzAK
 4HKknVs7A5Gf34nbA7sDyrfin4tThbQ+UsEKu3k2Af/SQzWtPhoO7PQZsZVnTw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#80005: master 08bd8fdbb4c: vc-diff-internal: Call into
 backend after setting up the major mode
In-Reply-To: <87ecox7zzj.fsf@HIDDEN>
Organization: LINKOV.NET
References: <176563606331.13947.15858782592430797007@HIDDEN>
 <20251213142743.A0EDDC06190@HIDDEN>
 <874ipta8hv.fsf@HIDDEN>
 <87zf7lwd1l.fsf@HIDDEN>
 <87ecox7zzj.fsf@HIDDEN>
Date: Sun, 14 Dec 2025 19:42:12 +0200
Message-ID: <87wm2p6jkq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4dTrKm4x2dz9slL
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80005
Cc: 80005 <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 (-)

reopen 80005
thanks

Oh, sorry, whereas the diff buffer now is not empty,
this hook has no effect anymore:

  (add-hook 'diff-mode-hook 'rename-uniquely)

It doesn't rename the diff buffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80005; Package emacs. Full text available.
bug marked as fixed in version 31.0.50, send any further explanations to 80005 <at> debbugs.gnu.org and Juri Linkov <juri@HIDDEN> Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 80005) by debbugs.gnu.org; 14 Dec 2025 17:09:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 14 12:09:15 2025
Received: from localhost ([127.0.0.1]:55154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vUpat-00077U-1j
	for submit <at> debbugs.gnu.org; Sun, 14 Dec 2025 12:09:15 -0500
Received: from mout-p-103.mailbox.org ([80.241.56.161]:52868)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>)
 id 1vUpao-00076t-OY; Sun, 14 Dec 2025 12:09:13 -0500
Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4dTqRJ4dZfz9sl4;
 Sun, 14 Dec 2025 18:09:00 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1765732140;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Dnr/3RjzhQZB2iz/qVhxNbC8TTP2kSiCE8m8uREcsbw=;
 b=IA98cgBaiHvPrBGoRujBNkRA0Dewuai0vZqnnddaGF7xH5GGoR3qLKebRb5wIiqO037TvH
 tp6q8Ur5g/UZlt1yf8e06isv3pZeutOaRO6oGOKK72wJZIfvGzBviOIfiSHh5LQpPQ9skB
 /y5tbE2XqFkseMqmX3UegTdyQzf2ggscfbRz899+HvXMMPgzw4CKOXPl6RYW8IK81KoyKM
 q9Mz8kCVvTFzKrCBNyHYiIuyQG97a9YEFBWGgT/wwgdaxXyVTm6Q1IdvqyJGmWfkgkhW5/
 21d9oA4dBxs/uBCIUuIfXHrUCp68LtPNwC/F6K5p7rpeuCLhhe8xkuQ5FJtR0A==
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#80005: master 08bd8fdbb4c: vc-diff-internal: Call into
 backend after setting up the major mode
In-Reply-To: <87zf7lwd1l.fsf@HIDDEN>
Organization: LINKOV.NET
References: <176563606331.13947.15858782592430797007@HIDDEN>
 <20251213142743.A0EDDC06190@HIDDEN>
 <874ipta8hv.fsf@HIDDEN>
 <87zf7lwd1l.fsf@HIDDEN>
Date: Sun, 14 Dec 2025 19:08:32 +0200
Message-ID: <87ecox7zzj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80005
Cc: 80005 <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 (-)

close 80005 31.0.50
thanks

>>> vc-diff-internal: Call into backend after setting up the major mode
>>>
>>> This means the backend can, for example, enable a minor mode,
>>> without our changing the major mode immediately wiping that out.
>>>
>>> * lisp/vc/vc.el (vc-diff-internal): Set up the major mode before
>>> calling into the backend.
>>>
>>> @@ -2794,7 +2794,6 @@ Return t if the buffer had changes, nil otherwise."
>>>                       (if async 'async 1) "diff" file
>>>                       (append (vc-switches nil 'diff) `(,(null-device)))))))
>>>          (setq files (nreverse filtered))))
>>> -    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>>>      (set-buffer buffer)
>>>      ;; Make the *vc-diff* buffer read only, the diff-mode key
>>>      ;; bindings are nicer for read only buffers. pcl-cvs does the
>>> @@ -2806,6 +2805,7 @@ Return t if the buffer had changes, nil otherwise."
>>>      (setq-local revert-buffer-function
>>>                  (lambda (_ignore-auto _noconfirm)
>>>                    (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
>>> +    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>>>      (if (and (zerop (buffer-size))
>>>               (not (get-buffer-process (current-buffer))))
>>>          ;; Treat this case specially so as not to pop the buffer.
>>
>> This change broke the following configuration
>> that creates unique diff buffers:
>>
>>   (add-hook 'diff-mode-hook 'rename-uniquely)
>>
>> The diff output buffer is always empty.
>
> Thanks, now fixed with delay-mode-hooks.

Thanks, closing.




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

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


Received: (at 80005) by debbugs.gnu.org; 14 Dec 2025 10:52:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 14 05:52:51 2025
Received: from localhost ([127.0.0.1]:50816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vUjid-0003sx-AX
	for submit <at> debbugs.gnu.org; Sun, 14 Dec 2025 05:52:51 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:39006)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vUjib-0003sZ-0Z
 for 80005 <at> debbugs.gnu.org; Sun, 14 Dec 2025 05:52:49 -0500
DKIM-Signature: a=rsa-sha256;
 b=NcIgVfeyBOguEWdQYwdK4XzsuRxNF8QPYaNfpqpnp/3iDqjPuGHqHkuX4pxTLI2fQq6W64z9sTyFIifAmmIo01/G/4OofAqHtNB8k06dhzvr2a+Wjw/GCsja+fMxDMqHPwRqiiOtpHwV/9LN02CWjliJqDz57ni57y6ggrZu92ubSizpQ4GaxaF0nvig0WB9y1SKrFCct6+V/l60hNkhI6f5W4fkpQQ+/BTTwUcaFmiB81+g1ThQ3nKEUq6HPHUIIkEnIegTOUwxrEuRWxJ82wSCVb1u0nL9igfzpevf3xSk+msZ/MD7yVZ9rV91tZ58v4lH4/gGyeS/3mokThNDXg==;
 s=purelymail1; d=spwhitton.name; v=1;
 bh=5p1HfqgzJnPIsUdBB9W7pmPFgFFT+RRhwiiDjOHTIQ0=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=lUsHod+Htv/f9EYXEN2rT0lQqOQRniWDTNsiVWIwXi6Aw87LAwrD4B57Ptsq8jhoSJyhNn9E01AxXo59iVn+8v72YtQGdiBTykV1wVGtZBh0bOLQGXdFBhdh16oOv5PoMNfztEE9N02hshgROnnEeF0Pe3giZAdYXY5WS56hCdN1hshovdpkkteEC72WNsr1XoW3MVSFdjJmOlKNNbu2dgs8QiwCgGEiiiSbr68v5UNsIIo+AipxQLM50w1zpf1RINRGASU0++TUG9s/FSbF79mPADBuHNLOKb+YM0X+RItnSkWOvP78RgUHag6I/EUTn6R5Codce5V7z/NaL86F5A==;
 s=purelymail1; d=purelymail.com; v=1;
 bh=5p1HfqgzJnPIsUdBB9W7pmPFgFFT+RRhwiiDjOHTIQ0=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 80005 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 426878460; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Sun, 14 Dec 2025 10:52:40 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 7256C9402F8; Sun, 14 Dec 2025 10:52:38 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#80005: master 08bd8fdbb4c: vc-diff-internal: Call into
 backend after setting up the major mode
In-Reply-To: <874ipta8hv.fsf@HIDDEN>
References: <176563606331.13947.15858782592430797007@HIDDEN>
 <20251213142743.A0EDDC06190@HIDDEN>
 <874ipta8hv.fsf@HIDDEN>
Date: Sun, 14 Dec 2025 10:52:38 +0000
Message-ID: <87zf7lwd1l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 80005
Cc: 80005 <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 (-)

Hello,

On Sun 14 Dec 2025 at 09:41am +02, Juri Linkov wrote:

>> vc-diff-internal: Call into backend after setting up the major mode
>>
>> This means the backend can, for example, enable a minor mode,
>> without our changing the major mode immediately wiping that out.
>>
>> * lisp/vc/vc.el (vc-diff-internal): Set up the major mode before
>> calling into the backend.
>>
>> @@ -2794,7 +2794,6 @@ Return t if the buffer had changes, nil otherwise."
>>                       (if async 'async 1) "diff" file
>>                       (append (vc-switches nil 'diff) `(,(null-device)))))))
>>          (setq files (nreverse filtered))))
>> -    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>>      (set-buffer buffer)
>>      ;; Make the *vc-diff* buffer read only, the diff-mode key
>>      ;; bindings are nicer for read only buffers. pcl-cvs does the
>> @@ -2806,6 +2805,7 @@ Return t if the buffer had changes, nil otherwise."
>>      (setq-local revert-buffer-function
>>                  (lambda (_ignore-auto _noconfirm)
>>                    (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
>> +    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>>      (if (and (zerop (buffer-size))
>>               (not (get-buffer-process (current-buffer))))
>>          ;; Treat this case specially so as not to pop the buffer.
>
> This change broke the following configuration
> that creates unique diff buffers:
>
>   (add-hook 'diff-mode-hook 'rename-uniquely)
>
> The diff output buffer is always empty.

Thanks, now fixed with delay-mode-hooks.

-- 
Sean Whitton




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

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


Received: (at submit) by debbugs.gnu.org; 14 Dec 2025 07:45:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 14 02:45:04 2025
Received: from localhost ([127.0.0.1]:49120 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vUgmt-0000GD-In
	for submit <at> debbugs.gnu.org; Sun, 14 Dec 2025 02:45:04 -0500
Received: from lists.gnu.org ([2001:470:142::17]:36602)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vUgmq-0000EP-Lc
 for submit <at> debbugs.gnu.org; Sun, 14 Dec 2025 02:45:01 -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 <juri@HIDDEN>) id 1vUgmf-0001up-Aq
 for bug-gnu-emacs@HIDDEN; Sun, 14 Dec 2025 02:44:49 -0500
Received: from mout-p-101.mailbox.org ([80.241.56.151])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1vUgmd-0005Jk-M0
 for bug-gnu-emacs@HIDDEN; Sun, 14 Dec 2025 02:44:49 -0500
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4dTZw82Hq6z9slY
 for <bug-gnu-emacs@HIDDEN>; Sun, 14 Dec 2025 08:44:40 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1765698280;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Guq4oUKTzBaHMLI/i3IBZ5mWrJ3AUOwkFVIgVEP5s3g=;
 b=WJZplD824zyjsLze3xILqJe1880MdYcG+vow3OQtJcp7zgm09xpswUprH2e2Fb1e/DSyzq
 J3tNQZVP1XNiJbvxmEE0OL5R/oZsgpOu5KMp/cXKpzJtKLtoKXMEmyWwVgAp6QKDmirJ42
 IUEBcpQJ00pbt/oamiy615kFeDng9Yh2nwRye9pdU+fZ3GJuRhdb/gMOBPuF08QsC4JYpP
 RGcb7R1D2GEKwW1n+quzMkWIv07NQF+y4AFslEb8vVWrAoqy0pkXSx2yLqLPDEgO8W+AVN
 eWZXM6s6wPZGnnUt23co2WWu1vSuMXoKwBtldct8p310NMcRuEoxSRk1Paorhw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: master 08bd8fdbb4c: vc-diff-internal: Call into backend after
 setting up the major mode
In-Reply-To: <20251213142743.A0EDDC06190@HIDDEN>
Organization: LINKOV.NET
References: <176563606331.13947.15858782592430797007@HIDDEN>
 <20251213142743.A0EDDC06190@HIDDEN>
X-Debbugs-Cc: Sean Whitton <spwhitton@HIDDEN>
Date: Sun, 14 Dec 2025 09:41:45 +0200
Message-ID: <874ipta8hv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4dTZw82Hq6z9slY
Received-SPF: pass client-ip=80.241.56.151; envelope-from=juri@HIDDEN;
 helo=mout-p-101.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
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 (/)

> vc-diff-internal: Call into backend after setting up the major mode
>
> This means the backend can, for example, enable a minor mode,
> without our changing the major mode immediately wiping that out.
>
> * lisp/vc/vc.el (vc-diff-internal): Set up the major mode before
> calling into the backend.
>
> @@ -2794,7 +2794,6 @@ Return t if the buffer had changes, nil otherwise."
>                       (if async 'async 1) "diff" file
>                       (append (vc-switches nil 'diff) `(,(null-device)))))))
>          (setq files (nreverse filtered))))
> -    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>      (set-buffer buffer)
>      ;; Make the *vc-diff* buffer read only, the diff-mode key
>      ;; bindings are nicer for read only buffers. pcl-cvs does the
> @@ -2806,6 +2805,7 @@ Return t if the buffer had changes, nil otherwise."
>      (setq-local revert-buffer-function
>                  (lambda (_ignore-auto _noconfirm)
>                    (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
> +    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
>      (if (and (zerop (buffer-size))
>               (not (get-buffer-process (current-buffer))))
>          ;; Treat this case specially so as not to pop the buffer.

This change broke the following configuration
that creates unique diff buffers:

  (add-hook 'diff-mode-hook 'rename-uniquely)

The diff output buffer is always empty.




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to spwhitton@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to spwhitton@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#80005; 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: Mon, 15 Dec 2025 07:30:02 UTC

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