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#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted Date: Tue, 18 Jun 2024 17:46:10 +0300 Message-ID: <864j9qqpfx.fsf@gnu.org> References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7190"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 16:47:17 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 1sJa7B-0001h0-Bq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 16:47:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJa6v-0002sU-9f; Tue, 18 Jun 2024 10:47:01 -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 1sJa6t-0002sG-CI for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 10:46:59 -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 1sJa6t-0002K4-4Q for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 10:46:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJa6v-0008LK-Nx for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 10:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2024 14:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71466 X-GNU-PR-Package: emacs Original-Received: via spool by 71466-submit@debbugs.gnu.org id=B71466.171872198632028 (code B ref 71466); Tue, 18 Jun 2024 14:47:01 +0000 Original-Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 14:46:26 +0000 Original-Received: from localhost ([127.0.0.1]:43846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJa6M-0008KV-BX for submit@debbugs.gnu.org; Tue, 18 Jun 2024 10:46:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJa6K-0008KI-F9 for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 10:46:25 -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 1sJa6B-0002GN-QU; Tue, 18 Jun 2024 10:46:15 -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=Amiqdq+70fYJ/iFSwNRzAGXiZ6OBxeot6x3f0CrbaA8=; b=Gu6hRSBrLkzO aDmwlGz4Me49oY8koLchsxbf71JghWmrTaXDPZVUxIq/Ex+UjkplQl0aJ0LMAOLZLLZStPutviNZE w9HA43wDDV4da3DPa7u0JRH1iYS/FrZvy0u9QiMsDBk8MReHEof06ph+huaaRsJfJyQC34LR+OtS9 T60+WTN0F0qFNxblDhe1rv7eNKi9Q292OI7Y83ZmoZTh3C2v5CwhQiayFt1Etm/OoP5bb8dKBtDw/ Rz7O1KGdihqzx0/NUHldFbLq7H7rYRgsVpl5BqrYjSkp1S9ujnJrHDZ8/Ce8S87e3w6ZNhMU6Olqk aDxwxgR6dONIY0twQoeV7w==; In-Reply-To: (message from Eshel Yaron on Tue, 18 Jun 2024 16:01:40 +0200) 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:287442 Archived-At: > From: Eshel Yaron > Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net > Date: Tue, 18 Jun 2024 16:01:40 +0200 > > Eli Zaretskii writes: > > >> @item g > >> -@findex xref-revert-buffer > >> -Refresh the contents of the @file{*xref*} buffer > >> -(@code{xref-revert-buffer}). > >> +Refresh the contents of the @file{*xref*} buffer (@code{revert-buffer}). > >> +@xref{Reverting}. > > > > Why remove the index entry? It needs to be rewritten, not removed. > > The index entry is for xref-revert-buffer, which we're making obsolete > here in favor of revert-buffer, which has its own index entry elsewhere. > How do you suggest rewriting it instead? Like this: @cindex revert-buffer, in @file{*xref*} buffers And please move it before "@item g", so that following the index entry with 'i' in Info lands on the line showing `g', not the line after it. > >> -(defun xref-revert-buffer () > >> +(defun xref--revert-buffer (&rest _) ; Ignore `revert-buffer' args. > >> "Refresh the search results in the current buffer." > > > > And I wonder why you preferred a backward-incompatible change to a > > backward-compatible one: > > This is intended to be (basically) fully backward-compatible: > xref-revert-buffer becomes an alias of revert-buffer, which does exactly > what xref-revert-buffer would do. Yes, but why not leave xref-revert-buffer alone, under its original name? > > leave the function's name alone, and just set up > > revert-buffer-function to invoke it. Was this not possible for some > > technical reason that evades me? > > It's possible, and it's more or less what I suggested upthread, but > Dmitry correctly noted that this approach (using xref--revert-buffer) > improves backward-compatibility in the following sense: users that > currently invoke xref-revert-buffer not by pressing 'g', but in some > other way, can continue to do so and get the same behavior that now > revert-buffer provides when you press 'g'. Since revert-buffer does > more than just calling revert-buffer-function (namely, it also runs > revert-buffer-restore-functions), making xref-revert-buffer an alias of > revert-buffer ensures invoking and xref-revert-buffer and pressing 'g' > continues to behave the same. But the original xref-revert-buffer didn't do all those other things, did it? So invoking it directly will be more similar to what that did before.