From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net, bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2024 16:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 73387@debbugs.gnu.org Cc: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net Received: via spool by submit@debbugs.gnu.org id=B.172684854814464 (code B ref -1); Fri, 20 Sep 2024 16:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 16:09:08 +0000 Received: from localhost ([127.0.0.1]:36128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srgBv-0003lE-Fy for submit@debbugs.gnu.org; Fri, 20 Sep 2024 12:09:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:49892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srgBt-0003l3-5k for submit@debbugs.gnu.org; Fri, 20 Sep 2024 12:09:06 -0400 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 1srgBZ-0003Om-TG for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 12:08:45 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srgBX-0003bO-OI for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 12:08:45 -0400 DKIM-Signature: a=rsa-sha256; b=sEpNRnjxaQkweN8WNfptNNOrhuDs3fDz39opWMND4d4ISNeJ1AWhdL1rVPP2c1KualuADpCXMPGRudK7qUg/SJ7WzmQqTwxdX2Q38R+AcM+IwfJeyJ8I7w5nLdwvVycQZl4PVUTrjf0ROXCQHfsCfqggJv/edJWd4KVd4VSkDfmAVei6hRGMeb7FDYsz/GgCDggICq3n8Q1+YMeFCB7hgixb5ihL2Pq2g+9JHD87fAsHS17+M5zIdzZGKwfWtMFcgvEAPMLzoHJxZCh4oIzoAJxfdCPLn9V5lTS0PTWfwt1KEqur3OdjGiG3oeK+PD/d6vTt/Oj32OPrj9onnM6Nbg==; s=purelymail3; d=spwhitton.name; v=1; bh=wGreWrrRiHEA+7gleVn4jMQDDrxrRW5bwFNgmmsSfoc=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=CLgT4uIs+u15YCYR7PvWia0+AUjkIL8C/psmE5Iuchval2cWWLvjZchYf1Uz+y3KnTYaivhs5PZ7yjwaqXNSy5V1q5t/7UdPwBphUK4YaC7boXrCY2ICDo93YE65V7nFH2UECZTRqr3YjxeMn2078K0yJOrVHJpVEs6iv1ec8tsvxI1hAoReR36aUrAPyhVaJTseoPflqXq7ECeKbjhKNAyCDI8H5xKy5YqzY7+VmmhaM+4JXOD5w+qzS8XcgXH4HOsUvzsldFB6fEmCSXo23Hq9H/fUFDINHXd1T0ViG8YxV+TYFUAbnk54v19r5c4JfA2zhpgEdESWbwv8fskUAg==; s=purelymail3; d=purelymail.com; v=1; bh=wGreWrrRiHEA+7gleVn4jMQDDrxrRW5bwFNgmmsSfoc=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: bug-gnu-emacs@gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1440394413 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 20 Sep 2024 16:08:38 +0000 (UTC) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 03605949FDC; Fri, 20 Sep 2024 17:08:37 +0100 (BST) From: Sean Whitton Date: Fri, 20 Sep 2024 17:08:37 +0100 Message-ID: <87zfo28fzu.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=34.202.193.197; envelope-from=spwhitton@spwhitton.name; helo=sendmail.purelymail.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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, GAPPY_SUBJECT=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) X-debbugs-cc: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net Hello, If you do C-c C-n in a diff-mode buffer with multiple hunks, a subsequent C-x v v signals a user-error from diff-file-next. I think that the bug is in how diff-vc-deduce-fileset invokes diff-file-next. I'm not sure exactly how to rework diff-vc-deduce-fileset. It would be nice to fix this because then C-c C-n C-x v v would be a convenient way to commit just a single hunk. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2024 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 73387@debbugs.gnu.org Cc: juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17270092341287 (code B ref 73387); Sun, 22 Sep 2024 12:48:01 +0000 Received: (at 73387) by debbugs.gnu.org; 22 Sep 2024 12:47:14 +0000 Received: from localhost ([127.0.0.1]:41067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssLze-0000Kf-Dl for submit@debbugs.gnu.org; Sun, 22 Sep 2024 08:47:14 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:52888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssLzd-0000KN-4S for 73387@debbugs.gnu.org; Sun, 22 Sep 2024 08:47:14 -0400 DKIM-Signature: a=rsa-sha256; b=O/zSvRRJsVcgqqxlLdLGQUWu2Z+4t2uRT9xcyGQHKq9vl8Z4AJ5RtF7Vwl8kaImvsP7RPNoPaRFfr43A3EeC+hl2pGxopnMWZN80ZPfbxb16LbJ52ARrKLZji6oSbtEr0EsYhZvVIGJBVklVvCwhg8P8lr4LGXgo2mk7L/2L0X+1C1iN58pO4wEBEDyEmiZG9o4A4MujR0t0Lvn6Esa20JLVUG29hw+qBIaU/Fy3jEZB8Wl6dkTZUgief9TP2MjAzX3a9QA9f0GQD+zwpGP18VIn8htiPVR/LL4PBMbmhbR5ZBOIC6vWgCfY1RAN8uXqc44CwQzMO6vun2OleCFZwQ==; s=purelymail3; d=spwhitton.name; v=1; bh=yXYnRTrRXM+RPDeIehLHI0osYjkFucG29EyhxEi11IY=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=WlUo5iBh8MR4ofjVDJGXn0fs9vKh3060ZVW03VarzjTJCVxsyfmL/oAHRQ3eE7Vn0I0LIYRDehv9Z6ez1LqsejMW5uqowYNz4LOes/CMcmhdYKaBZH7cGqUDQ0dL6BfBXsXsWbkDEasobDPdTTGxpd87JKvARZnntZUY6H3w4fxdeZPSzHrqVOjz6XuGsCTaKbqBHSSrpKG8ZcLC0H6zaR13awfKVlhUXgGQa0VcHUnuxutbX4cqHw2oeyuslU3MuM0JBWpUuFgo3dguDVex98yLRKR8L86HSvrQ0s0XEg64OWePGOLUn0S7NOjT+WkYAeJ+FdZ1NiM8I4Y+EQuOxw==; s=purelymail3; d=purelymail.com; v=1; bh=yXYnRTrRXM+RPDeIehLHI0osYjkFucG29EyhxEi11IY=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1550291933; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 22 Sep 2024 12:46:45 +0000 (UTC) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 9B563949929; Sun, 22 Sep 2024 13:46:44 +0100 (BST) From: Sean Whitton In-Reply-To: <87zfo28fzu.fsf@zephyr.silentflame.com> (Sean Whitton's message of "Fri, 20 Sep 2024 17:08:37 +0100") References: <87zfo28fzu.fsf@zephyr.silentflame.com> Date: Sun, 22 Sep 2024 13:46:44 +0100 Message-ID: <87y13jq2iz.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Fri 20 Sep 2024 at 05:08pm +01, Sean Whitton wrote: > If you do C-c C-n in a diff-mode buffer with multiple hunks, a > subsequent C-x v v signals a user-error from diff-file-next. I think > that the bug is in how diff-vc-deduce-fileset invokes diff-file-next. > I'm not sure exactly how to rework diff-vc-deduce-fileset. > > It would be nice to fix this because then C-c C-n C-x v v would be a > convenient way to commit just a single hunk. I applied a brute force fix to diff-vc-deduce-fileset. Attempting to commit a single hunk still fails because after C-c C-n the file name header is not present, and 'git apply' can't handle a hunk without a file name header. We have diff-find-file-name to get the name; I wonder if we should try to construct a fake file header? -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2024 22:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , 73387@debbugs.gnu.org Cc: monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172713130011794 (code B ref 73387); Mon, 23 Sep 2024 22:42:02 +0000 Received: (at 73387) by debbugs.gnu.org; 23 Sep 2024 22:41:40 +0000 Received: from localhost ([127.0.0.1]:44886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssrkR-00034A-Rv for submit@debbugs.gnu.org; Mon, 23 Sep 2024 18:41:40 -0400 Received: from forward502a.mail.yandex.net ([178.154.239.82]:45382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssrkO-00033u-Q5 for 73387@debbugs.gnu.org; Mon, 23 Sep 2024 18:41:38 -0400 Received: from mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:2984:0:640:b1d5:0]) by forward502a.mail.yandex.net (Yandex) with ESMTPS id CD0AA60DF4; Tue, 24 Sep 2024 01:41:09 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 5fbFOwdo8a60-xYbatGiJ; Tue, 24 Sep 2024 01:41:09 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727131269; bh=O2RTnCR0YD00zuOW7ErTYzclJptEFp5AgbCc99XlFaw=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=qHCXjognlHXcPd6kbBZOiPofpifFc+gKI5X/SXiEJeg4fUazgM9EQRWaWpuR54wCm nWxxqWYLVgg0nwMjgjHyqHYFTENjYe/EQNLqZeFoah9AAkPl/BKkq4VmWk7uYYVulW 1JPryzIg5Eu/KTgha3ZniNF9926waCDOAoUthlDQ= Authentication-Results: mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfauth.phl.internal (Postfix) with ESMTP id A864C120006D; Mon, 23 Sep 2024 18:41:05 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Mon, 23 Sep 2024 18:41:05 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddttddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 23 Sep 2024 18:41:03 -0400 (EDT) Message-ID: <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> Date: Tue, 24 Sep 2024 01:41:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87zfo28fzu.fsf@zephyr.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hi! On 20/09/2024 19:08, Sean Whitton wrote: > X-debbugs-cc: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net > > Hello, > > If you do C-c C-n in a diff-mode buffer with multiple hunks, a > subsequent C-x v v signals a user-error from diff-file-next. I think > that the bug is in how diff-vc-deduce-fileset invokes diff-file-next. > I'm not sure exactly how to rework diff-vc-deduce-fileset. > > It would be nice to fix this because then C-c C-n C-x v v would be a > convenient way to commit just a single hunk. This seems to work: diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 4810b9ce01c..dc59621200c 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -3133,11 +3133,16 @@ diff-syntax-fontify-props ;;;###autoload (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))) (defun diff--filter-substring (str) 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. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2024 22:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , 73387@debbugs.gnu.org Cc: monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172713134511897 (code B ref 73387); Mon, 23 Sep 2024 22:43:01 +0000 Received: (at 73387) by debbugs.gnu.org; 23 Sep 2024 22:42:25 +0000 Received: from localhost ([127.0.0.1]:44890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssrlB-00035p-BK for submit@debbugs.gnu.org; Mon, 23 Sep 2024 18:42:25 -0400 Received: from forward501d.mail.yandex.net ([178.154.239.209]:33832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssrl8-00035Z-Bu for 73387@debbugs.gnu.org; Mon, 23 Sep 2024 18:42:23 -0400 Received: from mail-nwsmtp-smtp-production-main-99.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-99.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:94a0:0:640:af90:0]) by forward501d.mail.yandex.net (Yandex) with ESMTPS id 543B260CD1; Tue, 24 Sep 2024 01:41:57 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-99.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id sfbBOv05OGk0-L36OvzzR; Tue, 24 Sep 2024 01:41:56 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727131316; bh=Z69PtS59wZXGQAfVruZyogP3SSZNbPuWm1yR1EsmPBI=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=XssYxp4sLN0MkCDgzesPUiZAIP/Vr4MwEW0IoNqfIoYco47Cc7jfGD+O+33k8XIXu fLRjRO79VD2LUE34O9DBwbSWZrShLQD51wAl9AdP/1nd9c1PZKcsLegfCvoT8E2RL7 /ZeH14JL+oOIpHxuY93LGVvklV+ncqFpclhouiM0= Authentication-Results: mail-nwsmtp-smtp-production-main-99.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfauth.phl.internal (Postfix) with ESMTP id E20381200066; Mon, 23 Sep 2024 18:41:53 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Mon, 23 Sep 2024 18:41:53 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddttddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthhopehmohhnnhhivg hrsehirhhordhumhhonhhtrhgvrghlrdgtrg X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 23 Sep 2024 18:41:52 -0400 (EDT) Message-ID: <83c3658a-ab73-4d85-82ea-63298c7fdb78@yandex.ru> Date: Tue, 24 Sep 2024 01:41:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <87y13jq2iz.fsf@zephyr.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87y13jq2iz.fsf@zephyr.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 22/09/2024 15:46, Sean Whitton wrote: > Attempting to commit a single hunk still fails because after C-c C-n the > file name header is not present, and 'git apply' can't handle a hunk > without a file name header. > > We have diff-find-file-name to get the name; I wonder if we should try > to construct a fake file header? Temporarily killing the "outside" hunks might be a little easier to implement. This was the narrowing could also span multiple files, for example. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n 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 X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Sean Whitton Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172716087218336 (code B ref 73387); Tue, 24 Sep 2024 06:55:03 +0000 Received: (at 73387) by debbugs.gnu.org; 24 Sep 2024 06:54:32 +0000 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 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id DFBB620002; Tue, 24 Sep 2024 06:53:57 +0000 (UTC) From: Juri Linkov In-Reply-To: <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> (Dmitry Gutov's message of "Tue, 24 Sep 2024 01:41:00 +0300") Organization: LINKOV.NET References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> Date: Tue, 24 Sep 2024 09:32:24 +0300 Message-ID: <86msjxefkv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) > (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? From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2024 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Dmitry Gutov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17271932789616 (code B ref 73387); Tue, 24 Sep 2024 15:55:02 +0000 Received: (at 73387) by debbugs.gnu.org; 24 Sep 2024 15:54:38 +0000 Received: from localhost ([127.0.0.1]:50960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st7s6-0002V2-Ep for submit@debbugs.gnu.org; Tue, 24 Sep 2024 11:54:38 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:34850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st7s3-0002Ud-7J for 73387@debbugs.gnu.org; Tue, 24 Sep 2024 11:54:36 -0400 DKIM-Signature: a=rsa-sha256; b=n9JMEajSnrmhFr7m0InwtRRdhiW0oH4A9o6fuxiGcq+IoOwAdH3v40Fk2JD6IR8lFqzx/hsP7k9KrHPIPvoSOKP6amsuZCPQVeE56QUY6v9FdOpBQfPS9DPFcKECZ1w5LcxflQ2r5Q/zG1wOJhwdwlPZozGZdG9WyWP/JLvXkCYp49HtEECu3my53R63YJVFanCp56gp8IJEbgNwPWyD0PMCabeE+nVtRYIT9nEZVqZT/keK8oAmpWYpv0xQ+QtNMgWvqxVj+WHVlNu+4e0sfaJbEKzh3NxeQJLwu/QDlkDE7T2DLyDVxIyfMhOW22h8QUN/hF5q/4FPKj1gS0AUDw==; s=purelymail1; d=spwhitton.name; v=1; bh=YoMm+DDA0BrV+YirmcIr9J5Y9gsd6oSd4hhzyCZZNfM=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=RJ3+peMSN5OEUxd1E60p3G4btC21H2fzR0OpYkuMaM/xDwzvLxsrnsd1W2HQ2taHZlI76V2TrqPwADP1a/VIJ5vhiUCoitvJe3nNBDukuE6kYHUDkGFeVaDSdtd2fgxSQRxFf9swCtgCZHLcxHPrvvtEIApJDGksRdcW42vj2unJbL7I0g651jF2f7QWZx2Y8bnJc/klv+Jjahki6yWXs1JbQkSqXQpY2fAwoyZrstlbHAmRQieC64t+L/XpKI0FWUH73najKv9O+NgFvaaWZL14Dimm5c1+A+wtuHcHjUNxlfEPvF94biDKna2iIm/BGmHH8RdzpBvGq1+3rqsXHQ==; s=purelymail1; d=purelymail.com; v=1; bh=YoMm+DDA0BrV+YirmcIr9J5Y9gsd6oSd4hhzyCZZNfM=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1898155631; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 24 Sep 2024 15:54:03 +0000 (UTC) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 57F85949F28; Tue, 24 Sep 2024 16:54:02 +0100 (BST) From: Sean Whitton In-Reply-To: <86msjxefkv.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 24 Sep 2024 09:32:24 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> Date: Tue, 24 Sep 2024 16:54:02 +0100 Message-ID: <87cykt2gkl.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 24 Sep 2024 at 09:32am +03, Juri Linkov wrote: >> 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? Yeah, could you say more, please, Dmitry? What we basically want is a non-contiguous region, including the hunk and the relevant file header. Are you thinking something like two (BEG . END) pairs specifying that region? -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2024 17:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , Juri Linkov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17271994358983 (code B ref 73387); Tue, 24 Sep 2024 17:38:02 +0000 Received: (at 73387) by debbugs.gnu.org; 24 Sep 2024 17:37:15 +0000 Received: from localhost ([127.0.0.1]:59383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st9TL-0002Ke-PG for submit@debbugs.gnu.org; Tue, 24 Sep 2024 13:37:15 -0400 Received: from forward502d.mail.yandex.net ([178.154.239.210]:47086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st9TI-0002KJ-GD for 73387@debbugs.gnu.org; Tue, 24 Sep 2024 13:37:10 -0400 Received: from mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1c19:0:640:2e7f:0]) by forward502d.mail.yandex.net (Yandex) with ESMTPS id 2A05D618ED; Tue, 24 Sep 2024 20:36:41 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id baX8GX1oD4Y0-NFqqHOSS; Tue, 24 Sep 2024 20:36:40 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727199400; bh=fMRiArU6ShkrXoMWlKRvpQ6D8qAzDyjcOOHib5L1tDU=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=d5fJDr1egopCqtCGE1MI3BZlaR8qMWYU+wmbw7d7UxBs8/L/PCBttuyro5tONdG10 2xUOJoglLgEy1L/JJBXe+OKVCHo5XNFoEIcLTlwL3YlYWVx7iwwJvoJWkYR6q3yV2u +91eKBH/Qj/AGo8Nf0XxM2EgeMlfQe92eATOZ/hk= Authentication-Results: mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id 854B11200066; Tue, 24 Sep 2024 13:36:37 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 24 Sep 2024 13:36:37 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtfedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohep jeeffeekjeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehmohhnnhhivg hrsehirhhordhumhhonhhtrhgvrghlrdgtrg X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Sep 2024 13:36:35 -0400 (EDT) Message-ID: Date: Tue, 24 Sep 2024 20:36:32 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87cykt2gkl.fsf@zephyr.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 24/09/2024 18:54, Sean Whitton wrote: > On Tue 24 Sep 2024 at 09:32am +03, Juri Linkov wrote: > >>> 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? > Yeah, could you say more, please, Dmitry? > > What we basically want is a non-contiguous region, including the hunk > and the relevant file header. Are you thinking something like two > (BEG . END) pairs specifying that region? That's the question - what to do there (if be can), instead of passing the whole buffer string. Maybe it should call again some new function inside diff-mode package which would return an altered patch based on the current restrictions (but with file headers added). Simply calling 'widen' could counteract what seems like your intent. OTOH, maybe what you want to do here could be reached some other way - e.g. instead of 'C-x n n' we would have a command which edits the diff buffer to leave in only the hunks intersecting the current region. When the subsequent (buffer-string) would do the right thing. The latter might also be a better fit for the overall workflow we were thinking about (create a diff -> alter it as necessary -> commit). From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Sep 2024 06:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172724613626273 (code B ref 73387); Wed, 25 Sep 2024 06:36:01 +0000 Received: (at 73387) by debbugs.gnu.org; 25 Sep 2024 06:35:36 +0000 Received: from localhost ([127.0.0.1]:42816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stLcd-0006pg-Pg for submit@debbugs.gnu.org; Wed, 25 Sep 2024 02:35:36 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:42686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stLca-0006hW-El for 73387@debbugs.gnu.org; Wed, 25 Sep 2024 02:35:34 -0400 DKIM-Signature: a=rsa-sha256; b=fpHe1r9w/z61pXMF5DS4cxaWtM7+y04EkhYiLPgOF8Qv0rBm2g9+Nvr4i0zKT3Hh6DyRi73L3Dauk2BWdAou60oTAIij+QDF20CXuA+PNAPvt+eLIXy6Q0KmVoR5drummdPUJmcg7NNdU7UI1uIpwnVDGspU5skqdsZiIkDA9a2KuOmlDiN9519W973SCE9EE7n1O6YfG0WddOl7dxh4EWkfgV97MTep8O3BkFJmfGUyv2aOcYHfvR3slAAuRWyLAEpnbcg6DfDDxUjmIdLMf2eAomleCtx7ZjAUHJnpEXhv7ytur7bUkgdubMlSKPHM57EcDScDMty/cZG2tAMvRw==; s=purelymail1; d=spwhitton.name; v=1; bh=mOiWcQl8NxWDZsCWqYG+PPvqU3VEHUbWtNrx7qfcl9c=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=QCnvKCfXixb0shmIG/bLA2NjLNdDrSmq/i36/mdcmDVuaFNFJk7ex27bm2EA5mDAhL204SPdhFP+qdHZE70rwQ0tPncKffakIqTs+aWHhHwfwUBNfNvFSOK0lJ3TbtIDGI3ioHgzWTTYLM35npP7nfbjTv++pzXq1JBHfjYvZnzwo1s1znb2v2J8OB2FOra6ps70IAbHzOMJJLVumC02z5dK4Q1n0VeK6fE7iygvBmFmPf35JWS9aKjKG1e8uhsDyxSAFjAkNH5qrohMFoItn0y2SfXSvQneAxqxg3hBRxMAbRX8Z2wXKPJA7U275aYkQvgBR1U+hy/yr3ufMRs6mA==; s=purelymail1; d=purelymail.com; v=1; bh=mOiWcQl8NxWDZsCWqYG+PPvqU3VEHUbWtNrx7qfcl9c=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1772134037; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 25 Sep 2024 06:34:52 +0000 (UTC) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id C5088949F2A; Wed, 25 Sep 2024 07:34:51 +0100 (BST) From: Sean Whitton In-Reply-To: (Dmitry Gutov's message of "Tue, 24 Sep 2024 20:36:32 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> Date: Wed, 25 Sep 2024 07:34:51 +0100 Message-ID: <87jzf01bsk.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 24 Sep 2024 at 08:36pm +03, Dmitry Gutov wrote: > OTOH, maybe what you want to do here could be reached some other way - > e.g. instead of 'C-x n n' we would have a command which edits the diff buffer > to leave in only the hunks intersecting the current region. When the > subsequent (buffer-string) would do the right thing. > > The latter might also be a better fit for the overall workflow we were > thinking about (create a diff -> alter it as necessary -> commit). Yeah, I already wrote something like that for my init.el. I would like to find some way to combine it with the existing C-c C-n, if we can. Maybe: if (equal (diff-bounds-of-hunk) (list (point-min) (point-max)), then C-x v v prompts, "Kill all hunks but this one and commit? (y/n)" ? Else if the buffer is narrowed, C-x v v signals a user-error that it can't handle arbitrary narrowings. Then it's just C-c C-n C-x v v but you're asked to confirm before all the killing occurs, just in case. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Sep 2024 23:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172730804017648 (code B ref 73387); Wed, 25 Sep 2024 23:48:02 +0000 Received: (at 73387) by debbugs.gnu.org; 25 Sep 2024 23:47:20 +0000 Received: from localhost ([127.0.0.1]:35379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stbj6-0004aX-0b for submit@debbugs.gnu.org; Wed, 25 Sep 2024 19:47:20 -0400 Received: from forward502d.mail.yandex.net ([178.154.239.210]:45020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stbj2-0004aK-Ge for 73387@debbugs.gnu.org; Wed, 25 Sep 2024 19:47:18 -0400 Received: from mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:3e0b:0:640:c81:0]) by forward502d.mail.yandex.net (Yandex) with ESMTPS id 3558A60BC6; Thu, 26 Sep 2024 02:46:17 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id DkeC935o9Cg0-3Lbvhh7I; Thu, 26 Sep 2024 02:46:16 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727307976; bh=Pifhr3PRCtQznjWYS5bFmnKpWBOz7M4Ta+Hk2ismNWY=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=iB1ynIjo3aJehLyYa3fNN5XIQbpRu+xOAq+5uqgIAewlbAmLDlh3npUnoGw9K2J4s 7DUKEKkKF5tYS0NEJvczLBOKusiMtgqiR60V6t1NcaVtrgbZyTYDs+qAu32S7kOb9a wMPkGKZTkJEF8ktJThli/f3KS20OXwI8yWOr+H4I= Authentication-Results: mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfauth.phl.internal (Postfix) with ESMTP id 8D9F21200066; Wed, 25 Sep 2024 19:46:13 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Wed, 25 Sep 2024 19:46:13 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtiedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Sep 2024 19:46:11 -0400 (EDT) Message-ID: Date: Thu, 26 Sep 2024 02:46:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87jzf01bsk.fsf@zephyr.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 25/09/2024 09:34, Sean Whitton wrote: > On Tue 24 Sep 2024 at 08:36pm +03, Dmitry Gutov wrote: > >> OTOH, maybe what you want to do here could be reached some other way - >> e.g. instead of 'C-x n n' we would have a command which edits the diff buffer >> to leave in only the hunks intersecting the current region. When the >> subsequent (buffer-string) would do the right thing. >> >> The latter might also be a better fit for the overall workflow we were >> thinking about (create a diff -> alter it as necessary -> commit). > Yeah, I already wrote something like that for my init.el. I would like > to find some way to combine it with the existing C-c C-n, if we can. > > Maybe: > if (equal (diff-bounds-of-hunk) (list (point-min) (point-max)), > then C-x v v prompts, "Kill all hunks but this one and commit? (y/n)" ? > > Else if the buffer is narrowed, C-x v v signals a user-error that it > can't handle arbitrary narrowings. > > Then it's just C-c C-n C-x v v but you're asked to confirm before all > the killing occurs, just in case. Suppose C-c C-n (or probably a different but similar binding) edited the diff instead of applying the narrowing, in a way that retained the file header(s), but keeping only the hunks intersecting the region or just the current one. Would that work for you just as well, or do you prefer to use narrowing anyway, for some other reasons? From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Sep 2024 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172743816918652 (code B ref 73387); Fri, 27 Sep 2024 11:57:02 +0000 Received: (at 73387) by debbugs.gnu.org; 27 Sep 2024 11:56:09 +0000 Received: from localhost ([127.0.0.1]:55956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1su9Zw-0004qm-OS for submit@debbugs.gnu.org; Fri, 27 Sep 2024 07:56:09 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:43772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1su9Zt-0004q3-Vl for 73387@debbugs.gnu.org; Fri, 27 Sep 2024 07:56:07 -0400 DKIM-Signature: a=rsa-sha256; b=V41rzYny6XnixzzQPAu3q6bJrBqoG6yZPwH5ymwnBrAc5SDHhe9uWzLsCmgzaxdn+1EsAnhg0T0apaBBHwRgWFd1og+w0JwVNQv6s5LeGVVzcw3fCgk7/OEA5wRovrXvUK2NKeXMR9Vk5o62xdWH0pCzx2pZrmNqk4WwNQVLexSnbrg8G3tTckfkm4kNhlu/0k3kwdXk9zX63ZncECCld//pPCJ50DluQuXMXNBcQ8rdXQPJQrcQvM7gVyEtzaNINLb38qIulGWlckNeSj62jUfa+s+TZz+gJkdbAVki3obxT8/4ZzE9zwEk/FosgkV4EMM3rJsgS8NWP3d2g9McwA==; s=purelymail1; d=spwhitton.name; v=1; bh=15BwIodTa/yIS/N/rGIH23M1rhP1YKM/32YqYIpf+tU=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=tpIxBErbWHFBV6d7gCNsjzRoViOwQCQ4AfWethxHIhXID4H5UNg5FdpJcTY6NMSn4LXHPqk1ZGm1MZ4jCO337vVWFShhWoebHMRg9toLrd4jvqEpuuKlPjOKBlbXQTctkDs/wOIjCcYMnaOGrhoZ/ZkGM/BGejm6lB6deX95HSwRRpQ9sPJlxqcWINpFfSRpjjf0euXoMxQp1BVa+EYUWshFJeg3r+9A+7F4MjUqHqG8q00Q4ALHwAU8Ryc931gO/SgmpOtxF/gZpIPZ7R5Eut0F1Na2cHFdKhb7jbKI52rZFUJIdGk1f8ZusK7yFaorgI2j1z5GLOAXY57+ufeCJw==; s=purelymail1; d=purelymail.com; v=1; bh=15BwIodTa/yIS/N/rGIH23M1rhP1YKM/32YqYIpf+tU=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1582981533; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 27 Sep 2024 11:55:29 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 100E47E3DFD; Fri, 27 Sep 2024 12:55:28 +0100 (BST) From: Sean Whitton In-Reply-To: (Dmitry Gutov's message of "Thu, 26 Sep 2024 02:46:08 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> Date: Fri, 27 Sep 2024 12:55:28 +0100 Message-ID: <87y13dfgzz.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Thu 26 Sep 2024 at 02:46am +03, Dmitry Gutov wrote: > Suppose C-c C-n (or probably a different but similar binding) edited the diff > instead of applying the narrowing, in a way that retained the file header(s), > but keeping only the hunks intersecting the region or just the current one. > > Would that work for you just as well, or do you prefer to use narrowing > anyway, for some other reasons? It would work for me, and has a few advantages: - it means you just hit 'g' afterwards, not C-x n w and then 'g' - it fits better with our general paradigm of killing what you don't want to include and then committing. On the other hand, it doesn't seem ideal that after C-c C-n you can, for example, use C-c C-a or C-c M-k, but not C-x v v. That could break you out of your mental flow. What do you think about this: - add a command which does the kill-all-but-this-hunk (or hunks in region if mark active) thing -- it's generally useful. - make C-x v v on a narrowed buffer, by default, issue a message saying "Cannot commit patch when narrowed, consider " - add a user option that when non-nil means C-x v v on a narrowed buffer automatically widens, invokes the new command, and then commits. My thinking is that the latter behaviour is complex and so shouldn't be the default, but once you understand what's going on then there is a good chance you want to enable it. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Sep 2024 19:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17274644827183 (code B ref 73387); Fri, 27 Sep 2024 19:15:02 +0000 Received: (at 73387) by debbugs.gnu.org; 27 Sep 2024 19:14:42 +0000 Received: from localhost ([127.0.0.1]:49487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suGQM-0001rn-2b for submit@debbugs.gnu.org; Fri, 27 Sep 2024 15:14:42 -0400 Received: from forward501d.mail.yandex.net ([178.154.239.209]:48850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suGQH-0001rK-Nj for 73387@debbugs.gnu.org; Fri, 27 Sep 2024 15:14:40 -0400 Received: from mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5da8:0:640:b4e9:0]) by forward501d.mail.yandex.net (Yandex) with ESMTPS id 638D06107F; Fri, 27 Sep 2024 22:14:05 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 2Ecm9404TuQ0-wKsIeNrW; Fri, 27 Sep 2024 22:14:04 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727464444; bh=PXFHxJ2cIs2bxvLHgaUPIobeZHSavnlEJQeg8L4gCVA=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=XcBj1cGXuJFXH+vIoU9/pHJoH9TzlIOHDVPgsc0UEzoX3ZLUn4sx5yBvxhnJJlg60 YxnG3GSaTsatoq9CA0ff6uzqZ2Emn4Ch43pVO7HdF9lcKS3TGM5ZhCeB2TEue8ETf/ +jtH0/2tA1MAz6wurS2foDpcVS8of1GeHT4Py+GA= Authentication-Results: mail-nwsmtp-smtp-production-main-92.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id C997A1200043; Fri, 27 Sep 2024 15:14:01 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 27 Sep 2024 15:14:01 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtledgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgi drrhhuqeenucggtffrrghtthgvrhhnpeeihfejueevteffffdvfeetffffkefhuedujeei heehiedulefghefgffefudffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegughhuthhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghl ihhthidqudeffeefleelheehvddqvdelgeejjeejjeeiqdgughhuthhovheppeihrghnug gvgidrrhhusehfrghsthhmrghilhdrtghomhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonh drnhgrmhgvpdhrtghpthhtohepjeeffeekjeesuggvsggsuhhgshdrghhnuhdrohhrghdp rhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrgdprhgtph htthhopehjuhhriheslhhinhhkohhvrdhnvght X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Sep 2024 15:13:59 -0400 (EDT) Message-ID: <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> Date: Fri, 27 Sep 2024 22:13:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87y13dfgzz.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 27/09/2024 14:55, Sean Whitton wrote: > Hello, > > On Thu 26 Sep 2024 at 02:46am +03, Dmitry Gutov wrote: > >> Suppose C-c C-n (or probably a different but similar binding) edited the diff >> instead of applying the narrowing, in a way that retained the file header(s), >> but keeping only the hunks intersecting the region or just the current one. >> >> Would that work for you just as well, or do you prefer to use narrowing >> anyway, for some other reasons? > > It would work for me, and has a few advantages: > > - it means you just hit 'g' afterwards, not C-x n w and then 'g' Yep. Or you could use 'undo' to get back to a previous state of the buffer. > - it fits better with our general paradigm of killing what you don't > want to include and then committing. > > On the other hand, it doesn't seem ideal that after C-c C-n you can, for > example, use C-c C-a or C-c M-k, but not C-x v v. That could break you > out of your mental flow. Fair point, and maybe we could support both. > What do you think about this: > > - add a command which does the kill-all-but-this-hunk (or hunks in > region if mark active) thing -- it's generally useful. > > - make C-x v v on a narrowed buffer, by default, issue a message saying > "Cannot commit patch when narrowed, consider " Or it would implement that previous alternative - using the modified buffer string that's limited to the current narrowing. I'm somewhat concerned about supporting both approaches (how different are the code paths going to be?), but if that's needed for usability, perhaps it's okay. > - add a user option that when non-nil means C-x v v on a narrowed buffer > automatically widens, invokes the new command, and then commits. And/or Emacs could by default prompt whether it should do that. And that prompting behavior could indeed be decided by a user option. > My thinking is that the latter behaviour is complex and so shouldn't be > the default, but once you understand what's going on then there is a > good chance you want to enable it. Maybe if the prompt is easy enough to understand, that will be fine... From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2024 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17276536937950 (code B ref 73387); Sun, 29 Sep 2024 23:49:02 +0000 Received: (at 73387) by debbugs.gnu.org; 29 Sep 2024 23:48:13 +0000 Received: from localhost ([127.0.0.1]:42983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv3e3-00023F-GO for submit@debbugs.gnu.org; Sun, 29 Sep 2024 19:48:12 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:46886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv3dV-0001sH-OO for 73387@debbugs.gnu.org; Sun, 29 Sep 2024 19:48:01 -0400 DKIM-Signature: a=rsa-sha256; b=sVPA9x9DJl1xmWULz5rCtvD2KwERizezm7Yx/nMNeZw7FOE8vBlNREdKMXm/huXNVJ2f4MC/V2imyH/iT4ruJ6j22/io5eXHz7tOvtEMiVNSee20JM4Twvzw5lfo/+ybP0SWc28XVo2mOfGOj3MRsxm3jL5RCf49QeGoYAtsjFlG/I79DIp+0z6cAx9RTQVt+0LQtZ6JE5pJ8UBahIf5Kg0SYgijGhtTZcgyWnEE1sxeDC8CjfocRF0rKBPF3XNlVf3TtDefhi+PPUzsIcL3jv0YfLF8JoeneTTavUpWiXaeY2LYbaYNVwpqyh7JTXh4s6ozK4HjjEDX8rOAHBVuBA==; s=purelymail1; d=spwhitton.name; v=1; bh=vr/NWKrT2vPUE5lLcAcxyIxQxha/3iwP2BJ9HUtfPiY=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=jxtOqiWGu05EGxzrv0vHFP+SJznwgDdDWFj4qSdFV2AJQs2d4kD04yuRhmM5a4THMWZsSydaIG18EB2o1MYBhRiAFHgX2Hxcwxf3xru1K3BtS9q5uFV3HSrJsGTfVb6X8xfOCjEFXtDzYFC2bAMqcp3jj25sR0Iq10Kq5ti4yS7VBiE40Xxf/tLYA/6CIt8Ic0vk1D2XpfGdfJpbyj4bR2KDMRzey+k7gM8eybgBq/WYapXKV8mCM+uRECuPQmvL58npIHbC2zt4snPKqVR/GJWmBCRAJpCLTRXlqXrnV8XAlcHMt0zNWf9+Sl+qtS5dpPZUpwx2BUMPFTMo4wzwQQ==; s=purelymail1; d=purelymail.com; v=1; bh=vr/NWKrT2vPUE5lLcAcxyIxQxha/3iwP2BJ9HUtfPiY=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1488085670; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 29 Sep 2024 23:46:50 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id BCAE57E0B3E; Mon, 30 Sep 2024 00:46:46 +0100 (BST) From: Sean Whitton In-Reply-To: <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> (Dmitry Gutov's message of "Fri, 27 Sep 2024 22:13:56 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> Date: Mon, 30 Sep 2024 07:46:46 +0800 Message-ID: <87h69ydnvd.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Fri 27 Sep 2024 at 10:13pm +03, Dmitry Gutov wrote: >> What do you think about this: >> - add a command which does the kill-all-but-this-hunk (or hunks in >> region if mark active) thing -- it's generally useful. >> - make C-x v v on a narrowed buffer, by default, issue a message saying >> "Cannot commit patch when narrowed, consider " > > Or it would implement that previous alternative - using the modified buffer > string that's limited to the current narrowing. > > I'm somewhat concerned about supporting both approaches (how different are the > code paths going to be?), but if that's needed for usability, perhaps it's > okay. Hmm, I thought that we thought the modified buffer string approach was too messy. Would you mind outlining your proposal as a whole and how it differs from my most recent one? >> - add a user option that when non-nil means C-x v v on a narrowed buffer >> automatically widens, invokes the new command, and then commits. > > And/or Emacs could by default prompt whether it should do that. And that > prompting behavior could indeed be decided by a user option. > >> My thinking is that the latter behaviour is complex and so shouldn't be >> the default, but once you understand what's going on then there is a >> good chance you want to enable it. > > Maybe if the prompt is easy enough to understand, that will be fine... Yeah. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 00:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172765615415380 (code B ref 73387); Mon, 30 Sep 2024 00:30:01 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 00:29:14 +0000 Received: from localhost ([127.0.0.1]:43154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv4Hq-000400-75 for submit@debbugs.gnu.org; Sun, 29 Sep 2024 20:29:14 -0400 Received: from forward501a.mail.yandex.net ([178.154.239.81]:37248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sv4Hm-0003zs-Oc for 73387@debbugs.gnu.org; Sun, 29 Sep 2024 20:29:12 -0400 Received: from mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0f:604:0:640:5e0e:0]) by forward501a.mail.yandex.net (Yandex) with ESMTPS id 4760060E02; Mon, 30 Sep 2024 03:28:06 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 2SM0EplgueA0-0MpKgsQl; Mon, 30 Sep 2024 03:28:05 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727656085; bh=BLaabkDNCoVM2cheT/WI+nZ6J1E3mTMMGd/3j/puWt8=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=aAwusFb6BjhMZBAcfPbUq9bkcjy/BN3b/NzS+Gru+0OGDnGNotPZHdNW2FjI12HdX 976Xy2N6d7nElRd8zHVoLruHlr8yYLYgB853GdlPkKVyjDiTvsTlstNR4rrsRLiN+Q wg273j3/GP2w1SsCoe5FNeLQphAPYAhiv53Csouw= Authentication-Results: mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfauth.phl.internal (Postfix) with ESMTP id 3D3C01200043; Sun, 29 Sep 2024 20:28:02 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Sun, 29 Sep 2024 20:28:02 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddugedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Sep 2024 20:27:59 -0400 (EDT) Message-ID: Date: Mon, 30 Sep 2024 03:27:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87h69ydnvd.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 30/09/2024 02:46, Sean Whitton wrote: > Hello, > > On Fri 27 Sep 2024 at 10:13pm +03, Dmitry Gutov wrote: > >>> What do you think about this: >>> - add a command which does the kill-all-but-this-hunk (or hunks in >>> region if mark active) thing -- it's generally useful. >>> - make C-x v v on a narrowed buffer, by default, issue a message saying >>> "Cannot commit patch when narrowed, consider " >> >> Or it would implement that previous alternative - using the modified buffer >> string that's limited to the current narrowing. >> >> I'm somewhat concerned about supporting both approaches (how different are the >> code paths going to be?), but if that's needed for usability, perhaps it's >> okay. > > Hmm, I thought that we thought the modified buffer string approach was > too messy. Would you mind outlining your proposal as a whole and how it > differs from my most recent one? Actually, how about we start with your suggested steps, sans for the last one, for now. Meaning, just aborting with a message when the buffer is narrowed, without the user option. We would not be removing any existing functionality this way (this scenario didn't work before, after all), and we could add it later. Would that work for your habits/scenarios? From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 09:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17276891691069 (code B ref 73387); Mon, 30 Sep 2024 09:40:02 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 09:39:29 +0000 Received: from localhost ([127.0.0.1]:44738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svCsL-0000HA-0y for submit@debbugs.gnu.org; Mon, 30 Sep 2024 05:39:29 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:56976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svCsI-0000Gq-9W for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 05:39:27 -0400 DKIM-Signature: a=rsa-sha256; b=ZxK7Gnj0REVONT5v5SO15Iwy8KT/Fm26nRgjWYEaNg13CXNQQBBVgrEHHZ/DaulykR2mwVqy0q1dgp2y9Yk39/+B8ao8wM6RKcDsOCW3ZPf2POKXTUTv9/ob4uca4+uPObmd6oBMY2XTjIPtyhCfmNI1YFYg1QVxUqmcuDVq22Gbe2lh9AXpXbNl+bYDYgF2lPfV6h3c0gngNFbX62gZL/0sv3ci7Zr98rd8sZU8BQ61AZ55jA/hjI08OvoydPHgxHuLRhJEo5oalxt40vK+vdl+FqT/JOyF0+lY0kcMcfhI5TUjGFVBJat024hPYxGv/iNnkhDmXFf8F+49Ag6KRw==; s=purelymail1; d=spwhitton.name; v=1; bh=SEfayYzNdujNLo7MhVoGDoIVllokd7TyEWPBAYua3MQ=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=WlaZD5LLoKDhvBC+EFLwVWuxr+1/IIEw/mJ3/3j7gEMZxLfk+IbkzIs3feFnbTlw6gSzesjyrxyYoV5+Eynom8cBkT8/KJ/gcJp80GUttNY2vGaY62tHQ9HrACpPruw1ZyNpARNsfY/2dAr6nH/QO/uAyhuOnHTJP14d0ylE5lW+G3xhpsuxU+4jOico5OaHDc1EWuuy/Eq8WTpD70T3STGuCODe0Z3EREfamCPpqEg1FBZjftK8JGU4daiLWQu6Um6P1bYf2Qr/BkGYl0Aqnw9mHnJfy5P82zvbf0ysTLUh67YNIO3yBTd9tsTpcDb5LMzC5ajOcV7wX/qI813QMw==; s=purelymail1; d=purelymail.com; v=1; bh=SEfayYzNdujNLo7MhVoGDoIVllokd7TyEWPBAYua3MQ=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 960300349; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 30 Sep 2024 09:38:43 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id AC8DF7E1ACF; Mon, 30 Sep 2024 10:38:39 +0100 (BST) From: Sean Whitton In-Reply-To: (Dmitry Gutov's message of "Mon, 30 Sep 2024 03:27:56 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> Date: Mon, 30 Sep 2024 17:38:39 +0800 Message-ID: <878qv9scps.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Mon 30 Sep 2024 at 03:27am +03, Dmitry Gutov wrote: > On 30/09/2024 02:46, Sean Whitton wrote: >> Hello, >> On Fri 27 Sep 2024 at 10:13pm +03, Dmitry Gutov wrote: >> >>>> What do you think about this: >>>> - add a command which does the kill-all-but-this-hunk (or hunks in >>>> region if mark active) thing -- it's generally useful. >>>> - make C-x v v on a narrowed buffer, by default, issue a message saying >>>> "Cannot commit patch when narrowed, consider " >>> >>> Or it would implement that previous alternative - using the modified buffer >>> string that's limited to the current narrowing. >>> >>> I'm somewhat concerned about supporting both approaches (how different are the >>> code paths going to be?), but if that's needed for usability, perhaps it's >>> okay. >> Hmm, I thought that we thought the modified buffer string approach was >> too messy. Would you mind outlining your proposal as a whole and how it >> differs from my most recent one? > > Actually, how about we start with your suggested steps, sans for the last one, > for now. Meaning, just aborting with a message when the buffer is narrowed, > without the user option. > > We would not be removing any existing functionality this way (this scenario > didn't work before, after all), and we could add it later. > > Would that work for your habits/scenarios? You mean, just adding the command which kills hunks? -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172769115817634 (code B ref 73387); Mon, 30 Sep 2024 10:13:01 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 10:12:38 +0000 Received: from localhost ([127.0.0.1]:44765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svDOQ-0004aM-5s for submit@debbugs.gnu.org; Mon, 30 Sep 2024 06:12:38 -0400 Received: from forward500d.mail.yandex.net ([178.154.239.208]:41152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svDON-0004aE-4n for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 06:12:37 -0400 Received: from mail-nwsmtp-smtp-production-main-42.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-42.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:4214:0:640:6125:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 59C8660B26; Mon, 30 Sep 2024 13:11:28 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-42.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id OBWKLVjOnOs0-1mXfj9KY; Mon, 30 Sep 2024 13:11:27 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727691087; bh=O52qedS54GXq4We5BgyjRMTSzlgEn7/a1Iu0ADb7NEA=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=cHTaY7O4EYonAJStnCHMkmxLVmVAGOmrEnIbHbxHPvJdAyv0EkBKr6AxIU/GJ47fj dNaRAGPmn5mc8q+BHC3cli6Nrs/oiJe0y6YlP07FpLD+//4iTvZ7TaRCBu40uuRphs HpAOuWQuQO9oht7NqmNj2mo/clHVp4Or7oSg4G2Q= Authentication-Results: mail-nwsmtp-smtp-production-main-42.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id 03C071200043; Mon, 30 Sep 2024 06:11:23 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 30 Sep 2024 06:11:24 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduhedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Sep 2024 06:11:21 -0400 (EDT) Message-ID: <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> Date: Mon, 30 Sep 2024 13:11:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <878qv9scps.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 30/09/2024 12:38, Sean Whitton wrote: > Hello, > > On Mon 30 Sep 2024 at 03:27am +03, Dmitry Gutov wrote: > >> On 30/09/2024 02:46, Sean Whitton wrote: >>> Hello, >>> On Fri 27 Sep 2024 at 10:13pm +03, Dmitry Gutov wrote: >>> >>>>> What do you think about this: >>>>> - add a command which does the kill-all-but-this-hunk (or hunks in >>>>> region if mark active) thing -- it's generally useful. >>>>> - make C-x v v on a narrowed buffer, by default, issue a message saying >>>>> "Cannot commit patch when narrowed, consider " >>>> Or it would implement that previous alternative - using the modified buffer >>>> string that's limited to the current narrowing. >>>> >>>> I'm somewhat concerned about supporting both approaches (how different are the >>>> code paths going to be?), but if that's needed for usability, perhaps it's >>>> okay. >>> Hmm, I thought that we thought the modified buffer string approach was >>> too messy. Would you mind outlining your proposal as a whole and how it >>> differs from my most recent one? >> Actually, how about we start with your suggested steps, sans for the last one, >> for now. Meaning, just aborting with a message when the buffer is narrowed, >> without the user option. >> >> We would not be removing any existing functionality this way (this scenario >> didn't work before, after all), and we could add it later. >> >> Would that work for your habits/scenarios? > You mean, just adding the command which kills hunks? Just these two points: - add a command which does the kill-all-but-this-hunk (or hunks in region if mark active) thing -- it's generally useful. - make C-x v v on a narrowed buffer, by default, issue a message saying "Cannot commit patch when narrowed, consider " From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172770185416228 (code B ref 73387); Mon, 30 Sep 2024 13:11:01 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 13:10:54 +0000 Received: from localhost ([127.0.0.1]:45007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGAv-0004Dg-J9 for submit@debbugs.gnu.org; Mon, 30 Sep 2024 09:10:54 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:60308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGAr-0004DY-95 for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 09:10:52 -0400 DKIM-Signature: a=rsa-sha256; b=LdE9VhBqGwx6h10Re021L43ZYGKCJzj4jVU3fPuoMSLar1PLV9WLC7iHmEQPnqVctjJjviQra9IpmxbzywsmZYVGvJpEB9mRtkX7JcWHjcp3yvHmRcahjkG0N6vWJx5vzg9Cfqj+42US6Tasbt5Jpnc+xarSnasJQlKeSCzOlecy8+rJ4Mh4MpG+UwjZKbb9T7qHk14x20KYjMoE1s0JWJWOKPfBveO6GOaOgYeZX6vDUDbghQt0IMUdaXxGh9PPM8HV6qORWNnGEEGz7JJCZ5F4IbArNtOtTvgAsr01cxMJgvntXQk3YicvQEzq2q7o6d5Z/qby8n9irMBl///SLQ==; s=purelymail1; d=spwhitton.name; v=1; bh=Jv94MWqYWdqdULbZiokYkYK+KPYTjETyCMiIeqg1FTs=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=ppecaTN4bjJADP7ONiEl/25wsorzA0QjK8V9gEVuLySEFzkj0l8VSZQmZGIlyLMUx6fF6/3fV0oNssK6tU1cMR3yS6mIjVA+0oFWVgcEsNbdEciSGC8aImEUzg0P8xPT7MAqQNCyLCqCuzEAbRLVj9qvwJLnzL+bCYdpRfQI+33SM+xPvh9iU/tWOl3GyvklIIFXkeZoAAv9mM2e0R2WFecKmlOw0Vvo0OBnjD0buqCWTLIOG4RX/UTYULFHXFYN4QF6iR3oIrwxGRlhm52n1k0bjsenwLT/vthKrPweJSZxrIwoxRuFb2lqEXmNhbNB5uq71n7jPLK6MGJF1NkMng==; s=purelymail1; d=purelymail.com; v=1; bh=Jv94MWqYWdqdULbZiokYkYK+KPYTjETyCMiIeqg1FTs=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1257781004; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 30 Sep 2024 13:10:09 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 9F4967E1F47; Mon, 30 Sep 2024 14:10:04 +0100 (BST) From: Sean Whitton In-Reply-To: <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> (Dmitry Gutov's message of "Mon, 30 Sep 2024 13:11:18 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> Date: Mon, 30 Sep 2024 21:10:04 +0800 Message-ID: <87ikudqocz.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --=-=-= Content-Type: text/plain Hello, On Mon 30 Sep 2024 at 01:11pm +03, Dmitry Gutov wrote: > Just these two points: > > - add a command which does the kill-all-but-this-hunk (or hunks in > region if mark active) thing -- it's generally useful. > > - make C-x v v on a narrowed buffer, by default, issue a message saying > "Cannot commit patch when narrowed, consider " Okay, what do you think to the attached? I tested the (apply #'user-error ...) by applying your patch from up-thread, though I think there may be a bug with that patch because after applying it I was not able to use C-x v v to commit. (FTAOD I think the attached is valid independently of your patch.) -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-New-command-diff-delete-other-hunks.patch >From 34f5c95c6d04cd5d07d11214a72516b0c9ff10e4 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Sep 2024 21:08:38 +0800 Subject: [PATCH] New command diff-delete-other-hunks * lisp/vc/diff-mode.el (diff-delete-other-hunks): New command (bug#73387). (diff-mode-map): Bind the new command to C-c RET k. (diff-mode-menu): New entry for the new command. (vc-next-action): Stop, and warn, if the user attempts to commit a patch from a narrowed buffer. * doc/emacs/files.texi (Diff Mode): * etc/NEWS: Document the new command. --- doc/emacs/files.texi | 5 +++++ etc/NEWS | 5 +++++ lisp/vc/diff-mode.el | 35 +++++++++++++++++++++++++++++++++++ lisp/vc/vc.el | 10 ++++++++++ 4 files changed, 55 insertions(+) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index a3a8c854aa6..a32689552b1 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1703,6 +1703,11 @@ Diff Mode Apply all the hunks in the buffer (@code{diff-apply-buffer}). If the diffs were applied successfully, save the changed buffers. +@findex diff-delete-other-hunks +@item C-c @key{RET} k +Delete all hunks other than the current hunk. If the region is active, +then delete all hunks other than those the region overlaps. + @findex diff-refine-hunk @item C-c C-b Highlight the changes of the hunk at point with a finer granularity diff --git a/etc/NEWS b/etc/NEWS index cdc7f47b7a9..a459ec18495 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -369,6 +369,11 @@ This command reverts the hunk at point (i.e., applies the reverse of the hunk), and then removes the hunk from the diffs. This is useful to undo commits when you are in buffers generated by 'C-x v =' and 'C-x v D'. ++++ +*** New command 'diff-delete-other-hunks' bound to C-c RET k. +This command deletes hunks other than the current hunk. +It is useful to prepare a *vc-diff* buffer for committing a single hunk. + ** php-ts-mode --- diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 25c6238765d..ff141e19c50 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -220,6 +220,7 @@ diff-mode-map "C-c C-a" #'diff-apply-hunk "C-c M-r" #'diff-revert-and-kill-hunk "C-c C-m a" #'diff-apply-buffer + "C-c C-m k" #'diff-delete-other-hunks "C-c C-e" #'diff-ediff-patch "C-c C-n" #'diff-restrict-view "C-c C-s" #'diff-split-hunk @@ -278,6 +279,8 @@ diff-mode-menu :help "Kill current hunk"] ["Kill current file's hunks" diff-file-kill :help "Kill all current file's hunks"] + ["Delete other hunks" diff-delete-other-hunks + :help "Delete hunks other than the current hunk"] "-----" ["Previous Hunk" diff-hunk-prev :help "Go to the previous count'th hunk"] @@ -814,6 +817,38 @@ diff-hunk-kill (goto-char (car bounds)) (ignore-errors (diff-beginning-of-hunk t))))) +;; This is not `diff-kill-other-hunks' because we might need to make +;; copies of file headers in order to ensure the new kill ring entry +;; would be a patch with the same meaning. That is not implemented +;; because it does not seem like it would be useful to anyone. +(defun diff-delete-other-hunks (&optional beg end) + "Delete hunks other than this one. +Interactively, if the region is active, then delete all hunks that the +region does not overlap. +When called from Lisp, the region to act upon is specified by optional +arguments BEG and END." + (interactive (list (use-region-beginning) (use-region-end))) + (when (buffer-narrowed-p) + (user-error "Command is not safe in a narrowed buffer")) + (let ((inhibit-read-only t)) + (save-excursion + (cond ((xor beg end) + (error "Require exactly zero or two arguments")) + (beg + (goto-char beg) + (setq beg (car (diff-bounds-of-hunk))) + (goto-char end) + (setq end (cadr (diff-bounds-of-hunk)))) + (t + (pcase-setq `(,beg ,end) (diff-bounds-of-hunk)))) + (delete-region end (point-max)) + (goto-char beg) + (diff-beginning-of-file) + (diff-hunk-next) + (delete-region (point) beg) + (diff-beginning-of-file-and-junk) + (delete-region (point-min) (point))))) + (defun diff-beginning-of-file-and-junk () "Go to the beginning of file-related diff-info. This is like `diff-beginning-of-file' except it tries to skip back over leading diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 597a1622f5a..39e5ca424d4 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1302,6 +1302,16 @@ vc-next-action ;; Fileset comes from a diff-mode buffer, see ;; 'diff-vc-deduce-fileset', and the buffer is the patch to apply. ((eq model 'patch) + (when (buffer-narrowed-p) + ;; If we used `diff-restrict-view' then we may not have the file + ;; header and the commit will not succeed (bug#73387). + (apply #'user-error + "Cannot commit patch when narrowed; consider %s %s %s" + (mapcar (lambda (c) + (key-description (where-is-internal c nil t))) + '(widen + diff-delete-other-hunks + vc-next-action)))) (vc-checkin files backend nil nil nil (buffer-string))) ((or (null state) (eq state 'unregistered)) (cond (verbose -- 2.45.2 --=-=-=-- From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172770291119202 (code B ref 73387); Mon, 30 Sep 2024 13:29:02 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 13:28:31 +0000 Received: from localhost ([127.0.0.1]:45026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGRz-0004ze-6I for submit@debbugs.gnu.org; Mon, 30 Sep 2024 09:28:31 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:35700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGRx-0004zU-Ey for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 09:28:30 -0400 DKIM-Signature: a=rsa-sha256; b=oshp5wqBdQT5bETEPy/bVxN1ZPfUCEBSzoC9sQwq4DcjVYsy0gEgHQRQF5r3Jb5pQocezVly4/YQl1BfEKlm0JMERm/+c49uY+GKRbBmo2NXnwgzAcVE2g/8dQnfes0b/170YfqfMrHSxhg3R3/pl+XTddqxPna0h8ekiqJsn5mGtNK8ZwvZVW8aB8AaX2o8b8xPf9NHoJB8WU7rFulETjp11ZXzHC4Am2HA27rUwblsXRcwx+ijK5RYN6nb+so5xNMtmlaZzKHjo3ZtJPkICSV6IGRGp6rvGtCG4bpCuRiSeB+yFrGDLAS4fdRte9dJf+UAjMnf0khfs82QStRaxg==; s=purelymail1; d=spwhitton.name; v=1; bh=3tJzWhXKiNyDx9hqf+PUARIYYwDMo2ybUl3sGgvnP/s=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=kvZkf39eEvRoL6L/zY71d1SZKrXRrnwa2t9TH6GGIvdKQ48lvwpgGAN+QCqprkzRnEVnvc1v47EIqOJewZixL92505n+4sImeeM+BIiZQuHWlMn1yHbTn4EUijrVg1jyJU6X7rUaoojGJMIo/YLdzaR8WoF9Wlnj0e2fIGcMHGAsxV1AyTVcD9Sf/3xdJYqrdW19bvsrZUjbSs/HGtpLRRb7U4MB01XiCiITtHsVMwD2lenoNpdWk1nybOux3XAkfLWpBf9zJ3id9ueqH0iC2mI+/KPg5BC5B+gBRI3vQbtHcEhKFz6Fl6PLfsTNKTw1urd6KP0juQguy5NJ7mrMiA==; s=purelymail1; d=purelymail.com; v=1; bh=3tJzWhXKiNyDx9hqf+PUARIYYwDMo2ybUl3sGgvnP/s=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1308470953; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 30 Sep 2024 13:27:46 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id DE5C07E1FAB; Mon, 30 Sep 2024 14:25:26 +0100 (BST) From: Sean Whitton In-Reply-To: <87ikudqocz.fsf@melete.silentflame.com> (Sean Whitton's message of "Mon, 30 Sep 2024 21:10:04 +0800") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> Date: Mon, 30 Sep 2024 21:25:26 +0800 Message-ID: <87a5fpqnnd.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --=-=-= Content-Type: text/plain Hello, On Mon 30 Sep 2024 at 09:10pm +08, Sean Whitton wrote: > Hello, > > On Mon 30 Sep 2024 at 01:11pm +03, Dmitry Gutov wrote: > >> Just these two points: >> >> - add a command which does the kill-all-but-this-hunk (or hunks in >> region if mark active) thing -- it's generally useful. >> >> - make C-x v v on a narrowed buffer, by default, issue a message saying >> "Cannot commit patch when narrowed, consider " > > Okay, what do you think to the attached? Slightly simplified v2 attached -- uses mapconcat instead of (apply #'user-error ...). -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v2-0001-New-command-diff-delete-other-hunks.patch >From 61342a10072ddfb0e8f89fbfa5a86cd4284c3142 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Sep 2024 21:08:38 +0800 Subject: [PATCH v2] New command diff-delete-other-hunks * lisp/vc/diff-mode.el (diff-delete-other-hunks): New command (bug#73387). (diff-mode-map): Bind the new command to C-c RET k. (diff-mode-menu): New entry for the new command. (vc-next-action): Stop, and warn, if the user attempts to commit a patch from a narrowed buffer (bug#73387). * doc/emacs/files.texi (Diff Mode): * etc/NEWS: Document the new command. --- doc/emacs/files.texi | 5 +++++ etc/NEWS | 5 +++++ lisp/vc/diff-mode.el | 35 +++++++++++++++++++++++++++++++++++ lisp/vc/vc.el | 11 +++++++++++ 4 files changed, 56 insertions(+) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index a3a8c854aa6..a32689552b1 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1703,6 +1703,11 @@ Diff Mode Apply all the hunks in the buffer (@code{diff-apply-buffer}). If the diffs were applied successfully, save the changed buffers. +@findex diff-delete-other-hunks +@item C-c @key{RET} k +Delete all hunks other than the current hunk. If the region is active, +then delete all hunks other than those the region overlaps. + @findex diff-refine-hunk @item C-c C-b Highlight the changes of the hunk at point with a finer granularity diff --git a/etc/NEWS b/etc/NEWS index cdc7f47b7a9..90213cf342a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -369,6 +369,11 @@ This command reverts the hunk at point (i.e., applies the reverse of the hunk), and then removes the hunk from the diffs. This is useful to undo commits when you are in buffers generated by 'C-x v =' and 'C-x v D'. ++++ +*** New command 'diff-delete-other-hunks' bound to C-c RET k. +This command deletes all hunks other than the current hunk. +It is useful to prepare a *vc-diff* buffer for committing a single hunk. + ** php-ts-mode --- diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 25c6238765d..ff141e19c50 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -220,6 +220,7 @@ diff-mode-map "C-c C-a" #'diff-apply-hunk "C-c M-r" #'diff-revert-and-kill-hunk "C-c C-m a" #'diff-apply-buffer + "C-c C-m k" #'diff-delete-other-hunks "C-c C-e" #'diff-ediff-patch "C-c C-n" #'diff-restrict-view "C-c C-s" #'diff-split-hunk @@ -278,6 +279,8 @@ diff-mode-menu :help "Kill current hunk"] ["Kill current file's hunks" diff-file-kill :help "Kill all current file's hunks"] + ["Delete other hunks" diff-delete-other-hunks + :help "Delete hunks other than the current hunk"] "-----" ["Previous Hunk" diff-hunk-prev :help "Go to the previous count'th hunk"] @@ -814,6 +817,38 @@ diff-hunk-kill (goto-char (car bounds)) (ignore-errors (diff-beginning-of-hunk t))))) +;; This is not `diff-kill-other-hunks' because we might need to make +;; copies of file headers in order to ensure the new kill ring entry +;; would be a patch with the same meaning. That is not implemented +;; because it does not seem like it would be useful to anyone. +(defun diff-delete-other-hunks (&optional beg end) + "Delete hunks other than this one. +Interactively, if the region is active, then delete all hunks that the +region does not overlap. +When called from Lisp, the region to act upon is specified by optional +arguments BEG and END." + (interactive (list (use-region-beginning) (use-region-end))) + (when (buffer-narrowed-p) + (user-error "Command is not safe in a narrowed buffer")) + (let ((inhibit-read-only t)) + (save-excursion + (cond ((xor beg end) + (error "Require exactly zero or two arguments")) + (beg + (goto-char beg) + (setq beg (car (diff-bounds-of-hunk))) + (goto-char end) + (setq end (cadr (diff-bounds-of-hunk)))) + (t + (pcase-setq `(,beg ,end) (diff-bounds-of-hunk)))) + (delete-region end (point-max)) + (goto-char beg) + (diff-beginning-of-file) + (diff-hunk-next) + (delete-region (point) beg) + (diff-beginning-of-file-and-junk) + (delete-region (point-min) (point))))) + (defun diff-beginning-of-file-and-junk () "Go to the beginning of file-related diff-info. This is like `diff-beginning-of-file' except it tries to skip back over leading diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 597a1622f5a..6ebfedc9555 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1302,6 +1302,17 @@ vc-next-action ;; Fileset comes from a diff-mode buffer, see ;; 'diff-vc-deduce-fileset', and the buffer is the patch to apply. ((eq model 'patch) + (when (buffer-narrowed-p) + ;; If user used `diff-restrict-view' then we may not have the + ;; file header and the commit will not succeed (bug#73387). + (user-error "Cannot commit patch when narrowed; consider %s" + (mapconcat (lambda (c) + (key-description + (where-is-internal c nil t))) + '(widen + diff-delete-other-hunks + vc-next-action) + " "))) (vc-checkin files backend nil nil nil (buffer-string))) ((or (null state) (eq state 'unregistered)) (cond (verbose -- 2.45.2 --=-=-=-- From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172770578817640 (code B ref 73387); Mon, 30 Sep 2024 14:17:01 +0000 Received: (at 73387) by debbugs.gnu.org; 30 Sep 2024 14:16:28 +0000 Received: from localhost ([127.0.0.1]:45140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svHCO-0004aR-3c for submit@debbugs.gnu.org; Mon, 30 Sep 2024 10:16:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svHCJ-0004aG-DT for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 10:16:26 -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 ) id 1svHBe-0006bQ-WF; Mon, 30 Sep 2024 10:15:43 -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=cg4XU8rz3/C/kDae1zBfmhiD52q7uqeLMZRAuP9eZGo=; b=eWSFCKKU1jJA HRhBv0/lsrfod48eP8fKB4nf1c0XUCOQj8O6d3GHG1S/moCe2mu+oiLSrHXufIseb7Ro1X8HVlDjy rhyJXa8OFgub9w4FK6FJLbf1rbU4iD052zbU8+j8fJZN4GNoP2zNbtvPavJ1jEtsidp7ZefADMZ/X htY0SWNdGBNmZhBZAVrf8aOM+4Ubrnr/+pTAVvzCqdpiWcEzHL/ZahdqYB6LqgeJlowT7KV/w55iQ chbTbaDeAznDkEyCpVbjpqggqXRcwoZxvOg4KotEAAKe/p61B8yl7C8kJWjiuhQ0UyNY8pTJkkbBp XYobUXwZ/hEuOUCt/ke1rg==; Date: Mon, 30 Sep 2024 17:15:37 +0300 Message-Id: <86jzet2po6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ikudqocz.fsf@melete.silentflame.com> (message from Sean Whitton on Mon, 30 Sep 2024 21:10:04 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) > Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > Juri Linkov > From: Sean Whitton > Date: Mon, 30 Sep 2024 21:10:04 +0800 > > +Delete all hunks other than the current hunk. If the region is active, > +then delete all hunks other than those the region overlaps. We usually describe what happens when the region is active, then what happens "otherwise". > +*** New command 'diff-delete-other-hunks' bound to C-c RET k. > +This command deletes hunks other than the current hunk. > +It is useful to prepare a *vc-diff* buffer for committing a single hunk. This doesn't mention the active-region case. > +(defun diff-delete-other-hunks (&optional beg end) > + "Delete hunks other than this one. Which "this hunk"? Did you mean "current hunk"? > +When called from Lisp, the region to act upon is specified by optional > +arguments BEG and END." ^^^^^^^^^^^^^^^ Passive tense alert! > + ;; If we used `diff-restrict-view' then we may not have the file > + ;; header and the commit will not succeed (bug#73387). ^ Comma missing there. Thanks. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 00:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172774250910958 (code B ref 73387); Tue, 01 Oct 2024 00:29:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 00:28:29 +0000 Received: from localhost ([127.0.0.1]:48002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svQke-0002qb-CJ for submit@debbugs.gnu.org; Mon, 30 Sep 2024 20:28:29 -0400 Received: from forward502b.mail.yandex.net ([178.154.239.146]:39478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svQkX-0002qF-Vc for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 20:28:27 -0400 Received: from mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net [IPv6:2a02:6b8:c16:2014:0:640:2712:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id 93231612E5; Tue, 1 Oct 2024 03:27:45 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id gRNutUC7VKo0-MI5Etu3q; Tue, 01 Oct 2024 03:27:45 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727742465; bh=lUQm8IvaoIqtxxijgBpXQkKdYMPAzxsrpI4RR4eOdbA=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=Z5w41oGijeloCfFH+pZKW2/nmuPY73rf+1aT3paqHQJ7/ke/Iyq2lN+N+q404pTYJ 0GHi4ERctPKYfSwUd7eTcbqYV5IUPRGZW+zR31RaoOagU13bEgfH2M+HbIkhEZzevi Pvs/KOfyJpFrSIyO7vJkUejd7A3X9Ly9yHY85fyo= Authentication-Results: mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 38DF41200068; Mon, 30 Sep 2024 20:27:42 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 30 Sep 2024 20:27:42 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduiedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Sep 2024 20:27:40 -0400 (EDT) Message-ID: <33faaffa-3402-42d9-a11c-abbf0c732567@yandex.ru> Date: Tue, 1 Oct 2024 03:27:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87ikudqocz.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 30/09/2024 16:10, Sean Whitton wrote: > + "C-c C-m k" #'diff-delete-other-hunks I'd like to suggest using a different binding: perhaps 'C-c C-m n'? 'k' seems to imply killing the current thing (something near point, or contained inside the region), whereas we want to retain the current hunk(s) instead. So maybe the character for (n)arrowing would be better - even if we use a different mechanism. Or maybe we have some other existing term for that? From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 00:41:27 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172774325823404 (code B ref 73387); Tue, 01 Oct 2024 00:41:27 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 00:40:58 +0000 Received: from localhost ([127.0.0.1]:48057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svQwV-00060v-HM for submit@debbugs.gnu.org; Mon, 30 Sep 2024 20:40:54 -0400 Received: from forward500a.mail.yandex.net ([178.154.239.80]:34332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svQwE-0005xU-2A for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 20:40:34 -0400 Received: from mail-nwsmtp-smtp-production-main-45.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-45.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:469c:0:640:ed9c:0]) by forward500a.mail.yandex.net (Yandex) with ESMTPS id 4AC9361304; Tue, 1 Oct 2024 03:39:20 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-45.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id GdN1sxnOgKo0-t3RNMVqH; Tue, 01 Oct 2024 03:39:19 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727743159; bh=IhVutuSMkjkaAD0mezhKb0SDi5b7e+8y2pDtMD0oi08=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=BcA89F5CW1Zio841JqzSdZW4Wa83bkhq4hLTOgE8U01WyMZHfe4TN4/lZy9xr0tMb 1oQjXr2vzhmZWUCt2MBNfUrYok1pq4VxJiM/JSqsPwpSanNKHIY0lkOXjx/ggwoFQO uJfdl7SzXNiZvpWJzaysm4aRDEHjmYqIYNckmQI4= Authentication-Results: mail-nwsmtp-smtp-production-main-45.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfauth.phl.internal (Postfix) with ESMTP id 841F51200068; Mon, 30 Sep 2024 20:39:16 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Mon, 30 Sep 2024 20:39:16 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduiedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Sep 2024 20:39:14 -0400 (EDT) Message-ID: <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> Date: Tue, 1 Oct 2024 03:39:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87ikudqocz.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 30/09/2024 16:10, Sean Whitton wrote: > I tested the (apply #'user-error ...) by applying your patch from > up-thread, though I think there may be a bug with that patch because > after applying it I was not able to use C-x v v to commit. > > (FTAOD I think the attached is valid independently of your patch.) That patch was an illustration to answer the direct question (how to make diff-file-next work in narrowed buffer), but indeed - like mentioned in the same message - it didn't help on the next step. So I'm not proposing it for inclusion, your patch should very well work on its own. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 00:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.1727743898800 (code B ref 73387); Tue, 01 Oct 2024 00:52:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 00:51:38 +0000 Received: from localhost ([127.0.0.1]:48101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svR73-0000Cp-Rj for submit@debbugs.gnu.org; Mon, 30 Sep 2024 20:51:38 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:52298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svR6v-0000Cd-9R for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 20:51:34 -0400 DKIM-Signature: a=rsa-sha256; b=qJXK+tf1vroOW9iiV7Y+Jrzh7cGKEjvR93m6l9ZsYZ5m9Yf/qBa/fqLHGtHKhhfCQeNcjxpSo/oQVGgvLP7tZaQoHlE73XMVJBVMEEiHfjmIJGaNpmmIId0wqaJqSnYY9GW71ZGHJukakbHz5iDX88aa4PcUXtEw4wi7eFXTlXbNW30xz73/kfMAPmgPLoFM0S9VoIWab4+5vjg5kKjV4eyJBR02eBmYiO8647nto3gXmilS7wdDYw00Ez+9QAPLAYDemxHNdJcWolXX4SMUOcMVVD0bOxmhFnQxXExv5JrMGitPSUjhW13Bv/aPXopU1rDhDJUOyg4ckhw9xkMDZA==; s=purelymail2; d=spwhitton.name; v=1; bh=T0LVd/mrTmOJ8pSsVjQAthwDPHIWN2//W2s6QgQ0lbE=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=rtUyTyaXpCo7si2AKdylmP9xCwE+ySm/2OIzPG5dsBJihvKuvSW4Dh9teTkv1lzvCliE5Uakfwoel5ld2rZ5UUnj3sRQXu7kYAo6jZRuGeJkh1upWTvp6Lt1yg67PQ5LcBM5KBlUU3WHx4TiSop4JmSLWuvDBRDn6wP8IB+LTcR5w2p5NhociAgQGxozY6tXBBxfDPGkIBO/OEjyRW352gGOM/EAHpjpeevVXAWKvXpahkoyrZpLWWwhqeHd3fuRbZMxrxSn5Y/R3K5q131SJV6AOcOuJxhRfBpfAKWwqzhqxqUBG3nm56Saf0eYAuq12aYGM1T9BVbmsCbg9XzyKA==; s=purelymail2; d=purelymail.com; v=1; bh=T0LVd/mrTmOJ8pSsVjQAthwDPHIWN2//W2s6QgQ0lbE=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 584132137; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Oct 2024 00:50:47 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 047267E1A35; Tue, 1 Oct 2024 01:50:44 +0100 (BST) From: Sean Whitton In-Reply-To: <86jzet2po6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 30 Sep 2024 17:15:37 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> Date: Tue, 01 Oct 2024 08:50:43 +0800 Message-ID: <875xqcr6ho.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Mon 30 Sep 2024 at 05:15pm +03, Eli Zaretskii wrote: >> Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, >> Juri Linkov >> From: Sean Whitton >> Date: Mon, 30 Sep 2024 21:10:04 +0800 >> >> +Delete all hunks other than the current hunk. If the region is active, >> +then delete all hunks other than those the region overlaps. > > We usually describe what happens when the region is active, then what > happens "otherwise". I think in the case of this command it's better to describe the region-inactive case first. >> +*** New command 'diff-delete-other-hunks' bound to C-c RET k. >> +This command deletes hunks other than the current hunk. >> +It is useful to prepare a *vc-diff* buffer for committing a single hunk. > > This doesn't mention the active-region case. Added that. >> +(defun diff-delete-other-hunks (&optional beg end) >> + "Delete hunks other than this one. > > Which "this hunk"? Did you mean "current hunk"? Indeed I did, thank you. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 00:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17277443131893 (code B ref 73387); Tue, 01 Oct 2024 00:59:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 00:58:33 +0000 Received: from localhost ([127.0.0.1]:48133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRDl-0000UT-0v for submit@debbugs.gnu.org; Mon, 30 Sep 2024 20:58:33 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:47158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRDi-0000UI-NC for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 20:58:31 -0400 DKIM-Signature: a=rsa-sha256; b=MvSQh8cbQowTQlU3Uk835ibAfn5oyDQDE9Q74zTq0lVosYnYjBLRWXqw9iT4k4N+qgh7A8+KR8jeK0fOUV/JS2TaorNEZ0JgT/XCKi93v3Lr05sOjSRZr2Tor/4DS+ptvOgfvWxinuB4mJqIFsNDdTLAqJ1wODkCdeSOFwn8T6U21uhp5V6o12b+86V0AHg3O43KTdtNEbCBBi9WRxGmBw2tXJ2t1/pGpYN5d9HiZTkbxVPm+gClJuysSw+29L3YiFtthflPlobfUQ5yL4v06Sx9Ubhp2C3HzwUB+oRsgS8rvABGtq6as43qxftexHeCxTJJK1sjagkyAyL0tR1McQ==; s=purelymail2; d=spwhitton.name; v=1; bh=lA6p1mThIiVhxD52K/Rma3NHZBAT52vDIo05aM11QJM=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=q7swBM6MROMoIMCy3vgFJu8XzxIrBsdjTKdUJQE3nHU4v/o4QPyKe3lxNPqhYzOElRUQGgu8noK1s0Jpa4/ChSmnNBXLTx+Qrmty1cpzB4JIB4DTSl+WQuZWSFGNKbfm1XF2VI22awJINXEP6Iu8xM3BSnRMeRSqfHsHfsOO9NsM0txfEOiD3WbsDOkIwhAOb3l/PydbtxUq2H2liTinfc/vE1SvRJq2fXWRnEMYOubsUQqUvPQa35cGe7x4clyG83KquJkn74haL/UOEDWiI7kqe5FW8U7cLy5FfaH/5BjuLMhxFTnV+QYuugzikrw1t8KPUB3j8YDbl+SSrOnKXA==; s=purelymail2; d=purelymail.com; v=1; bh=lA6p1mThIiVhxD52K/Rma3NHZBAT52vDIo05aM11QJM=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1767460609; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Oct 2024 00:57:49 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id EBBEA7E1A6B; Tue, 1 Oct 2024 01:57:45 +0100 (BST) From: Sean Whitton In-Reply-To: <33faaffa-3402-42d9-a11c-abbf0c732567@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Oct 2024 03:27:38 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <33faaffa-3402-42d9-a11c-abbf0c732567@yandex.ru> Date: Tue, 01 Oct 2024 08:57:45 +0800 Message-ID: <871q10r65y.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 03:27am +03, Dmitry Gutov wrote: > On 30/09/2024 16:10, Sean Whitton wrote: >> + "C-c C-m k" #'diff-delete-other-hunks > > I'd like to suggest using a different binding: perhaps 'C-c C-m n'? > > 'k' seems to imply killing the current thing (something near point, or > contained inside the region), whereas we want to retain the current hunk(s) > instead. So maybe the character for (n)arrowing would be better - even if we > use a different mechanism. > > Or maybe we have some other existing term for that? Indeed, C-c RET n is a better fit, given the existing C-c C-n. Thank you. I've installed this patch. We still need to apply your fix to diff-vc-deduce-fileset before we can close this bug. I think we are agreed that anything cleverer should wait until we have a clearer idea for how it could work. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 01:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17277445252714 (code B ref 73387); Tue, 01 Oct 2024 01:03:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 01:02:05 +0000 Received: from localhost ([127.0.0.1]:48151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRHA-0000hi-L9 for submit@debbugs.gnu.org; Mon, 30 Sep 2024 21:02:04 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:55322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRH7-0000hD-Ls for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 21:02:02 -0400 DKIM-Signature: a=rsa-sha256; b=SHTYU5ZLkkwLcYzYOovDKtyvuv8RoxAVGLMhLXB6X4bGooWUrCh4I8jTOgKVzd+Iq2s97CBENCplYy3UdzZXWaVahJ1h438a+vxSBBuU3gH3b6oZ6GTx7hXzx2Xw3V9/5L2bz2wEPnKKK1gZECckA9gruPkl1GHJWfk+XtFPrVEH5qYe1DQsUAxobSvE6LTRgs1rwBu1MItqxbQ9hpFOxGKox487oZo2pMhcTGES87Ol1UfFGoROGRAqapS4CFfYcKyAOT9f9CoVHouge6KWGmm1GCar27YxAJgJYzl6UzXZl5yWxIN3JvQRmFR0x7bbRfWRdDCVqYpzuWueCsKYsw==; s=purelymail2; d=spwhitton.name; v=1; bh=9kz0+2WgakRDYoOfmUwAyu4Ky/+eXpoiDk9JelgxzGM=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=iGZV2R6J8iFbVSUGM6pKSG+ocaymxOibsMYhA6mjT5ZdBGF/+Si/0qt+CL4GVWcjSXneB96273HYP9M1HgXNz9GkQtJnN13bHwUv1MkxFkzEzm+zqK7FUhiEKIkkNUMumLyUbj/RyoLFpBfjRpUTKOLK0duYtvvLZKZAdm0dl2Sb3lMSIkP8I55FzwDXm6H3D0JhLhP1JFiu5ByfvbVkFpFFTgGtqG/aZznQ0qlBmmwD7JoS+gHQBB37ZNnz3gvlDNv13o2OW/9BesrWMPyiHWhcfT9ErSPcTSSUESt7mAoNNdkpwYxaLlKLZJ//y2D2D1SdhIzJx3AB73Fzujm9DA==; s=purelymail2; d=purelymail.com; v=1; bh=9kz0+2WgakRDYoOfmUwAyu4Ky/+eXpoiDk9JelgxzGM=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -362506431; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Oct 2024 01:01:21 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 3124F7E1AB0; Tue, 1 Oct 2024 02:01:19 +0100 (BST) From: Sean Whitton In-Reply-To: <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Oct 2024 03:39:13 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> Date: Tue, 01 Oct 2024 09:01:19 +0800 Message-ID: <87wmisprfk.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 03:39am +03, Dmitry Gutov wrote: > On 30/09/2024 16:10, Sean Whitton wrote: >> I tested the (apply #'user-error ...) by applying your patch from >> up-thread, though I think there may be a bug with that patch because >> after applying it I was not able to use C-x v v to commit. >> (FTAOD I think the attached is valid independently of your patch.) > > That patch was an illustration to answer the direct question (how to make > diff-file-next work in narrowed buffer), but indeed - like mentioned in the > same message - it didn't help on the next step. > > So I'm not proposing it for inclusion, your patch should very well work on its > own. I don't think that's quite right. If you use C-c C-n in a diff-mode buffer with current master, then C-x v v doesn't get far enough to call the user-error I added. "No next file" is not the error message that you should get. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 01:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17277453664931 (code B ref 73387); Tue, 01 Oct 2024 01:17:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 01:16:06 +0000 Received: from localhost ([127.0.0.1]:48207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRUk-0001HT-3n for submit@debbugs.gnu.org; Mon, 30 Sep 2024 21:16:06 -0400 Received: from forward500b.mail.yandex.net ([178.154.239.144]:38864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRUh-0001H8-AB for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 21:16:05 -0400 Received: from mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:df8e:0:640:17d3:0]) by forward500b.mail.yandex.net (Yandex) with ESMTPS id 5B93B612C6; Tue, 1 Oct 2024 04:15:26 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id NFOSwHtg28c0-LPNB5PzR; Tue, 01 Oct 2024 04:15:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727745325; bh=dE6e4foHHxTEV+Td3mP1NsNetFRNJzyGMUrK3YhM+Hs=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=mr7HVQA2CkuWclTyC8y0nd0A+WQ29UQoqruOllKLFq7u3fI/oJ6ORL5E2jJKTq7Sl 2HIAdDydFOsZdqe5+a4F1C3b2v2k5dCR/dXxE6rxp6bgaYlvWPPNO75Ks9YwitO+g2 FisljnAaPw0+2iCEOhwPQsF2Wz+4uv0pWFw52+ns= Authentication-Results: mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfauth.phl.internal (Postfix) with ESMTP id E75511200043; Mon, 30 Sep 2024 21:15:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Mon, 30 Sep 2024 21:15:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduiedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Sep 2024 21:15:21 -0400 (EDT) Message-ID: <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> Date: Tue, 1 Oct 2024 04:15:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87wmisprfk.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 01/10/2024 04:01, Sean Whitton wrote: > I don't think that's quite right. > > If you use C-c C-n in a diff-mode buffer with current master, then > C-x v v doesn't get far enough to call the user-error I added. > "No next file" is not the error message that you should get. Ah, okay. Building the list and then not using it feels kind of wasteful, though. Should we move the check earlier? I.e. do this (and probably remove it from vc-next-action): diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 25c6238765d..33bd8b607f7 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -3168,6 +3168,17 @@ diff-syntax-fontify-props ;;;###autoload (defun diff-vc-deduce-fileset () + (when (buffer-narrowed-p) + ;; If user used `diff-restrict-view' then we may not have the + ;; file header and the commit will not succeed (bug#73387). + (user-error "Cannot commit patch when narrowed; consider %s" + (mapconcat (lambda (c) + (key-description + (where-is-internal c nil t))) + '(widen + diff-delete-other-hunks + vc-next-action) + " "))) (let ((backend (vc-responsible-backend default-directory)) files) (save-excursion From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17277468818646 (code B ref 73387); Tue, 01 Oct 2024 01:42:02 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 01:41:21 +0000 Received: from localhost ([127.0.0.1]:48312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRtA-0002FN-TB for submit@debbugs.gnu.org; Mon, 30 Sep 2024 21:41:21 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:55152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svRt8-0002FE-Il for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 21:41:19 -0400 DKIM-Signature: a=rsa-sha256; b=MubJRhzU+2/L4zWa9h4M105faY1OfJZGDj0aw4EqH6HoMGrSoh/8gJos6YjbYyRc/Xmqlv0ZffqlTMbQPebOj909RAdGkpSUPEds6joIGX9r/z8UYOhWKu5uMqvFBfCIiFQEYytfsDhaBZYxlZXX2sGH2amBu3aqt9PqP/nzzHWvd1HYM7jFZKEv4JqtFXo0HzhYOWi7p5G34eX1fwQckI38DdANmvEQP5eZORX+7T84gk9xox3QKDeTW3ZM2F1wtAG5hQh9/sSTxCq1CseYWfN3gTgrPQZmdk2W+O2Lwb5LkQSCmJwqs7qpfHPhuIfaAGF0jiHKWKjrL9j+3sC89A==; s=purelymail2; d=spwhitton.name; v=1; bh=SnA4L8+asmtkZaozmO2Mg5TUfN9TPsNUBEdQR6NqgRk=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=vTy94n3AVx7S7NrXLFoh0OuG7SwNfFxEfusCDYfYUF9llGPVk0HawtlzWWyIhtjdCuWMNdgIzO4anLBlyZ4kiAFfGvaiG6j4T63oiIPJrnrIHMqNtjgnV9hD2zQKlO07G104QoEpqaNlmwlFUlPR35KD9LcbA/rn0AiHN1VvlUvrILWMIFIonZkyYcmTDShTkaL1eNknrQDW5eEvMmJR+6A6g4OUlW7ZxvUCYMSCg7lh0bJmZTKjyDtFKQTsKzlB64Y0zBBqkpYtH1FDn5pJQM3e6JH/bb6XVX5SvjyMQHv2ij5PTyQkm2POhFNIDdjjbNHHDrH+QiJktpfkXDzBMQ==; s=purelymail2; d=purelymail.com; v=1; bh=SnA4L8+asmtkZaozmO2Mg5TUfN9TPsNUBEdQR6NqgRk=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1500970189; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Oct 2024 01:40:37 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 77DB17E25C6; Tue, 1 Oct 2024 02:40:34 +0100 (BST) From: Sean Whitton In-Reply-To: <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Oct 2024 04:15:19 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> Date: Tue, 01 Oct 2024 09:40:34 +0800 Message-ID: <87h69wppm5.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 04:15am +03, Dmitry Gutov wrote: > On 01/10/2024 04:01, Sean Whitton wrote: >> I don't think that's quite right. >> >> If you use C-c C-n in a diff-mode buffer with current master, then >> C-x v v doesn't get far enough to call the user-error I added. >> "No next file" is not the error message that you should get. > > Ah, okay. > > Building the list and then not using it feels kind of wasteful, though. > > Should we move the check earlier? > > I.e. do this (and probably remove it from vc-next-action): Is it right that diff-vc-deduce-fileset will only ever be called in the context of using C-x v v to commit a patch? The name of the function suggests that it might be used for something else, if not now then in the future. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 01:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172774791613326 (code B ref 73387); Tue, 01 Oct 2024 01:59:03 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 01:58:36 +0000 Received: from localhost ([127.0.0.1]:48403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svS9r-0003Sq-GX for submit@debbugs.gnu.org; Mon, 30 Sep 2024 21:58:35 -0400 Received: from forward501d.mail.yandex.net ([178.154.239.209]:45358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svS9o-0003SK-Ey for 73387@debbugs.gnu.org; Mon, 30 Sep 2024 21:58:34 -0400 Received: from mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5486:0:640:376b:0]) by forward501d.mail.yandex.net (Yandex) with ESMTPS id 2C97860F1F; Tue, 1 Oct 2024 04:57:26 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id MvOxYJ1AaW20-oFjFclQP; Tue, 01 Oct 2024 04:57:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727747845; bh=r0bV/Q87NQy3Rkd5DcQOWNfkUgMQ4iKt4k8eOqf20Yw=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=M0WqSzLWd48VLqmN7MpMcP9PChn255TUYQRu0kgqwGIJqaOles3XARQdttu8jUpMD MpsPohPfnA+vQjzv3xnGd09d7r0WFEs5W2ExenZsNDEciWEPkXw627y1B8Snz6ek4a cOehCnckl8p0a+7wolidHkhiThdjD+0R5mSTX5VQ= Authentication-Results: mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id 5451E1200043; Mon, 30 Sep 2024 21:57:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 30 Sep 2024 21:57:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduiedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrd hnrghmvgdprhgtphhtthhopeejfeefkeejseguvggssghughhsrdhgnhhurdhorhhgpdhr tghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpth htohepjhhurhhisehlihhnkhhovhdrnhgvth X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Sep 2024 21:57:20 -0400 (EDT) Message-ID: <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> Date: Tue, 1 Oct 2024 04:57:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> <87h69wppm5.fsf@melete.silentflame.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87h69wppm5.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 01/10/2024 04:40, Sean Whitton wrote: > Is it right that diff-vc-deduce-fileset will only ever be called in the > context of using C-x v v to commit a patch? The name of the function > suggests that it might be used for something else, if not now then in > the future. It's not a 100% guarantee but for now that's how things stand, and it doesn't work in a narrowed buffer. So for simplicity's sake we can make it show an error with such instructions, I think. I don't mind doing it the another way too, but if its return value is not used, that's not a very intuitive design. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, Juri Linkov , Dmitry Gutov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17277909413782 (code B ref 73387); Tue, 01 Oct 2024 13:56:02 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 13:55:41 +0000 Received: from localhost ([127.0.0.1]:51443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svdLp-0000yw-3R for submit@debbugs.gnu.org; Tue, 01 Oct 2024 09:55:41 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svdLm-0000yq-KY for 73387@debbugs.gnu.org; Tue, 01 Oct 2024 09:55:39 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5AF244449C3; Tue, 1 Oct 2024 09:55:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1727790931; bh=L9Pr39IuoZpuA6Y1qriARwz9ib9EOeavu08f4ejGjBw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gcjFmyS51S7Bu8oHfxzI46W2pXw4pTegm2nWvKLLJ25Xy7c6qlH2WyBhM00fIIt6r XovV6ZIXZE4KGJBJXphVISHkmNB5fTdobGDIxnM9ZmANaf09i+OlcgbnQCgY6XBwFS NMjYySFCOjjS3n+jObBZaeEJ7aQ/R7tqAdhwg9hxeusU/BFPqPY55uz1XsU5UujmWP bmGwVvDvPxPy95K+k4PAx4RU1edHcpjpw5GlZICAxY7m6h11Irn5wCKF9HY0aL9XbU bI3lv/6MEs+AQ5qcXQjJCUNIdDwOEpWAUBJxpvhn5UkM9fNYDWJhXZm60ZoaqFDmXa 3SVEim1TtCeNA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 654B2443A6E; Tue, 1 Oct 2024 09:55:31 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 525A1120672; Tue, 1 Oct 2024 09:55:31 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87msjoo884.fsf@melete.silentflame.com> (Sean Whitton's message of "Tue, 01 Oct 2024 10:41:31 +0800") Message-ID: References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> <87h69wppm5.fsf@melete.silentflame.com> <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> <87msjoo884.fsf@melete.silentflame.com> Date: Tue, 01 Oct 2024 09:55:22 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.142 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain GAPPY_SUBJECT 0.1 Subject: contains G.a.p.p.y-T.e.x.t X-SPAM-LEVEL: X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > What do you think about checking (eq this-command 'vc-next-action)? Testing `this-command` is brittle, so it's a kind of "last recourse" like advice. Stefan From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172779614719343 (code B ref 73387); Tue, 01 Oct 2024 15:23:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 15:22:27 +0000 Received: from localhost ([127.0.0.1]:52039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svehm-00051u-O9 for submit@debbugs.gnu.org; Tue, 01 Oct 2024 11:22:27 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:35866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svehk-00051l-HK for 73387@debbugs.gnu.org; Tue, 01 Oct 2024 11:22:25 -0400 DKIM-Signature: a=rsa-sha256; b=T/wUgBks6SRhKArWgjq2XnYAqIh6UE0kSk5IlHpfWbRK2PpPRkkVvR57L8JQ8cFcg+FY/wsIgLlfmKxrwrR+3SSOKKu7etKgBJqgDaXbp49qBSZOVx4x+fK7AMCKLtEe5Be+CDNs5vujKG+g1xWh863QHB9p/KB6rE3lEVfPRS+F79fC3/wBlqzeZbgVPnYEOfXxXRhqvGk5hmVRwywW6cuLN7hM2J2quRZNjBFhKuRG46YbnR5+dQex1R6PKFMyve8MoIWZexaG7nQSMQ3+XiedKLDLsYRdgIkUgnNq2zY7mZCY0KPmGWNstp7A+XFV07MjvYYH70hbAKHMvE//cw==; s=purelymail2; d=spwhitton.name; v=1; bh=+lK/st0VU3AXOMKGaYC+3y2hqSEnJ2C5mJZ0K4wxpQY=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=qQLPbztJrewHevxucstPI6Dbx148TixGAdelRrSs+r/PH7566Dm8w42Igjgeoqp0TJ0ZeEtqFyrNV102m/Oay4LIkyfdsjAL3WJ9X9qSu5+BkpVTKdPZeXUncrusl0FAsdUoUu7A9Na2JYfZAATpbO1kVtnn9dxTAlyYJcB9NsTOe7L6J/n1tcaFwPt/qQSAwCfH59cFLC8JUd5334bPUz1i4unSNy1v2Gk84MGPJ5SFvk8oT/GQfK5sLofFYBMBa/60IF4x16UQ4uXw1mmarFPp8ZL1CT2f7/I6HMCrqR5QePNbJY7WvX98+0mwFxEZW9/pnd7ysxDo7mrDGrwXzQ==; s=purelymail2; d=purelymail.com; v=1; bh=+lK/st0VU3AXOMKGaYC+3y2hqSEnJ2C5mJZ0K4wxpQY=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1633357664 for <73387@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Oct 2024 15:22:18 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 45F237E38CF; Tue, 1 Oct 2024 16:22:13 +0100 (BST) Resent-To: 73387@debbugs.gnu.org Resent-From: Sean Whitton Resent-Date: Tue, 01 Oct 2024 23:22:13 +0800 Resent-Message-ID: <87h69vn90a.fsf@melete.silentflame.com> From: Sean Whitton In-Reply-To: <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Oct 2024 04:57:19 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> <87h69wppm5.fsf@melete.silentflame.com> <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> Date: Tue, 01 Oct 2024 10:41:31 +0800 Message-ID: <87msjoo884.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 04:57am +03, Dmitry Gutov wrote: > On 01/10/2024 04:40, Sean Whitton wrote: >> Is it right that diff-vc-deduce-fileset will only ever be called in the >> context of using C-x v v to commit a patch? The name of the function >> suggests that it might be used for something else, if not now then in >> the future. > > It's not a 100% guarantee but for now that's how things stand, and it doesn't > work in a narrowed buffer. So for simplicity's sake we can make it show an > error with such instructions, I think. What do you think about checking (eq this-command 'vc-next-action)? All we want to do is provide a pointer for the user to find C-c C-m n. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172779795423962 (code B ref 73387); Tue, 01 Oct 2024 15:53:02 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 15:52:34 +0000 Received: from localhost ([127.0.0.1]:52214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svfAw-0006EQ-8m for submit@debbugs.gnu.org; Tue, 01 Oct 2024 11:52:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svfAt-0006EA-Rt for 73387@debbugs.gnu.org; Tue, 01 Oct 2024 11:52:32 -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 ) id 1svfAn-0008WL-FM; Tue, 01 Oct 2024 11:52:25 -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=st06fYwSLNppXu5zmlnnH+Hnbtl/gOAUOjF7Bhhg1R0=; b=BaV+Q/RDy5Aa XeBDPvy4AI+W3iGYWyNenUlEEywlGyxWiyxPrwjhZWlHTDTTQgZ/UZbL/t/lDbIiy0iTV23n6Xtrx hhI27pxQT1tH3fXMVfX+Y1q6oIMfQFBy5/93ONzvqtW05WGCmLG8JEhhEpKlxQkiWLnkiMU03yxxy iQNKRQ8eL4N19agxlfthHQ/tVfSIfhA2Hk87vqosM4JlY0ex0UxhDmqtXolfyFlDX9g2vvFL9Er6J X59VjEiPpz9QZ6HecxhASwsH81nT49YbQJTei1TS6+q4aA5vMEijCjd1H0rLVO7ab4atHe1vj3v5X RIG/b6ETkgpzppSqZS5ENw==; Date: Tue, 01 Oct 2024 18:51:58 +0300 Message-Id: <868qv73joh.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875xqcr6ho.fsf@melete.silentflame.com> (message from Sean Whitton on Tue, 01 Oct 2024 08:50:43 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > From: Sean Whitton > Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > Date: Tue, 01 Oct 2024 08:50:43 +0800 > > Hello, > > On Mon 30 Sep 2024 at 05:15pm +03, Eli Zaretskii wrote: > > >> +Delete all hunks other than the current hunk. If the region is active, > >> +then delete all hunks other than those the region overlaps. > > > > We usually describe what happens when the region is active, then what > > happens "otherwise". > > I think in the case of this command it's better to describe the > region-inactive case first. I don't see why. I can explain the rationale for doing the opposite: when describing the operation with active region, we usually start with "If the region is active..." or with some other similar conditional language. This then makes it natural to explain the behavior in the other cases, because the active-region one is clearly conditional, and thus not the general case. By contrast, your text starts with the description of behavior that has no conditions, and thus is perceived as the complete and exhaustive. Then the next sentence is "out of the blue" because the reader does not expect any such additions, being just told what the command does, period. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172781002722628 (code B ref 73387); Tue, 01 Oct 2024 19:14:01 +0000 Received: (at 73387) by debbugs.gnu.org; 1 Oct 2024 19:13:47 +0000 Received: from localhost ([127.0.0.1]:53111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sviJe-0005su-LP for submit@debbugs.gnu.org; Tue, 01 Oct 2024 15:13:46 -0400 Received: from forward500d.mail.yandex.net ([178.154.239.208]:55338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sviJc-0005so-KN for 73387@debbugs.gnu.org; Tue, 01 Oct 2024 15:13:45 -0400 Received: from mail-nwsmtp-smtp-production-main-24.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-24.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:2d4c:0:640:de18:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 7EFC161129; Tue, 1 Oct 2024 22:13:13 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-24.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 9Dg53kklGeA0-yXWDHMwb; Tue, 01 Oct 2024 22:13:12 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727809992; bh=Av3+grsPAvESyqkiBsBrOJps22GKXC5LHvaodZkpmvk=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=KpYl/vNTd6IwpjLLmP8GySwWW9er/fy5lklvtQ2QEM4eVzJEL9nPUHq70H6C+gMH+ TupT5+ix+KwGicy0usr9+JVV7U9CTlhXJwL2+Rk9LicfNp1Ub5SBrCmV9AN9uQ1aD+ Y3sPa4wsowHXWlEfAputFoaiDmOx989i1w07WgiM= Authentication-Results: mail-nwsmtp-smtp-production-main-24.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id 44DA81200068; Tue, 1 Oct 2024 15:13:09 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Tue, 01 Oct 2024 15:13:09 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddujedgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgi drrhhuqeenucggtffrrghtthgvrhhnpeeihfejueevteffffdvfeetffffkefhuedujeei heehiedulefghefgffefudffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegughhuthhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghl ihhthidqudeffeefleelheehvddqvdelgeejjeejjeeiqdgughhuthhovheppeihrghnug gvgidrrhhusehfrghsthhmrghilhdrtghomhdpnhgspghrtghpthhtohephedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtoh epshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepjeef feekjeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehjuhhriheslhhinh hkohhvrdhnvghtpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggr lhdrtggr X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Oct 2024 15:13:06 -0400 (EDT) Message-ID: <7d19c2a7-5b5b-4b92-a98e-232e05ec8403@yandex.ru> Date: Tue, 1 Oct 2024 22:13:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <868qv73joh.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 01/10/2024 18:51, Eli Zaretskii wrote: > I can explain the rationale for doing the opposite: when describing > the operation with active region, we usually start with "If the region > is active..." or with some other similar conditional language. This > then makes it natural to explain the behavior in the other cases, > because the active-region one is clearly conditional, and thus not the > general case. When using commands like kill-region, or kill-ring-save, etc, having an active region is the "usual" case (among other things because without it the user doesn't see the bounds that would be acted on). With the command in question, not having an active region will likely be the more frequent case, and the boundaries of the text acted upon are already visible in the buffer. From unknown Sun Jun 22 08:05:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sean Whitton Subject: bug#73387: closed (Re: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n) Message-ID: References: <87frpffgai.fsf@melete.silentflame.com> <87zfo28fzu.fsf@zephyr.silentflame.com> X-Gnu-PR-Message: they-closed 73387 X-Gnu-PR-Package: emacs Reply-To: 73387@debbugs.gnu.org Date: Wed, 02 Oct 2024 01:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1727832302-18110-1" This is a multi-part message in MIME format... ------------=_1727832302-18110-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 73387@debbugs.gnu.org. --=20 73387: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73387 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1727832302-18110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 73387-done) by debbugs.gnu.org; 2 Oct 2024 01:24:36 +0000 Received: from localhost ([127.0.0.1]:54836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svo6V-0004hc-NI for submit@debbugs.gnu.org; Tue, 01 Oct 2024 21:24:35 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:41418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svo6T-0004hP-GQ for 73387-done@debbugs.gnu.org; Tue, 01 Oct 2024 21:24:34 -0400 DKIM-Signature: a=rsa-sha256; b=f+RogAiTq+GhfxW42W3s8cN7yrZY0lb3006B1NfHn/RlPfPn0czfAduFcGFGYaSIcEKKoe5pu6MfgmPdPrd+h8gicJBl8iLwq+r6xwUNwweNHbfiFymGFS3405D610p5r3WPKk7b3xXeUyCf2NEVgI2EsaY0izpl2DVwLwclWqRqwUGTMiwlvgq5Xos8CY0B4pzuXb2sGN8LwaFBRmpGOWszsYt6hUHb64LoOQFcT9N2LuVayNN3f0FUpFvUZZxKbQJxStYO7H+PGJgrl5J4phvIMUML+3R9H5LzgalCeloQENTiwf0afJa15fPunMQpbC8MRweRyAmGX2pNpzwFqA==; s=purelymail2; d=spwhitton.name; v=1; bh=nw2lbWDmQkgpWf1Fg0zs64MzsbrcOvOESEKuZmyLfj4=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=6BpsTt4gMj7Is0vUXZDkvuOUc1kWQMKfOU731rV1M8Ke+kKPmnoMCVm6/G+ySWK13T4x1kL5Ohy620m1bPpI0ySjR9+tq+oQcMC1eJu8KrVq/6TjwVNbFbLPq9BpHTWjzaNyvE1rv0gag7OPM6JOaTmQLOZgIS+8ST91HdUaCFC1jZCMSR7C2QoVvhUzvummoUn7EOjZGDvpllrVWUZq+K+p7zOkFEG+RaJZTfvVs6QrDyAnY3026gCbvFtkiFx0SuT7ZbTfAFlv0QM8TgAsx1+xmTDGGaEljAiLWQkqdH6LBGn5vIHs/5qtl/UhnAMgkxCHI/bsDMn43RAxm0FONA==; s=purelymail2; d=purelymail.com; v=1; bh=nw2lbWDmQkgpWf1Fg0zs64MzsbrcOvOESEKuZmyLfj4=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387-done@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 2064121623; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 02 Oct 2024 01:24:26 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id E396D7E3DC1; Wed, 2 Oct 2024 02:24:21 +0100 (BST) From: Sean Whitton To: Dmitry Gutov , 73387-done@debbugs.gnu.org Subject: Re: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n In-Reply-To: <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Oct 2024 04:57:19 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <9be40a05-3260-40a8-9c35-c5daac413844@yandex.ru> <87wmisprfk.fsf@melete.silentflame.com> <16230560-cad5-4cc9-a272-a0f961247158@yandex.ru> <87h69wppm5.fsf@melete.silentflame.com> <28d77c12-8426-43bc-9833-f07b391cbe05@yandex.ru> Date: Wed, 02 Oct 2024 09:24:21 +0800 Message-ID: <87frpffgai.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 73387-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 04:57am +03, Dmitry Gutov wrote: > On 01/10/2024 04:40, Sean Whitton wrote: >> Is it right that diff-vc-deduce-fileset will only ever be called in the >> context of using C-x v v to commit a patch? The name of the function >> suggests that it might be used for something else, if not now then in >> the future. > > It's not a 100% guarantee but for now that's how things stand, and it doesn't > work in a narrowed buffer. So for simplicity's sake we can make it show an > error with such instructions, I think. > > I don't mind doing it the another way too, but if its return value is not > used, that's not a very intuitive design. Okay, done that now, and closing the bug. Thanks! -- Sean Whitton ------------=_1727832302-18110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 16:09:08 +0000 Received: from localhost ([127.0.0.1]:36128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srgBv-0003lE-Fy for submit@debbugs.gnu.org; Fri, 20 Sep 2024 12:09:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:49892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srgBt-0003l3-5k for submit@debbugs.gnu.org; Fri, 20 Sep 2024 12:09:06 -0400 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 1srgBZ-0003Om-TG for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 12:08:45 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srgBX-0003bO-OI for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 12:08:45 -0400 DKIM-Signature: a=rsa-sha256; b=sEpNRnjxaQkweN8WNfptNNOrhuDs3fDz39opWMND4d4ISNeJ1AWhdL1rVPP2c1KualuADpCXMPGRudK7qUg/SJ7WzmQqTwxdX2Q38R+AcM+IwfJeyJ8I7w5nLdwvVycQZl4PVUTrjf0ROXCQHfsCfqggJv/edJWd4KVd4VSkDfmAVei6hRGMeb7FDYsz/GgCDggICq3n8Q1+YMeFCB7hgixb5ihL2Pq2g+9JHD87fAsHS17+M5zIdzZGKwfWtMFcgvEAPMLzoHJxZCh4oIzoAJxfdCPLn9V5lTS0PTWfwt1KEqur3OdjGiG3oeK+PD/d6vTt/Oj32OPrj9onnM6Nbg==; s=purelymail3; d=spwhitton.name; v=1; bh=wGreWrrRiHEA+7gleVn4jMQDDrxrRW5bwFNgmmsSfoc=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=CLgT4uIs+u15YCYR7PvWia0+AUjkIL8C/psmE5Iuchval2cWWLvjZchYf1Uz+y3KnTYaivhs5PZ7yjwaqXNSy5V1q5t/7UdPwBphUK4YaC7boXrCY2ICDo93YE65V7nFH2UECZTRqr3YjxeMn2078K0yJOrVHJpVEs6iv1ec8tsvxI1hAoReR36aUrAPyhVaJTseoPflqXq7ECeKbjhKNAyCDI8H5xKy5YqzY7+VmmhaM+4JXOD5w+qzS8XcgXH4HOsUvzsldFB6fEmCSXo23Hq9H/fUFDINHXd1T0ViG8YxV+TYFUAbnk54v19r5c4JfA2zhpgEdESWbwv8fskUAg==; s=purelymail3; d=purelymail.com; v=1; bh=wGreWrrRiHEA+7gleVn4jMQDDrxrRW5bwFNgmmsSfoc=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: bug-gnu-emacs@gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1440394413 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 20 Sep 2024 16:08:38 +0000 (UTC) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 03605949FDC; Fri, 20 Sep 2024 17:08:37 +0100 (BST) From: Sean Whitton To: bug-gnu-emacs@gnu.org Subject: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Date: Fri, 20 Sep 2024 17:08:37 +0100 Message-ID: <87zfo28fzu.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=34.202.193.197; envelope-from=spwhitton@spwhitton.name; helo=sendmail.purelymail.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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, GAPPY_SUBJECT=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) X-debbugs-cc: monnier@iro.umontreal.ca, dgutov@yandex.ru, juri@linkov.net Hello, If you do C-c C-n in a diff-mode buffer with multiple hunks, a subsequent C-x v v signals a user-error from diff-file-next. I think that the bug is in how diff-vc-deduce-fileset invokes diff-file-next. I'm not sure exactly how to rework diff-vc-deduce-fileset. It would be nice to fix this because then C-c C-n C-x v v would be a convenient way to commit just a single hunk. -- Sean Whitton ------------=_1727832302-18110-1-- From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2024 01:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172783241718712 (code B ref 73387); Wed, 02 Oct 2024 01:27:01 +0000 Received: (at 73387) by debbugs.gnu.org; 2 Oct 2024 01:26:57 +0000 Received: from localhost ([127.0.0.1]:54853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svo8n-0004rk-6k for submit@debbugs.gnu.org; Tue, 01 Oct 2024 21:26:57 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:41712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svo8k-0004re-Oa for 73387@debbugs.gnu.org; Tue, 01 Oct 2024 21:26:55 -0400 DKIM-Signature: a=rsa-sha256; b=AjDKt6RVSKBNZ3reYlR4MCYhGl0oMMqZdDSt6wXbdMKUcNLcLC5uycrRDEsyCk7xedwuaMr3LCW9tfjp8ttVLy2cKRXgwUEXqHEMeWz3KtAd9XX8KiOdRSud6Pwhzhz6XipU51yELszoaNDAfC7h7QYCBbklC8cDJBjHAP037r7VmJ2CywnCKQbU57r/7n1cHENMJhX0zenEGL1K9087DI0qYoetV84xrjoe9F88wCtGfHZU/wPL5cMxsKXGNpwcTZTOq4OpqtI3TzrN2yxr8QqmG9E9wfbLtPX45ww3v9/FWqsHapwQhrsP96siB3FbRUYpYIg/pwDXFXCyYnRmow==; s=purelymail2; d=spwhitton.name; v=1; bh=As6fwgGfUoo1CHsQN/p80OHJ2nl8m7/1DolU2gCia68=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=SMpKS4pMSZh2REnR7+PAK+Ykvu7g/gX3yq7zS7YGVXecynFI1uKDeIAgFBAFfzsUqhPXeH+3pl0n2U30V0XsMXuJTCkDl3CiaWDyW1vBxSko1evLo3SBb+FTAxPy6o71sMtxKJwfM2zD01oygEbdIXeJT6EQglTYWXDbiVfsZxExB33hvSZr7Q8Sg622XaCI8HgLb8c+3q8x+mY4zsFw/YssncKKqEG7z04lFV4CzfyjGCxqJ0xH3+r0hfy9Nrlxteh808nlbq4NRcXZ3mzzCgYCDmYHNcuchg18H8LvmFyEvjxqZyy883zR5vpNBqc8EmW0nj6hWkQ5pNjI7l4nEg==; s=purelymail2; d=purelymail.com; v=1; bh=As6fwgGfUoo1CHsQN/p80OHJ2nl8m7/1DolU2gCia68=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1146247825; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 02 Oct 2024 01:26:44 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 4F2557E3D8B; Wed, 2 Oct 2024 02:26:42 +0100 (BST) From: Sean Whitton In-Reply-To: <868qv73joh.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Oct 2024 18:51:58 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> Date: Wed, 02 Oct 2024 09:26:42 +0800 Message-ID: <877carfg6l.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Tue 01 Oct 2024 at 06:51pm +03, Eli Zaretskii wrote: > I can explain the rationale for doing the opposite: when describing > the operation with active region, we usually start with "If the region > is active..." or with some other similar conditional language. This > then makes it natural to explain the behavior in the other cases, > because the active-region one is clearly conditional, and thus not the > general case. > > By contrast, your text starts with the description of behavior that > has no conditions, and thus is perceived as the complete and > exhaustive. Then the next sentence is "out of the blue" because the > reader does not expect any such additions, being just told what the > command does, period. Yes, I know what you mean about that sentence coming out of the blue. But as Dmitry says, the behaviour when the region is active is a bonus feature, not really what the command is about. Do you think maybe this is better: Delete all hunks other than the current hunk. As a special case, when called interactively with an active region ... -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2024 06:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, spwhitton@spwhitton.name Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17278498868661 (code B ref 73387); Wed, 02 Oct 2024 06:19:01 +0000 Received: (at 73387) by debbugs.gnu.org; 2 Oct 2024 06:18:06 +0000 Received: from localhost ([127.0.0.1]:56326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsgY-0002Fd-9z for submit@debbugs.gnu.org; Wed, 02 Oct 2024 02:18:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsgW-0002F6-Bw for 73387@debbugs.gnu.org; Wed, 02 Oct 2024 02:18:05 -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 ) id 1svsgO-00087R-Oz; Wed, 02 Oct 2024 02:17:56 -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=TArhabXAKQy31rcd8mTSnMJCGf4NrN+bMIBoSER4MVs=; b=VGdrnTJh3Yjp gMadV9LCCGWCQCgQxjPfky9GfR5oKz8Lk8v7kvRiNW+JblPqO/GQdzJ+/JjejhJzVq3+GrjNn8rFm AXgmISNlWpo1X9OTqVWWi9/cIEubvR4LOScHHOs4ugdmz8bO0es4gBIqCmYOONJlcwQM8kGsHDyh6 9wzf3rMMWuQ4wmKN33nCX1bsu+jZfzS6KwTtyp/QL3hRVKBC51B8I3r9x22p+qMbyM1XNDNQ1pHEy h5NFWu7J8Buv4+Gz3c9sdGqQui3DNsTKlgZ3Tfpgke4k3vX5poVWCD0ioBCj+3wiTOHacVOLGXNUQ do7wUIK/9Tb4b0N+/V5tOQ==; Date: Wed, 02 Oct 2024 09:17:45 +0300 Message-Id: <86setf1112.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <7d19c2a7-5b5b-4b92-a98e-232e05ec8403@yandex.ru> (message from Dmitry Gutov on Tue, 1 Oct 2024 22:13:03 +0300) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <7d19c2a7-5b5b-4b92-a98e-232e05ec8403@yandex.ru> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > Date: Tue, 1 Oct 2024 22:13:03 +0300 > Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca > From: Dmitry Gutov > > On 01/10/2024 18:51, Eli Zaretskii wrote: > > I can explain the rationale for doing the opposite: when describing > > the operation with active region, we usually start with "If the region > > is active..." or with some other similar conditional language. This > > then makes it natural to explain the behavior in the other cases, > > because the active-region one is clearly conditional, and thus not the > > general case. > > When using commands like kill-region, or kill-ring-save, etc, having an > active region is the "usual" case (among other things because without it > the user doesn't see the bounds that would be acted on). > > With the command in question, not having an active region will likely be > the more frequent case, and the boundaries of the text acted upon are > already visible in the buffer. Thanks for providing the rationale. However, IME, clarity of documentation is so important that it trumps many other considerations of the order of describing things, so I'm still not happy with your proposed order. If you search diff-mode.el for "region", you will see that this very file uses the conventions I explained above. Here's one example: (defun diff-context->unified (start end &optional to-context) "Convert context diffs to unified diffs. START and END are either taken from the region \(when it is highlighted) or else cover the whole buffer. With a prefix argument, convert unified format to context format." From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2024 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172785333120567 (code B ref 73387); Wed, 02 Oct 2024 07:16:01 +0000 Received: (at 73387) by debbugs.gnu.org; 2 Oct 2024 07:15:31 +0000 Received: from localhost ([127.0.0.1]:56446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svta7-0005Lf-BI for submit@debbugs.gnu.org; Wed, 02 Oct 2024 03:15:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svta5-0005LR-B0 for 73387@debbugs.gnu.org; Wed, 02 Oct 2024 03:15:30 -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 ) id 1svtZv-0005Vu-J7; Wed, 02 Oct 2024 03:15:19 -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=U71FjMLd3xWxRhasxWIQfM7IMJg7EkeR2rCqjUDz268=; b=q10zaoGJE7CC UlZFDuMy7JT20CFHYltnF74Wo1SPQLgl6EikDnbjXH6noSS9FZ/JVbeFqTbuyLQWWg/ee9pHQWOqM P0AC48zSOv/9pDLfklteKGqDxRqKUtBGh5s2WW5G0CDtUtphkVxkP0eNltKeOZyAenJ+lVSta4gPF StlB7WRbD0bxr3cx1j8d+JLLMdpwOVBXhW1jQedn3ytUY5Dz4Gk3Lo5dmCAv3sxJnmIo0TIld8l85 cIsbSbRsG3YREagX2DcKuO2zNyaF5tcYputRq+c/jIy9TQpPoNZYb7vNlZsNBEmkwfw6Bi2Mrhejk b+Zx4p1jiP5sksh9rTCOfg==; Date: Wed, 02 Oct 2024 10:15:14 +0300 Message-Id: <86jzer0yd9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <877carfg6l.fsf@melete.silentflame.com> (message from Sean Whitton on Wed, 02 Oct 2024 09:26:42 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > From: Sean Whitton > Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > Date: Wed, 02 Oct 2024 09:26:42 +0800 > > On Tue 01 Oct 2024 at 06:51pm +03, Eli Zaretskii wrote: > > > I can explain the rationale for doing the opposite: when describing > > the operation with active region, we usually start with "If the region > > is active..." or with some other similar conditional language. This > > then makes it natural to explain the behavior in the other cases, > > because the active-region one is clearly conditional, and thus not the > > general case. > > > > By contrast, your text starts with the description of behavior that > > has no conditions, and thus is perceived as the complete and > > exhaustive. Then the next sentence is "out of the blue" because the > > reader does not expect any such additions, being just told what the > > command does, period. > > Yes, I know what you mean about that sentence coming out of the blue. > But as Dmitry says, the behaviour when the region is active is a bonus > feature, not really what the command is about. > > Do you think maybe this is better: > > Delete all hunks other than the current hunk. > As a special case, when called interactively with an active region ... This doesn't really address the issue, IMO. The main problem I have here is with the "all" part of the first sentence, which is then contradicted by the second. Also, in other places, you describe the behavior when region is active, but not when it isn't. Here's what I would suggest to say in the manual: @item C-c @key{RET} k Delete diff hunks other than the current one. If the region is active, this command deletes the hunks overlapped by the region; otherwise it deletes all the hunks other than the current hunk. Do @emph{not} invoke this command in a narrowed buffer, as that could produce unexpected results. And this is for the command's doc string: (defun diff-delete-other-hunks (&optional beg end) "Delete diff hunks other than the current one. Interactively, if the region is active, delete all the hunks which the region overlaps; otherwise delete all the hunks except the current one. When calling from Lisp, pass BEG and END as the bounds of region in which to delete diff hunks; BEG and END omitted or nil means to delete all the hunks but the one which contains point. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 00:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172791665018366 (code B ref 73387); Thu, 03 Oct 2024 00:51:02 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 00:50:50 +0000 Received: from localhost ([127.0.0.1]:59525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swA3N-0004m9-J2 for submit@debbugs.gnu.org; Wed, 02 Oct 2024 20:50:49 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:60576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swA3M-0004lu-20 for 73387@debbugs.gnu.org; Wed, 02 Oct 2024 20:50:49 -0400 DKIM-Signature: a=rsa-sha256; b=Wpn8ues6PxK0G59oOClU309rg+VRZctNkl0+oFMZqBh5AMtAKIY/LK7KgjaiVHFBEGUCvKJAaCAJssqUXdvkXb1fl7Xz1bb0rrxZqFE8FdAFsDRdM+KnBpw7QeYvDKGQu7pFWttJptAMfICqWHLwJOvbmDydyuX/6hZ2bfg0hVENbpAognXO33MDvOQ33MtkAr4E2tIwbZnp8xKeludMD2pKeO5yFFPiV4gd492oJsIXFQoOpnXsLphZDu2P2jOv768Fzepn1gsjNJFZ4mXlsP9YebEalb7kxZuia819RCNUANViphWIZPHUQyehAuk1aAdQMq30tQQ9n4v7Ur3O8g==; s=purelymail2; d=spwhitton.name; v=1; bh=JjpGKGbpdnniAKg4K6s3B6zD+wuJIPnkN2CnlrmqD/M=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=DgXu0T/G8648Y5hDI1iJIB/PYyPIlyTTYJAG7q0mUMQI4nlF8JSm3C3ynlWnZpShFgJEoPttUdfOkveQV4kBWuE0dBpUcxl+xsm9tqqLnxIpoHhTrfVeovSZgO749YEDTBWkwJN5m/vxyUFubm8AgCEDvBBofulCLehLgWsiDlP13AJWrwInN3d093/+ylV3B8XgfigAvtJtnM1Abwhmdolnxx40P5lEIKXiq4Un5//3srFBiF9HmKm+i0FqVH3y+DWp87d4exMlPUhlCBYRXv/90CLzNbEHHDbL8DQbvCAU1O4Fc4omW3B4IG1pnTQ9EnQXPIACG0GMmnzkkN3U7Q==; s=purelymail2; d=purelymail.com; v=1; bh=JjpGKGbpdnniAKg4K6s3B6zD+wuJIPnkN2CnlrmqD/M=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1303589503; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 03 Oct 2024 00:50:41 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id E7A967E4426; Thu, 3 Oct 2024 08:50:37 +0800 (CST) From: Sean Whitton In-Reply-To: <86jzer0yd9.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Oct 2024 10:15:14 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> Date: Thu, 03 Oct 2024 08:50:37 +0800 Message-ID: <877caq3t7m.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Wed 02 Oct 2024 at 10:15am +03, Eli Zaretskii wrote: > This doesn't really address the issue, IMO. > > The main problem I have here is with the "all" part of the first > sentence, which is then contradicted by the second. Also, in other > places, you describe the behavior when region is active, but not when > it isn't. > > Here's what I would suggest to say in the manual: > > @item C-c @key{RET} k > Delete diff hunks other than the current one. If the region is > active, this command deletes the hunks overlapped by the region; > otherwise it deletes all the hunks other than the current hunk. Do > @emph{not} invoke this command in a narrowed buffer, as that could > produce unexpected results. Okay, I've rewritten based on this, though I haven't included the imprecation, because invoking it in a narrowed buffer could never produce unexpected results -- the function will always do nothing. > And this is for the command's doc string: > > (defun diff-delete-other-hunks (&optional beg end) > "Delete diff hunks other than the current one. > Interactively, if the region is active, delete all the hunks which > the region overlaps; otherwise delete all the hunks except the > current one. > When calling from Lisp, pass BEG and END as the bounds of region in > which to delete diff hunks; BEG and END omitted or nil means to > delete all the hunks but the one which contains point. Done, thanks. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 06:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172793723227905 (code B ref 73387); Thu, 03 Oct 2024 06:34:02 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 06:33:52 +0000 Received: from localhost ([127.0.0.1]:59776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swFPM-0007G1-6h for submit@debbugs.gnu.org; Thu, 03 Oct 2024 02:33:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swFPJ-0007Fl-Dm for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 02:33:50 -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 ) id 1swFPB-0003y5-0N; Thu, 03 Oct 2024 02:33:41 -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=TN8OQ1Wx+JLh6HQhaRJSQYk6iiFOQmvpiFBZl3lX2IQ=; b=e3Wr2I/YPTKJ 9CquKfn43nG1UCdM6iJxBrcPmZxZfRUjiJfTKqkvoDwjHrDtZlUXvHsckU4p0f2JZDQLYPRIVdQFd MfLUXq+b4BROyx9SBHmBoxjQGLB1ak0BzA0ssl35FIFsJs/TsyP25leKb5cTarsk8AJVb8eCZTwTt EKgRzAROmzdGhf7KF9x6Xl/lprJEzRSe+/4Az65vApyJingcFVunkDHESrQ0PFLKFGSShOOGF+Dqo jx6DlKaBBIX4ge80iWZULKQtt+EwxHTuDqzJ1djpaeb3D6/JMMNTwA9vE0vaWS5J1tOqsvzsa42MJ LxN/cdtBnHjJakzWjojivA==; Date: Thu, 03 Oct 2024 09:33:23 +0300 Message-Id: <86setdzoek.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <877caq3t7m.fsf@melete.silentflame.com> (message from Sean Whitton on Thu, 03 Oct 2024 08:50:37 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > From: Sean Whitton > Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > Date: Thu, 03 Oct 2024 08:50:37 +0800 > > > @item C-c @key{RET} k > > Delete diff hunks other than the current one. If the region is > > active, this command deletes the hunks overlapped by the region; > > otherwise it deletes all the hunks other than the current hunk. Do > > @emph{not} invoke this command in a narrowed buffer, as that could > > produce unexpected results. > > Okay, I've rewritten based on this, though I haven't included the > imprecation, because invoking it in a narrowed buffer could never > produce unexpected results -- the function will always do nothing. Then why do we signal user-error in that case? I think this should be explained in the manual. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 07:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17279392323279 (code B ref 73387); Thu, 03 Oct 2024 07:08:01 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 07:07:12 +0000 Received: from localhost ([127.0.0.1]:59822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swFvc-0000qo-06 for submit@debbugs.gnu.org; Thu, 03 Oct 2024 03:07:12 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:53046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swFvZ-0000qa-Cu for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 03:07:10 -0400 DKIM-Signature: a=rsa-sha256; b=AP57lTgfztX2ei3C74IyrSC/nH++t2nAfTFMiGPn6QPSGWiYIRi3UxeO+e4jMMGAstBwDyMqR8ytDc9bVVJVAqSbxG2x3zWH/PPs9fRrsFQ2kwBQGhKR2EfM4FOsP2gyFyopvT3yjU3SeoFigk3jxwDJxswGLYaCUq7aABSbMypYdfr8YtIraNAxEAyw7NZZsIZw/27Xrrd74d3X8nUQmsc/1BwfboMORGArZe4SyWoOBViijZkmoLZHVPXKRmkgzKVJIpwZKAHlG/qsd7dragtyWZXvYwAd97yAsmV74XkzlFLoypahTyCx2yvAwpLRkYLg2F9xSPGog1o6jbzYJw==; s=purelymail2; d=spwhitton.name; v=1; bh=4hdXio4WSSFvGm0SEHs/cw9rLUDgdbq0l41d0ArcUv8=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=6Qn5xWDpaWrj2qdCvj/TyXvcbEPjemY5iwXZ84u25DSAdElpj1yH9nKXmi/PCbeHEq19fB06mtaq1AwyM3bJZPHwiwZhbHceywn/Jst2JybOltNpR0w0d1r9fzPwve6//Ijoy8XfV3a11DF/1ZAUYG9P+UCbLkQuhj8JdG7gYeN5jazvoW4OVv0F4xYt7n0R74YUIIm+Z9sDf+kIPWagG3wbMSgjTQPPLkrJPE4SnJAbKjpf/bKvWZR3i+baR2ntWUqIWb3grodHVjyCZTedRNqzrCZIeUOKHThqWjHUGyEegjvMuKoDGGE6yQ8bhXMhwwHcRbu0/CZ5g5LpkQRqpg==; s=purelymail2; d=purelymail.com; v=1; bh=4hdXio4WSSFvGm0SEHs/cw9rLUDgdbq0l41d0ArcUv8=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1950728935; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 03 Oct 2024 07:07:00 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 65E9B7E15B7; Thu, 3 Oct 2024 15:06:58 +0800 (CST) From: Sean Whitton In-Reply-To: <86setdzoek.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Oct 2024 09:33:23 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> Date: Thu, 03 Oct 2024 15:06:58 +0800 Message-ID: <87ed4xzmul.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Thu 03 Oct 2024 at 09:33am +03, Eli Zaretskii wrote: >> From: Sean Whitton >> Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, >> juri@linkov.net >> Date: Thu, 03 Oct 2024 08:50:37 +0800 >> >> > @item C-c @key{RET} k >> > Delete diff hunks other than the current one. If the region is >> > active, this command deletes the hunks overlapped by the region; >> > otherwise it deletes all the hunks other than the current hunk. Do >> > @emph{not} invoke this command in a narrowed buffer, as that could >> > produce unexpected results. >> >> Okay, I've rewritten based on this, though I haven't included the >> imprecation, because invoking it in a narrowed buffer could never >> produce unexpected results -- the function will always do nothing. > > Then why do we signal user-error in that case? I think this should be > explained in the manual. I think I am using user-error wrongly. Shall I just switch it to 'message', and rearrange the control flow so nothing else happens? -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 11:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172795369718469 (code B ref 73387); Thu, 03 Oct 2024 11:09:02 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 11:08:17 +0000 Received: from localhost ([127.0.0.1]:60127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJgu-0004np-Nf for submit@debbugs.gnu.org; Thu, 03 Oct 2024 07:08:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJgs-0004nY-D6 for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 07:08:15 -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 ) id 1swJgi-0007ja-NN; Thu, 03 Oct 2024 07:08:04 -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=RDP1cL6EwqGvn9Su2UgOm2qr7yu3X4LJMzMLrUo3KgA=; b=D3FFTqQ20lda IUmx9esRnzSy47CwG/98CFK8K2QCpX4oTYx3k/mDWXkrSUW/LPKpVahRfDWawdOXAI/60iEAArs3t WoblB+ZKhxxY4FI8E2LZnaB3CPzUbv9LgXMttwuIQuprGA9u5QPRg+pn2Yrv4uNbgnaOsTifU2IYO G8gNWIBbxo2K0V8PltwQ3J7zk/N+vPJXCimdJSXJanejp5hmLU9dq5ud3Tqy08PIrzGA93gdSG/0S 8pIRbsVzuTmuDIIA+MyhG068MWAwk5aKb1fPLkBugtHSt95ZQ4AKzJXy5SrR8D0dq7eo+OZirmlFI vxgyTjgz+Gzv+Hw7EYOUIQ==; Date: Thu, 03 Oct 2024 14:07:36 +0300 Message-Id: <86bk01zbpj.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ed4xzmul.fsf@melete.silentflame.com> (message from Sean Whitton on Thu, 03 Oct 2024 15:06:58 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> <87ed4xzmul.fsf@melete.silentflame.com> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > From: Sean Whitton > Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > Date: Thu, 03 Oct 2024 15:06:58 +0800 > > Hello, > > On Thu 03 Oct 2024 at 09:33am +03, Eli Zaretskii wrote: > > >> From: Sean Whitton > >> Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > >> juri@linkov.net > >> Date: Thu, 03 Oct 2024 08:50:37 +0800 > >> > >> > @item C-c @key{RET} k > >> > Delete diff hunks other than the current one. If the region is > >> > active, this command deletes the hunks overlapped by the region; > >> > otherwise it deletes all the hunks other than the current hunk. Do > >> > @emph{not} invoke this command in a narrowed buffer, as that could > >> > produce unexpected results. > >> > >> Okay, I've rewritten based on this, though I haven't included the > >> imprecation, because invoking it in a narrowed buffer could never > >> produce unexpected results -- the function will always do nothing. > > > > Then why do we signal user-error in that case? I think this should be > > explained in the manual. > > I think I am using user-error wrongly. > > Shall I just switch it to 'message', and rearrange the control flow so > nothing else happens? Maybe so, but I'd still would like to hear the rationale for telling the user "Cannot commit patch when narrowed; consider 'widen'". If indeed we "cannot commit" in this case, signaling an error is TRT, and replacing that with a message is not, because it will do what you claim in the message you cannot. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Sean Whitton Cc: 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172795412720163 (code B ref 73387); Thu, 03 Oct 2024 11:16:02 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 11:15:27 +0000 Received: from localhost ([127.0.0.1]:60135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJnr-0005F9-Cg for submit@debbugs.gnu.org; Thu, 03 Oct 2024 07:15:27 -0400 Received: from forward501a.mail.yandex.net ([178.154.239.81]:55934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJno-0005Ez-OZ for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 07:15:26 -0400 Received: from mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:339a:0:640:a002:0]) by forward501a.mail.yandex.net (Yandex) with ESMTPS id E708461D16; Thu, 3 Oct 2024 14:15:20 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id GFa0Kk1JcuQ0-TzcUEN5M; Thu, 03 Oct 2024 14:15:20 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727954120; bh=iEA/9StLO3XuSBM4g9ZhCrtc7BYE77cZkS1jbg7LAfg=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=S+ETY5ndPh9NuUwX+hWE+jWv0iDc2LMECPqj3Dh9Gz7Oc4kObHxrzul2BFje3izSX VPiRu95NoXUYUh1yf8s+g8/IOshTGW98y1Jor8mTGRH0ZTKZWRjojCloeY6q+0nvzy h6WByelDIjNOaqoL6FRyhjGCzXtgl+uD3D7RlcFU= Authentication-Results: mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id C04A01200043; Thu, 3 Oct 2024 07:15:16 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Thu, 03 Oct 2024 07:15:16 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvuddgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrd hruheqnecuggftrfgrthhtvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieeh heeiudelgfehgffffeduffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhi thihqddufeeffeelleehhedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvg igrdhruhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeehpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhope hsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejfeef keejseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjhhurhhisehlihhnkh hovhdrnhgvthdprhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghl rdgtrg X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Oct 2024 07:15:14 -0400 (EDT) Message-ID: <75cbf961-6ae6-48d8-b813-8f4c4d5a6c1e@yandex.ru> Date: Thu, 3 Oct 2024 14:15:12 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87zfo28fzu.fsf@zephyr.silentflame.com> <8d0b046e-4b29-4551-b421-e98e212a7b40@yandex.ru> <86msjxefkv.fsf@mail.linkov.net> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> <87ed4xzmul.fsf@melete.silentflame.com> <86bk01zbpj.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86bk01zbpj.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-Filter: 1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 03/10/2024 14:07, Eli Zaretskii wrote: > Maybe so, but I'd still would like to hear the rationale for telling > the user "Cannot commit patch when narrowed; consider 'widen'". If > indeed we "cannot commit" in this case, Indeed we can't, it's not supported. From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 11:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172795541724394 (code B ref 73387); Thu, 03 Oct 2024 11:37:02 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 11:36:57 +0000 Received: from localhost ([127.0.0.1]:60152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swK8f-0006LO-Gg for submit@debbugs.gnu.org; Thu, 03 Oct 2024 07:36:57 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:45828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swK8c-0006LA-TC for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 07:36:55 -0400 DKIM-Signature: a=rsa-sha256; b=MaZJnSW6GOziq9/TKCwPkTl0HcFTMkZneipAS0/h1cBzDNh9mMBF35brfPqrma4qqLv+5QCMsXl3tiHipm7r7WmbmN6SeTOk4fyxhR1oV9CM9ASEFSU6/kf0K6zuWyS/xGHCIOY+/hJeOZ1Hdx2+EwmHObII3iVlQXVt5uCZWgso+yi26awtmRyTVe8mbJMEiDX4fUBtp54QW0Nqn7S7nMdSaOzbZNqmQPPxuv/wecdj3oKe7IZNu+anPnZVYP0piGZ7HDWvnojxpvgRJMG4JZeJQoin6UZmO08mjH5ZWH2vIOjCsZCR4StPc9rMVmquT9y7HMANOdUwZo0kq/0L2A==; s=purelymail2; d=spwhitton.name; v=1; bh=cpeN0L2EQjU4dL0r6riUUFJcpedrlkcgzqde/n0Y5xc=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=gInYF/gktENKhHzpmT1um6X2JYSwmadWWBSnz9I/vt5bF476Nd4K5hpr++ITAb2V5P8pFWQn5/LKJo2zN9F0Jc1oHBlsH/J1fbZOrRMRRhLEGZEQzIZLGNKmt6tRoIVa7FoNtwI4cvYv10OTXV1mTeIfCr76geJbCu1fy+oWC9AnCa/7RPCxUIYkepc0PrX/0/wiJiqsO+P1zKrtYcUclEt9CR+SJ171R46xM4EugShv017Tk7qvkr0OLzdVVs87mNXM7om13J0F7P4PCLmJGo2bb+VRXn3EH5dkq6s2oBo0KaZQGA4pJc/JQpsqWldpqV41YH4+82QcxU7hY6rXWQ==; s=purelymail2; d=purelymail.com; v=1; bh=cpeN0L2EQjU4dL0r6riUUFJcpedrlkcgzqde/n0Y5xc=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1906533059; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 03 Oct 2024 11:36:46 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id B93B67E4493; Thu, 3 Oct 2024 19:36:42 +0800 (CST) From: Sean Whitton In-Reply-To: <86bk01zbpj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Oct 2024 14:07:36 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> <87ed4xzmul.fsf@melete.silentflame.com> <86bk01zbpj.fsf@gnu.org> Date: Thu, 03 Oct 2024 19:36:42 +0800 Message-ID: <87ed4xxvsl.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Thu 03 Oct 2024 at 02:07pm +03, Eli Zaretskii wrote: > Maybe so, but I'd still would like to hear the rationale for telling > the user "Cannot commit patch when narrowed; consider 'widen'". If > indeed we "cannot commit" in this case, signaling an error is TRT, and > replacing that with a message is not, because it will do what you > claim in the message you cannot. Okay. I do agree with you that the manual should state this limitation. This is what it says right now: This command does not work in a narrowed buffer because deleting hunks safely requires access to the file headers. So, the only difference from what you wrote is that it doesn't tell the user they *mustn't*, only that they *can't*. I think this addresses your concern, but please let me know if not. -- Sean Whitton From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 12:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.172795776732591 (code B ref 73387); Thu, 03 Oct 2024 12:17:01 +0000 Received: (at 73387) by debbugs.gnu.org; 3 Oct 2024 12:16:07 +0000 Received: from localhost ([127.0.0.1]:60246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKkZ-0008Tb-4N for submit@debbugs.gnu.org; Thu, 03 Oct 2024 08:16:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKkW-0008T5-Qc for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 08:16:05 -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 ) id 1swKkO-0001M6-FN; Thu, 03 Oct 2024 08:15:56 -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=cbsJNkTTV7pC1CWKXHEnPAOUCDojOBQQqxrz59seY3w=; b=fU51HH1sJnWQ QokyCj2buYiIENBxzS5ee8c2JENEff9wifSLr6N8akVMXLD+sj2I6VTEuoSlBrOl+q2/BK42uW/Zd 8MzCRz4P4t+z/7uDEM+8q/tl0eesJWlguacQyvC34GXwRzyFOMoQWbhYHWEHvq0dRA4A25ApJjTfw QfDjQtuNak8zGx3Py+PyuVJY9i8Q0al4qH0pVn70ajSDD/dF358ro/qv3X/yfebISl7Hu6lgEPvni kogheU6AXpi4OJv5suASpAKrpkB9W2LPdk1W/dkzyKhXQQ84CtMAPK3yBzp7Y78vkloPvALg478Yf rzlBgAIXS2O+cflG5aRHhA==; Date: Thu, 03 Oct 2024 15:15:53 +0300 Message-Id: <865xq9z8jq.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ed4xxvsl.fsf@melete.silentflame.com> (message from Sean Whitton on Thu, 03 Oct 2024 19:36:42 +0800) References: <87zfo28fzu.fsf@zephyr.silentflame.com> <87cykt2gkl.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> <87ed4xzmul.fsf@melete.silentflame.com> <86bk01zbpj.fsf@gnu.org> <87ed4xxvsl.fsf@melete.silentflame.com> X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) > From: Sean Whitton > Cc: dgutov@yandex.ru, 73387@debbugs.gnu.org, monnier@iro.umontreal.ca, > juri@linkov.net > Date: Thu, 03 Oct 2024 19:36:42 +0800 > > > Maybe so, but I'd still would like to hear the rationale for telling > > the user "Cannot commit patch when narrowed; consider 'widen'". If > > indeed we "cannot commit" in this case, signaling an error is TRT, and > > replacing that with a message is not, because it will do what you > > claim in the message you cannot. > > Okay. I do agree with you that the manual should state this limitation. > This is what it says right now: > > This command does not work in a narrowed buffer because deleting > hunks safely requires access to the file headers. > > So, the only difference from what you wrote is that it doesn't tell the > user they *mustn't*, only that they *can't*. > > I think this addresses your concern, but please let me know if not. That's fine, but I would suggest to clarify what you mean by "file headers". Something like "...because deleting hunks requires access to the part of the diffs where file names are specified." From unknown Sun Jun 22 08:05:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Oct 2024 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73387@debbugs.gnu.org, juri@linkov.net, monnier@iro.umontreal.ca, dgutov@yandex.ru Received: via spool by 73387-submit@debbugs.gnu.org id=B73387.17280060926938 (code B ref 73387); Fri, 04 Oct 2024 01:42:02 +0000 Received: (at 73387) by debbugs.gnu.org; 4 Oct 2024 01:41:32 +0000 Received: from localhost ([127.0.0.1]:34156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swXJz-0001nq-O2 for submit@debbugs.gnu.org; Thu, 03 Oct 2024 21:41:32 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:59804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swXJx-0001nZ-5P for 73387@debbugs.gnu.org; Thu, 03 Oct 2024 21:41:30 -0400 DKIM-Signature: a=rsa-sha256; b=HaBE454q7U32EuugQmwFBWnWZ/6Hlw+k1OrQnwf530rRPvnPtz58Br0Rqo8IAelnhlXKayqQcj5t498J2rDk2nWYa9KnYHaARq16gwGgY/I6uFFJe2pWr7YriFwkgEnfLvrOjxPa6Jfu9TwTJJfa7O+AS/TXkbEU5NrGgNBLuSXT7fLoRpwIzJLkZjVOCucv9rrBAaeqizhbN076qeVY6umC6oskuN3d1y3drgVLUJRNzFlSC6aA3Su1I7srUmX3Em2CCjElcfDpBy8ysPjpZD5CuFvgvJywXBheSS4lNgLEZGBQ/tmu8AxTwIjuOkYfe0/xK9t8nGRr1LpPmAzPig==; s=purelymail2; d=spwhitton.name; v=1; bh=5QYjmXiXmfWqibG1A9Jkj3KVfapY/Eq5L5+H3rpSwwU=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=o1tIVXi336IwVVKGrimAk+Ro4WFurww/KmRsnlBatw1c0d+jNPL3StIDvqKpMb9FQia7BJn/OnMQHqT3NC3eiCt/ZhdzvLuDm1oSTIvzhbwbD5GkUK33DogVoqvG0GvabsrXWymi5D3mCuWHKDNgUAMRxciiAvKng67Tk/wCLDVqI+HIlE2dIHTWjSYZW2D/gsEqgtfp+6qubz89vEojsxkDlg5aIHkRSWmh+6dK4IJkwuqY3VvBipVU/DpiRlLosC41/rSO++iUMVtWCW2dxk3aIP23oz35KPaZpQkN3SzTTKXTFnbicBSRoZvZYpZzEllJQrlvfZUL0B+hwy2ikQ==; s=purelymail2; d=purelymail.com; v=1; bh=5QYjmXiXmfWqibG1A9Jkj3KVfapY/Eq5L5+H3rpSwwU=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 73387@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1158098443; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 04 Oct 2024 01:41:20 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 76F9D7E488D; Fri, 4 Oct 2024 09:41:16 +0800 (CST) From: Sean Whitton In-Reply-To: <865xq9z8jq.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Oct 2024 15:15:53 +0300") References: <87zfo28fzu.fsf@zephyr.silentflame.com> <87jzf01bsk.fsf@zephyr.silentflame.com> <87y13dfgzz.fsf@melete.silentflame.com> <5e956e3b-5891-401a-a898-e339f52ea307@yandex.ru> <87h69ydnvd.fsf@melete.silentflame.com> <878qv9scps.fsf@melete.silentflame.com> <12b28146-5cbc-48cd-b0e2-0c528d4b9b1c@yandex.ru> <87ikudqocz.fsf@melete.silentflame.com> <86jzet2po6.fsf@gnu.org> <875xqcr6ho.fsf@melete.silentflame.com> <868qv73joh.fsf@gnu.org> <877carfg6l.fsf@melete.silentflame.com> <86jzer0yd9.fsf@gnu.org> <877caq3t7m.fsf@melete.silentflame.com> <86setdzoek.fsf@gnu.org> <87ed4xzmul.fsf@melete.silentflame.com> <86bk01zbpj.fsf@gnu.org> <87ed4xxvsl.fsf@melete.silentflame.com> <865xq9z8jq.fsf@gnu.org> Date: Fri, 04 Oct 2024 09:41:16 +0800 Message-ID: <87v7y8ve4j.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hello, On Thu 03 Oct 2024 at 03:15pm +03, Eli Zaretskii wrote: > That's fine, but I would suggest to clarify what you mean by "file > headers". Something like "...because deleting hunks requires access > to the part of the diffs where file names are specified." Done, thanks. -- Sean Whitton