From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73172: [PATCH] Move to start of current header in diff-{file, hunk}-prev Date: Fri, 20 Sep 2024 09:17:02 +0300 Message-ID: <86wmj67std.fsf@gnu.org> References: <4dbaac34-a1cc-4d4c-839c-bda74001e4b5@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13951"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, monnier@iro.umontreal.ca, 73172@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 20 08:17:55 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1srWxn-0003Pj-BM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Sep 2024 08:17:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srWxe-0004ae-Vx; Fri, 20 Sep 2024 02:17:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srWxc-0004ZD-45 for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 02:17:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srWxb-0004pF-OU for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 02:17:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=uVHII5X2GP4wp0vqbuPofAjCXqIZl3IFGnX5CGljlPI=; b=OwoXAD014TL6z60ynh2BRhNuxjtoyFpzGZc+iO2NiNj+x7w6xSf1ZZ1dNYCgcSBWaTue6PQEiv5ncyTnjjFG6wVohINUppN9RQXRDRtpaAZ9zJKovWak51pxx+DnKJazwY4y7+Yw1RCsbGrB0r7aysEYgcBY4OIYIS9WaCTwlSiTf4sd5zRlKquy0RM7CBPQKjOFwZYzQvuB2NSBcxKmx7jpwcYCktPCm1Nt6AUNVOSUOi+2fECuAkUbWIKm8Bz4jfdgQIlcCHX0P1spTsMqsCJSfixnfmlisZm9J9USTxrkrtnO3ajE5Y6xZnF4IrL8xva50uNqfdgunKhkwLMXpA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srWxu-0003pH-4W for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 02:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2024 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73172-submit@debbugs.gnu.org id=B73172.172681306014656 (code B ref 73172); Fri, 20 Sep 2024 06:18:02 +0000 Original-Received: (at 73172) by debbugs.gnu.org; 20 Sep 2024 06:17:40 +0000 Original-Received: from localhost ([127.0.0.1]:33893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srWxX-0003oJ-Hv for submit@debbugs.gnu.org; Fri, 20 Sep 2024 02:17:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srWxV-0003o1-FO for 73172@debbugs.gnu.org; Fri, 20 Sep 2024 02:17:38 -0400 Original-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 1srWx6-0004nJ-Pt; Fri, 20 Sep 2024 02:17:13 -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=uVHII5X2GP4wp0vqbuPofAjCXqIZl3IFGnX5CGljlPI=; b=gG9IOkbaBhMP SGlTWTjQcmO6/DHZKuXKE3Y9TYL/rA2Om3IbG93yTNx6rwgGqm9ltcU+wIBtMvWpqpTin8YrfFm// 3jvy23++o2OVO9ORCqHb+dMOwXGUjxCzReVMjW9bhCZmETrccBUzoUdTmUfQyR1dC/PaNg1bTAMsf xm8hoIdOL5X+Ppt2AIxt1jmjiWx0wpObTnyCEuv6cnQf6Fopzn6pC8035+7SnXJR2oQzRVRJehEtR h5oDF3NFCl1jXHoi52aPcookEKtrzKgxFlNcF5fQj0BkEiJpJ/vSxtv3zdPDVbRZAWFYr4bXq+tFw CrfT+k1jseU3hOkAqHvmbg==; In-Reply-To: (message from Dmitry Gutov on Thu, 19 Sep 2024 23:46:00 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292083 Archived-At: > Cc: Stefan Monnier , 73172@debbugs.gnu.org > Date: Thu, 19 Sep 2024 23:46:00 +0300 > From: Dmitry Gutov > > On 19/09/2024 21:41, Spencer Baugh wrote: > > >> and patch#2 seems good on balance. > >> > >> It does introduce some backward incompatibility in rare cases where I > >> have probably internalized the current behavior already -- for example > >> in the vc-print-root-log output pressing 'p' while on the first line > >> somewhere between the initial '*' and the end of the date dings with > >> "No previous log message", and how will move to bol. > >> > >> But it might be more consistent anyway, given that the there is no > >> ding already if you start out inside the summary text. > > > > Yes. It's definitely a change in behavior. > > > > But, if someone has internalized: > > > > diff-file-prev usually acts like "backward-sexp for files" (it moves > > point to the start of the current file), except that if point is in > > the header of the first file in the buffer then diff-file-prev does > > nothing instead. > > > > Then I think they'll be happy to be able to discard that knowledge > > in favor of: > > > > diff-file-prev always acts like "backward-sexp for files" (it moves > > point to the start of the current file). > > > > Especially because "does nothing in one weird corner case" is not useful > > or deliberate behavior (it's just a bug). > > Yeah, probably. > > It kind of indicated "no elements above" right away, which is a tad > meaningful, but indeed I struggle to produce a scenario where that would > make a big difference. Please be sure to document all behavior changes in NEWS, if you install such changes.