From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Date: Tue, 24 Sep 2024 09:32:24 +0300 Organization: LINKOV.NET Message-ID: <86msjxefkv.fsf@mail.linkov.net> References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7335"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Sean Whitton To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 24 08:55:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sszS5-0001gi-V6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Sep 2024 08:55:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sszRZ-0008AX-9s; Tue, 24 Sep 2024 02:54:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sszRX-0008A6-QE for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 02:54:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sszRX-0000Mi-Gj for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 02:54:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=QkEjBUiSDNgmJ+XDiuUiX6/nug+RGT7ec1l2kpPmBRk=; b=sT9sXM3FM0hWJPGevVfjFzw3fzl5bQp1/5q1NqmMBGVOzVbMGkpnHQAN781J5wSqTP5COc0hyzdk9sPkjIh5xX0c3Txgwagv1znTGntKiqEhnzbHBY5xB2zBpiwRFOehfT7+2YOSVuV4ZOCqnhFW5ND86khRjpb3RB1AXx0gG2AIT3hUNviGUZiNspybnwDfHIAIz8kkMaGaBksXlmhafEpzHUaWQwtXOo15ZHxUZ5RmER/K3GWLmPc7SuJVE5iNGk/AmWrMiak8CZq5jKd5inR75CsVVqVLzmjbCdE9jT9hQRxeoHIvVCKSYrTxI/AEjiR3jYkkDG00u21kb6zFTg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sszRv-0004nd-5H for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 02:55:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2024 06:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs Original-Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172716087218336 (code B ref 73387); Tue, 24 Sep 2024 06:55:03 +0000 Original-Received: (at 73387) by debbugs.gnu.org; 24 Sep 2024 06:54:32 +0000 Original-Received: from localhost ([127.0.0.1]:45125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sszRQ-0004le-Gk for submit@debbugs.gnu.org; Tue, 24 Sep 2024 02:54:32 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sszRO-0004lG-2u for 73387@debbugs.gnu.org; Tue, 24 Sep 2024 02:54:30 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id DFBB620002; Tue, 24 Sep 2024 06:53:57 +0000 (UTC) In-Reply-To: <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> (Dmitry Gutov's message of "Tue, 24 Sep 2024 01:41:00 +0300") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292304 Archived-At: > (defun diff-vc-deduce-fileset () > (let ((backend (vc-responsible-backend default-directory)) > + (start (point-min)) > + (end (point-max)) > files) > (save-excursion > - (goto-char (point-min)) > - (while (progn (diff-file-next) (not (eobp))) > - (push (diff-find-file-name nil t) files))) > + (save-restriction > + (widen) > + (goto-char start) > + (diff-beginning-of-file-and-junk) > + (while (progn (diff-file-next) (<= (point) end)) > + (push (diff-find-file-name nil t) files)))) > (list backend (delete nil (nreverse files)) nil nil 'patch))) LGTM. > But to really commit the narrowed diff I think you'll need to do > something about this line in vc-next-action > > ((eq model 'patch) > (vc-checkin files backend nil nil nil (buffer-string))) > > ...to specify altered buffer contents as the diff to use. What is altered buffer contents? Maybe widening is needed here as well?