From unknown Fri Jun 20 18:24:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71466 <71466@debbugs.gnu.org> To: bug#71466 <71466@debbugs.gnu.org> Subject: Status: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted Reply-To: bug#71466 <71466@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:24:08 +0000 retitle 71466 30.0.50; Buffer-menu-group-by non-nil resets point when Buffe= r List is reverted reassign 71466 emacs submitter 71466 Eshel Yaron severity 71466 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 10 06:25:36 2024 Received: (at submit) by debbugs.gnu.org; 10 Jun 2024 10:25:36 +0000 Received: from localhost ([127.0.0.1]:52644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGcDX-0000k3-8h for submit@debbugs.gnu.org; Mon, 10 Jun 2024 06:25:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:49832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGbGr-00065i-Dh for submit@debbugs.gnu.org; Mon, 10 Jun 2024 05:24:57 -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 1sGaiR-0000O0-Bk for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 04:49:23 -0400 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGaiQ-0005a7-0C for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 04:49:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718009360; bh=2hVxh/b1PywnEzJAZCqZFQCWopVoCNi7jzRMYgqjBLs=; h=From:To:Subject:Date:From; b=Vj34GUbekKXg7En0Sl66Zr4GEyxzOhCC3Zts9NUnVBaXGrlGuNZXjrMsXziDPP7H+ fAxhZz9lMdZrxhNzwo1KDKCmC0hH7weRa+6jfLNiybr9XTE/2OEOeJyqbfNu5P0Fcw rgf8RLI8rNIraLO0g/2mCOm2ax44UyIeTnBq5SS8rJ8qdfqblHgQ3EFC5rl3tokPzC d5Waq9jJ8NjSP+wvAcUOGu1MKFP32XcVbYBKN0sdf+UbS0Qmr1vWduu8E7RjIol7yk xgu/WCedBUA+U+83xZ1MQFD1886YiW7HBfPkUyDvXHEruIRB6lb7pAlDvPyUgP5jVi q+5U+p+HpUc8w== From: Eshel Yaron To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted X-Debbugs-Cc: Juri Linkov Date: Mon, 10 Jun 2024 10:49:18 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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.4 (--) Hi, I noticed a certain issue with the new Buffer-menu-group-by option: when grouping is enabled, reverting the Buffer List buffer may move point back to the beginning on the buffer. This is especially problematic when auto-revert-mode is involved. Consider: 1. emacs -Q 2. (setq global-auto-revert-non-file-buffers t) 3. M-x global-auto-revert-mode RET 4. (setq Buffer-menu-group-by '(Buffer-menu-group-by-mode)) 5. M-x list-buffers 6. Navigate to some heading in the Buffer List buffer, any heading besides the first. 7. Wait (or think) for 5 seconds. 8. Auto-revert kicks in and point moves back to the beginning of the buffer. Without grouping, reverting the Buffer List (manually or via global-auto-revert-mode) keeps point in place. Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 11 13:10:01 2024 Received: (at 71466) by debbugs.gnu.org; 11 Jun 2024 17:10:01 +0000 Received: from localhost ([127.0.0.1]:36179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH50S-0005so-P7 for submit@debbugs.gnu.org; Tue, 11 Jun 2024 13:10:01 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:46519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH50O-0005sD-7S for 71466@debbugs.gnu.org; Tue, 11 Jun 2024 13:09:56 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7603740003; Tue, 11 Jun 2024 17:09:31 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Eshel Yaron's message of "Mon, 10 Jun 2024 10:49:18 +0200") Organization: LINKOV.NET References: Date: Tue, 11 Jun 2024 20:05:51 +0300 Message-ID: <86tthzwgsw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org 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.7 (-) > I noticed a certain issue with the new Buffer-menu-group-by option: when > grouping is enabled, reverting the Buffer List buffer may move point > back to the beginning on the buffer. This is especially problematic > when auto-revert-mode is involved. Consider: > > 1. emacs -Q > 2. (setq global-auto-revert-non-file-buffers t) > 3. M-x global-auto-revert-mode RET > 4. (setq Buffer-menu-group-by '(Buffer-menu-group-by-mode)) > 5. M-x list-buffers > 6. Navigate to some heading in the Buffer List buffer, any heading > besides the first. > 7. Wait (or think) for 5 seconds. > 8. Auto-revert kicks in and point moves back to the beginning > of the buffer. Thanks for the request, this definitely should be improved. > Without grouping, reverting the Buffer List (manually or via > global-auto-revert-mode) keeps point in place. When point is on an entry, then 'tabulated-list-print' moves point to the entry with the same ID. However, what ID to prefer for outline heading lines is not quite clear. Possible variants: 1. The simplest way would be to remember the position of point or the line number. But this is not quite reliable when new entries are inserted before. 2. Remembering the outline heading line as a string and searching for it afterwards would be ambiguous when there are more headings with the same string. For example, when at the top level there are project names, and at the second level mode names repeated for every project. 3. To remember a complete path like outline-hidden-headings-paths does, e.g. '("Project1 name" "Mode2 name"). But this will not handle modes that don't use tabulated-list. For example, reverting an xref buffer with outlines now restores visibility of outlines, but doesn't restore point. OTOH, maybe it's not responsibility of outline-minor-mode to restore point when it's not on a heading line. 4. To remember some context before and after point, then after reverting search context with 'rear-context-string' and 'front-context-string'. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 02:36:23 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 06:36:23 +0000 Received: from localhost ([127.0.0.1]:59360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ5yZ-0008AO-18 for submit@debbugs.gnu.org; Mon, 17 Jun 2024 02:36:23 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:50355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ5yW-0008A8-MG for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 02:36:21 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 873EAFF805; Mon, 17 Jun 2024 06:35:51 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <86tthzwgsw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 11 Jun 2024 20:05:51 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> Date: Mon, 17 Jun 2024 09:35:11 +0300 Message-ID: <86msnkyt7c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Dmitry Gutov , 71466@debbugs.gnu.org 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.7 (-) --=-=-= Content-Type: text/plain > When point is on an entry, then 'tabulated-list-print' > moves point to the entry with the same ID. > > However, what ID to prefer for outline heading lines > is not quite clear. Possible variants: > > 1. The simplest way would be to remember the position of point > or the line number. But this is not quite reliable > when new entries are inserted before. > > 2. Remembering the outline heading line as a string and searching for it > afterwards would be ambiguous when there are more headings with the > same string. For example, when at the top level there are project names, > and at the second level mode names repeated for every project. > > 3. To remember a complete path like outline-hidden-headings-paths does, > e.g. '("Project1 name" "Mode2 name"). The third variant is implemented now. > But this will not handle modes that don't use tabulated-list. > For example, reverting an xref buffer with outlines now restores > visibility of outlines, but doesn't restore point. OTOH, maybe it's > not responsibility of outline-minor-mode to restore point when it's > not on a heading line. For xref I propose a separate patch that keeps point on the same line after reverting the xref buffer: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=xref-revert-buffer-restore-point.patch diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fb6c9dad73b..1ff02d3712a 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1017,7 +1017,9 @@ xref--xref-buffer-mode (lambda (&optional bound move backward looking-at) (outline-search-text-property 'xref-group nil bound move backward looking-at))) - (setq-local outline-level (lambda () 1))) + (setq-local outline-level (lambda () 1)) + (add-hook 'revert-buffer-restore-functions + #'xref-revert-buffer-restore-point nil t)) (defvar xref--transient-buffer-mode-map (let ((map (make-sparse-keymap))) @@ -1282,19 +1284,19 @@ xref-revert-buffer (when (boundp 'revert-buffer-restore-functions) (run-hook-wrapped 'revert-buffer-restore-functions (lambda (f) (push (funcall f) restore-functions) nil))) - (save-excursion - (condition-case err - (let ((alist (xref--analyze (funcall xref--fetcher))) - (inhibit-modification-hooks t)) - (erase-buffer) - (prog1 (xref--insert-xrefs alist) - (mapc #'funcall (delq nil restore-functions)))) - (user-error - (erase-buffer) - (insert - (propertize - (error-message-string err) - 'face 'error))))))) + (condition-case err + (let ((alist (xref--analyze (funcall xref--fetcher))) + (inhibit-modification-hooks t)) + (erase-buffer) + (prog1 (xref--insert-xrefs alist) + (goto-char (point-min)) + (mapc #'funcall (delq nil restore-functions)))) + (user-error + (erase-buffer) + (insert + (propertize + (error-message-string err) + 'face 'error)))))) (defun xref--auto-jump-first (buf value) (when value @@ -1309,6 +1311,13 @@ xref--auto-jump-first ((eq value 'move) (forward-line 1)))) +(defun xref-revert-buffer-restore-point () + (let ((current-line (buffer-substring-no-properties (pos-bol) (pos-eol)))) + (lambda () + (goto-char (point-min)) + (when (search-forward current-line) + (goto-char (pos-bol)))))) + (defun xref-show-definitions-buffer (fetcher alist) "Show the definitions list in a regular window. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 03:40:37 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 07:40:37 +0000 Received: from localhost ([127.0.0.1]:59468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ6yj-0001MK-Gr for submit@debbugs.gnu.org; Mon, 17 Jun 2024 03:40:37 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:42994 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ6yh-0001MA-Vl for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 03:40:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718610033; bh=0J8WmSeDzlz0zM+c9NgCTE8bWXSjYPoTDlfCKOkzXCk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NTHbrcYzMQuXw+oROtS1YGebBA9d9kyXnelzBvtE1Xlg3FpWNVuXr8MxWiRPvJsyi 4RbJRRWAGND+g0qSKuE332MUuyxVxOdexJHW8y0lSYSvIP4xaasc5saLX9eUrHtbuY vCB8iuqUKwrl+8QxGjvpeQ1i/lHN5WTG0rTK3DYNppEfLpMRTJ8OfmmsuOxDCpXZMH Mg806TF2BeOn6buNWUcQxN9MHJUomZAvv75Bnl8Gt2TQNniAoF9v02G8SJQEvAHEAb cc8/p+cwqtxRo9Zc9AGYfiHrmV84QrbVPBIXxaEDTqnjmjWIGFHDaL+nuxp4yR/1hK 3Qz0rXPD9r1tg== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <86msnkyt7c.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 17 Jun 2024 09:35:11 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> Date: Mon, 17 Jun 2024 09:40:30 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: Dmitry Gutov , 71466@debbugs.gnu.org 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.0 (-) Hi Juri, Juri Linkov writes: >> When point is on an entry, then 'tabulated-list-print' >> moves point to the entry with the same ID. >> >> However, what ID to prefer for outline heading lines >> is not quite clear. Possible variants: >> >> 1. The simplest way would be to remember the position of point >> or the line number. But this is not quite reliable >> when new entries are inserted before. >> >> 2. Remembering the outline heading line as a string and searching for it >> afterwards would be ambiguous when there are more headings with the >> same string. For example, when at the top level there are project names, >> and at the second level mode names repeated for every project. >> >> 3. To remember a complete path like outline-hidden-headings-paths does, >> e.g. '("Project1 name" "Mode2 name"). > > The third variant is implemented now. Works like a charm here, thank you! >> But this will not handle modes that don't use tabulated-list. >> For example, reverting an xref buffer with outlines now restores >> visibility of outlines, but doesn't restore point. OTOH, maybe it's >> not responsibility of outline-minor-mode to restore point when it's >> not on a heading line. > > For xref I propose a separate patch that keeps point on the same line > after reverting the xref buffer: LGTM, but FWIW the situation with xref-revert-buffer is not ideal IMO: it might be cleaner to leave 'g' bound to the usual revert-buffer and set revert-buffer-function to (a slightly modified) xref-revert-buffer. That way xref-revert-buffer wouldn't need to duplicate generic parts of revert-buffer, such as running revert-buffer-restore-functions. WDYT? Eshel From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 08:28:06 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 12:28:06 +0000 Received: from localhost ([127.0.0.1]:33071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJBSv-0003nu-Ih for submit@debbugs.gnu.org; Mon, 17 Jun 2024 08:28:06 -0400 Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]:53493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJBSn-0003lW-JA for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 08:27:58 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 38799114009A; Mon, 17 Jun 2024 08:27:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 Jun 2024 08:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718627269; x=1718713669; bh=ZdyoEHlPG2KjtAz5r032Zjro30DFVKbsuDmKgJ60b24=; b= DsyQn1S1mxXsnU+R5QCcKSkeZPaSKQvNSU4DTvuPzpIiwfAQ82uZJpNqwpLwye3d B/HZVy57afya1ew08kVvIGpxxQNucvCywB5FMz4Wuq41REjDLQ3ZUPfK1od60jZd oDRLEOYFNoaedeCLdeNUUF7DA+6eIRTLR3NnqPsiHNO1zEizxG9IKlfwl7jPDEmC mYbu5B7tRCWBtKn81A4K7E0PxRGRa1fcZk2E2nnnKCPmsc+Z+9BuhkVnjNDkF9gD xGwypapOcjroZmrQoYs4ywSJuvUP1XOBx8WeXtT3NzWOxwiWBEH6MehjUHUfaJ99 037B5Oi+Usi4jSyqaBEnsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718627269; x= 1718713669; bh=ZdyoEHlPG2KjtAz5r032Zjro30DFVKbsuDmKgJ60b24=; b=i KXeG/0xHriWoiyoIm6L9HVqewWcLI6UE7Xs3yNnXN+09AR2J2bk4ncTZX9/IS1V6 7lNaIfp/rwEhBypvUjot1+xS5ZtNqyyhy+CnRpevXJ7kq0Pvftaymkuv2aH5lPfj IEbwDXRafbemoGuOA+QnX9cEaPoi6MF4fH69eY+c6+tCpXF3/3Uy/NdPyIFZu+vQ fAuzNkCut7GzeyaHj4rmojh9beENjlohgI5us/6GLwX8l4Wh60X96R+jqSyJPOcl VpVt6mZg8GnNCVhmV5ttMB5oD8RlzN3lbOSf2i0//h4SXsUzCaW+hMSxnKOkqDZK SlAdMm9X2k/q8cLUgqsRw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvhedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jun 2024 08:27:47 -0400 (EDT) Message-ID: <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> Date: Mon, 17 Jun 2024 15:27:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eshel Yaron , Juri Linkov References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org 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.7 (-) On 17/06/2024 10:40, Eshel Yaron wrote: >>> But this will not handle modes that don't use tabulated-list. >>> For example, reverting an xref buffer with outlines now restores >>> visibility of outlines, but doesn't restore point. OTOH, maybe it's >>> not responsibility of outline-minor-mode to restore point when it's >>> not on a heading line. >> For xref I propose a separate patch that keeps point on the same line >> after reverting the xref buffer: > LGTM, but FWIW the situation with xref-revert-buffer is not ideal IMO: > it might be cleaner to leave 'g' bound to the usual revert-buffer and > set revert-buffer-function to (a slightly modified) xref-revert-buffer. > That way xref-revert-buffer wouldn't need to duplicate generic parts of > revert-buffer, such as running revert-buffer-restore-functions. WDYT? I'm okay with that. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 08:32:26 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 12:32:27 +0000 Received: from localhost ([127.0.0.1]:33135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJBX8-0003xW-JV for submit@debbugs.gnu.org; Mon, 17 Jun 2024 08:32:26 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:40581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJBX6-0003xF-1O for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 08:32:24 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id D767A13800F4; Mon, 17 Jun 2024 08:32:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 17 Jun 2024 08:32:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718627536; x=1718713936; bh=cIzhi3jhgM7LLUZ1CE65uaEty79s3MjO0yklFuzgKFo=; b= Ojs+GB9lI7Re+x9+2kf1TIYnM1rOy506wby3wnmqRs4UH1fOjbT+Hi4IV0X38KRc 3/nuI4Pgsolv04asR51VkoyHn12YskAUo41rIMUpshNDqz9RRwIE0RFJAa9QPDFg v259vUwuAejxo9yPMLR2JbD+fmtVdozG+8Ofx1f/kR8xZnAlWO29L0Rg/zcNw3WZ I07puIace6IvPFjoDQ9/G4IcrL18HnCuFUu1pkQb9MTkp7MV2nOigb3DbZgD+UvE WSklJdZ9ULO4TQymXuQdlRcKQ6W87bbBPXPczedWNfS/82Ill55MgJ9l8uqEDpgg mfB6q6npcuVdZqqh8cPjUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718627536; x= 1718713936; bh=cIzhi3jhgM7LLUZ1CE65uaEty79s3MjO0yklFuzgKFo=; b=F RF7S7AMN9rBsxr8Zn+rk0iWZHCz35Hem5PFt0RXXvlNv6F/aZP7V0zLDv4jJ5Kgw PyUlbi0NzEQ82W+IAVuQx3uf/zC14vaIkxts03RBZW+/zuKzz0o6c4NQMCkzAHAt lNjXw49IWU/nT91uLoCaSIt6tRfcm3Li+yKRS/0zygQPzgKZH3pEOTumHtaQFVmu Gxeon1ZNO/BhRuZ6A+LmWOsy/8STZ5PIP+bzYqp8QpgxYZPRkB+DohIQyMnoKbjK 2MFRuUlAdgyJZ6PvfE861L2AWxIo3w4xFJ2pELDgJTKZ1xjw48Dk4TQ3f4RCJPB8 C2N3EhzFRqsEEN3KVDOkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvhedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jun 2024 08:32:15 -0400 (EDT) Message-ID: Date: Mon, 17 Jun 2024 15:32:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Juri Linkov , Eshel Yaron References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86msnkyt7c.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org 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.7 (-) On 17/06/2024 09:35, Juri Linkov wrote: > +(defun xref-revert-buffer-restore-point () > + (let ((current-line (buffer-substring-no-properties (pos-bol) (pos-eol)))) > + (lambda () > + (goto-char (point-min)) > + (when (search-forward current-line) > + (goto-char (pos-bol)))))) Perhaps it would make sense to save the current group as well, for additional precision. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 11:43:56 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 15:43:56 +0000 Received: from localhost ([127.0.0.1]:35149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJEWS-0001AY-2W for submit@debbugs.gnu.org; Mon, 17 Jun 2024 11:43:56 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:47870 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJEWP-0001AQ-QB for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 11:43:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718639031; bh=fbZjEmualFczSVI1Uj4XzFWH1HSKEC9F2HLuMn6uBKo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RDrMPFnSNu+KhP/m7kW8o37VRWQYTL3/WPAvdExBeachllI66yB3/IXQs6uMFR7+s wYKuvBF0krnFLCyxexq3JqdVwO+hR0g+cJElRfm2INUUZavrJ+yqX7sfpvOSHHzHrd 187LahS3qGFxfVhJWkrWqQHvg1n4Q50I3+jOFF6EEC9pSgeqGthN9MD+Ws4tn3jhyd Bpg2RrQI4Mw/rwbLCNMEcCXUD2InCT1SXIxmEn0AggYmbLOl9FVyJ25ICy6gKu2iNp P0x8XzzX8udS2mwrJxrWG05Wl4lQvHbIpsz6Ntcp81CF2Z4e0Le52UJqpj5dGsdZfj s03VTGn+oMtAA== From: Eshel Yaron To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> (Dmitry Gutov's message of "Mon, 17 Jun 2024 15:27:45 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> Date: Mon, 17 Jun 2024 17:43:48 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Juri Linkov 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.0 (-) Dmitry Gutov writes: > On 17/06/2024 10:40, Eshel Yaron wrote: >>>> But this will not handle modes that don't use tabulated-list. >>>> For example, reverting an xref buffer with outlines now restores >>>> visibility of outlines, but doesn't restore point. OTOH, maybe it's >>>> not responsibility of outline-minor-mode to restore point when it's >>>> not on a heading line. >>> For xref I propose a separate patch that keeps point on the same line >>> after reverting the xref buffer: >> LGTM, but FWIW the situation with xref-revert-buffer is not ideal IMO: >> it might be cleaner to leave 'g' bound to the usual revert-buffer and >> set revert-buffer-function to (a slightly modified) xref-revert-buffer. >> That way xref-revert-buffer wouldn't need to duplicate generic parts of >> revert-buffer, such as running revert-buffer-restore-functions. WDYT? > > I'm okay with that. Here's a concrete proposal: diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fb6c9dad73b..9878806c0de 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -993,7 +993,6 @@ xref--xref-buffer-mode-map ;; suggested by Johan Claesson "to further reduce finger movement": (define-key map (kbd ".") #'xref-next-line) (define-key map (kbd ",") #'xref-prev-line) - (define-key map (kbd "g") #'xref-revert-buffer) (define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack) map)) @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode #'xref--imenu-extract-index-name) (setq-local add-log-current-defun-function #'xref--add-log-current-defun) + (setq-local revert-buffer-function #'xref-revert-buffer) (setq-local outline-minor-mode-cycle t) (setq-local outline-minor-mode-use-buttons 'insert) (setq-local outline-search-function @@ -1273,22 +1273,17 @@ xref--show-common-initialize xref--original-window-intent (assoc-default 'display-action alist)) (setq xref--fetcher fetcher))) -(defun xref-revert-buffer () +(defun xref-revert-buffer (&rest _) ; Ignore `revert-buffer' args. "Refresh the search results in the current buffer." (interactive) (let ((inhibit-read-only t) - (buffer-undo-list t) - restore-functions) - (when (boundp 'revert-buffer-restore-functions) - (run-hook-wrapped 'revert-buffer-restore-functions - (lambda (f) (push (funcall f) restore-functions) nil))) + (buffer-undo-list t)) (save-excursion (condition-case err (let ((alist (xref--analyze (funcall xref--fetcher))) (inhibit-modification-hooks t)) (erase-buffer) - (prog1 (xref--insert-xrefs alist) - (mapc #'funcall (delq nil restore-functions)))) + (xref--insert-xrefs alist)) (user-error (erase-buffer) (insert From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 12:34:49 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 16:34:49 +0000 Received: from localhost ([127.0.0.1]:35235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJFJg-0002Xy-OG for submit@debbugs.gnu.org; Mon, 17 Jun 2024 12:34:49 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:56239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJFJf-0002Xm-Jl for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 12:34:48 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id B505140005; Mon, 17 Jun 2024 16:34:15 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Dmitry Gutov's message of "Mon, 17 Jun 2024 15:32:14 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> Date: Mon, 17 Jun 2024 19:31:01 +0300 Message-ID: <86wmmny1iy.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Eshel Yaron 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.7 (-) --=-=-= Content-Type: text/plain >> +(defun xref-revert-buffer-restore-point () >> + (let ((current-line (buffer-substring-no-properties (pos-bol) (pos-eol)))) >> + (lambda () >> + (goto-char (point-min)) >> + (when (search-forward current-line) >> + (goto-char (pos-bol)))))) > > Perhaps it would make sense to save the current group as well, for > additional precision. Ok, so this is implemented here: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=xref-revert-buffer-restore-point_2.patch diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fb6c9dad73b..987571b92c5 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1017,7 +1017,9 @@ xref--xref-buffer-mode (lambda (&optional bound move backward looking-at) (outline-search-text-property 'xref-group nil bound move backward looking-at))) - (setq-local outline-level (lambda () 1))) + (setq-local outline-level (lambda () 1)) + (add-hook 'revert-buffer-restore-functions + #'xref-revert-buffer-restore-point nil t)) (defvar xref--transient-buffer-mode-map (let ((map (make-sparse-keymap))) @@ -1309,6 +1311,24 @@ xref--auto-jump-first ((eq value 'move) (forward-line 1)))) +(defun xref-revert-buffer-restore-point () + (let* ((item + (when (xref--item-at-point) + (buffer-substring-no-properties (pos-bol) (pos-eol)))) + (group + (save-excursion + (when (or (get-text-property (point) 'xref-group) + (and item (xref--search-property 'xref-group t) + (get-text-property (point) 'xref-group))) + (buffer-substring-no-properties (pos-bol) (pos-eol)))))) + (when (or item group) + (lambda () + (goto-char (point-min)) + (when (and group (search-forward (concat "\n" group "\n") nil t)) + (goto-char (pos-bol 0))) + (when (and item (search-forward (concat "\n" item "\n") nil t)) + (goto-char (pos-bol 0))))))) + (defun xref-show-definitions-buffer (fetcher alist) "Show the definitions list in a regular window. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 18:16:47 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 22:16:47 +0000 Received: from localhost ([127.0.0.1]:38217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJKed-0006ao-3e for submit@debbugs.gnu.org; Mon, 17 Jun 2024 18:16:47 -0400 Received: from wfout5-smtp.messagingengine.com ([64.147.123.148]:39517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJKea-0006aZ-6y for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 18:16:45 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.west.internal (Postfix) with ESMTP id EC7881C0007C; Mon, 17 Jun 2024 18:16:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 Jun 2024 18:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718662594; x=1718748994; bh=gjKn6viUg7KHA1hA7pFxsn/dBS78WL7O2WKnbAWWgEA=; b= MvQmQDxoG1fl7MUiQnygZShyEAeLv6Bm9AVhcBVHPPf9StSkm9uYnbyv2e4YCxs/ LtNPUxlBVSHNLifLZ2XOM2ZxRRj2ZOixVXyjrTOo+SxM4xhLel8u+LKloc7Q6zjk 6tZGKH3PtWn/DelnLru5TkHjMG/d964EzOXNsPVSORjDk5LnehJ/eoQ49haGsT2k g7etZKRH4mKj+/qPhMuNt+tlk6uFyKomQE5lRhHnwFEk6Iof3ga3TFd695VlYGYg bxTLhiQnskmbgsCjZHLD7t4pDt1DBMzcIkRJN6CBqMQ3GBwXRIjZCS9UDsoEV7jW 9aX1g+zlgd5HyM7FjvbjGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718662594; x= 1718748994; bh=gjKn6viUg7KHA1hA7pFxsn/dBS78WL7O2WKnbAWWgEA=; b=O 25Zgq9zsbCZl8BmKpfBv5wk3pMgkWydIDM8VebtKo4oE3EoelKB5rie2w44eE2BQ wAJvSZ7z71U5vKsPYxR4BrjqmBM86Qe1Iij/aAdJqlqx1b+7aVKQS0j/JtLTmR02 XeL0Y/tN4euiZKCCrdqsloPJls/+tVTNsPqlCURSHnvlhYsL2kck6XyA37t2sx7V 4uDQ6F2V2oVrC24v76toKdlVts9O/IOxnQGei3LMQgy34O2X81cQ/t4vETDkbN5l tKdAc8q9RNR1Gv6XS4vqjVnwKBsY4BX1bYHP1RSQC8u4WpvfTJPV+CZytHSlqgYb OMNfRA6wZMQR2gfEjLykA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedviedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jun 2024 18:16:33 -0400 (EDT) Message-ID: Date: Tue, 18 Jun 2024 01:16:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Juri Linkov References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <86wmmny1iy.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86wmmny1iy.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Eshel Yaron 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.7 (-) On 17/06/2024 19:31, Juri Linkov wrote: > Ok, so this is implemented here: LGTM, thanks! From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 18:24:41 2024 Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 22:24:41 +0000 Received: from localhost ([127.0.0.1]:38247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJKmG-0006ow-Le for submit@debbugs.gnu.org; Mon, 17 Jun 2024 18:24:41 -0400 Received: from wfhigh6-smtp.messagingengine.com ([64.147.123.157]:59625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJKmD-0006oc-O0 for 71466@debbugs.gnu.org; Mon, 17 Jun 2024 18:24:38 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 9743118000B1; Mon, 17 Jun 2024 18:24:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 17 Jun 2024 18:24:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718663069; x=1718749469; bh=9cp5iTMvAxMkLT+yl5dCohbuAlKE08t/yk1+bVn8hRE=; b= gtesx1CHJvFoiSxa3f3UtsYV8367ZW2JGk6TLCJ1iwCEKCqnBE4pSoKLnJX/f8AE xZU9kfxeOZsP15rn94JVFBK91ffh4cyqqEnZGvoCSdGSBjt7eCpWK/RWOlIzwhhl Z8noaE9Xrb3FHfk2Hji8D2uPIt7BqokzB8iqhjRAmrQQHNZUU7XeSSrDZBCyEALp +ifIVyLBgXPqEvvIZFU7eCnXagj5h+aipNuJil9ptBo/cE+h9cTJfC2+L6YgGyhv 7qfZCFp/YDrV6YoUzT6SnlTvOCGin3hMHCIYp3DFcvy+S7M5wywg634mJtWckDo+ 8RvtpdRaK+w6BstdqQGCeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718663069; x= 1718749469; bh=9cp5iTMvAxMkLT+yl5dCohbuAlKE08t/yk1+bVn8hRE=; b=J i6GEpMRfNoUQ8sjNxP06qqUvx6YMi1us4fSZWjnv9VZt6x3nFmYG4PidHXtkO4YK 0+vInSXIJFfLSFHSHhsf3Uw01P479j7cDPS3pEG/DIN3BFVUx+/XIU0aXBBhm3AT 5jQYzvwBNXNXHhm2bLThwwTYFp2FDcNHCr2uE5fnb3OGWAoSX4V/ttR0cvoDr6B3 JDoqUjLhyHhcQg0p7iNz5mrbaV5gbool7HpvUsJeGvG4tHHDvNeNHuI5A7fOiPNZ p5kJTqqH+5z4v6Nw3CdSlmISddjZN/5iyVlw6ZEFOENv/XP59eTQzeOwBqstjXqU A+x6qNC64+HBY7rXupUaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedviedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jun 2024 18:24:27 -0400 (EDT) Message-ID: Date: Tue, 18 Jun 2024 01:24:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eshel Yaron References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Juri Linkov 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.7 (-) On 17/06/2024 18:43, Eshel Yaron wrote: > Dmitry Gutov writes: > >> On 17/06/2024 10:40, Eshel Yaron wrote: >>>>> But this will not handle modes that don't use tabulated-list. >>>>> For example, reverting an xref buffer with outlines now restores >>>>> visibility of outlines, but doesn't restore point. OTOH, maybe it's >>>>> not responsibility of outline-minor-mode to restore point when it's >>>>> not on a heading line. >>>> For xref I propose a separate patch that keeps point on the same line >>>> after reverting the xref buffer: >>> LGTM, but FWIW the situation with xref-revert-buffer is not ideal IMO: >>> it might be cleaner to leave 'g' bound to the usual revert-buffer and >>> set revert-buffer-function to (a slightly modified) xref-revert-buffer. >>> That way xref-revert-buffer wouldn't need to duplicate generic parts of >>> revert-buffer, such as running revert-buffer-restore-functions. WDYT? >> >> I'm okay with that. > > Here's a concrete proposal: Thanks, works for me, with some caveats. > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index fb6c9dad73b..9878806c0de 100644 > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -993,7 +993,6 @@ xref--xref-buffer-mode-map > ;; suggested by Johan Claesson "to further reduce finger movement": > (define-key map (kbd ".") #'xref-next-line) > (define-key map (kbd ",") #'xref-prev-line) > - (define-key map (kbd "g") #'xref-revert-buffer) > (define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack) > map)) > > @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode > #'xref--imenu-extract-index-name) > (setq-local add-log-current-defun-function > #'xref--add-log-current-defun) > + (setq-local revert-buffer-function #'xref-revert-buffer) > (setq-local outline-minor-mode-cycle t) > (setq-local outline-minor-mode-use-buttons 'insert) > (setq-local outline-search-function > @@ -1273,22 +1273,17 @@ xref--show-common-initialize > xref--original-window-intent (assoc-default 'display-action alist)) > (setq xref--fetcher fetcher))) > > -(defun xref-revert-buffer () > +(defun xref-revert-buffer (&rest _) ; Ignore `revert-buffer' args. > "Refresh the search results in the current buffer." > (interactive) It seems like the interactive use of 'xref-revert-buffer' would suffer with this change (it wouldn't call the restore functions). And it might be used where people rebind it to a different key in their configs. Perhaps instead xref-revert-buffer should become an obsolete alias to 'revert-buffer'. And the current definition would be renamed to xref--revert-buffer (which we'll set revert-buffer-function to). From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 03:00:47 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 07:00:47 +0000 Received: from localhost ([127.0.0.1]:41049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJSpi-0006qC-JT for submit@debbugs.gnu.org; Tue, 18 Jun 2024 03:00:47 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:50822 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJSpg-0006q4-Pc for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 03:00:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718694041; bh=qRhf00TFAhE6FoK4uIp1LUFjzZ/Bc8ZdupBcCLogjjc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AZo4ooViOqverMl2jc29cLa/HRdL5TvMUEzkjM0e0wxAmlg/KB6VcVAzabRjN8PfW VmtPSpjwx6I/M+Uoomu1PWvUfcfLfcD2sg3AN6BxPtL8h+lrfI37oCg0smLcAkm4Oo UiLiGNFqaV0AayEVMiUNGBsMuHnXkdJ1UFc84Sm5ziU4ZfPG0pBT2jEDODGNIU0KuP 8PLfOOovkFXi6i4OMScq4vTdcF22/C1LMuBuV6g9GtTkRpslrmt1dC3+qhj5H10ioe C500yhGaP6w8Pw9eSGYQm/5WeXIvpZx8BM6w3TIKIrZliLZWUfSSSU2RYEJmZs0h0p g9lFdzYAEIUiA== From: Eshel Yaron To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Dmitry Gutov's message of "Tue, 18 Jun 2024 01:24:26 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> Date: Tue, 18 Jun 2024 09:00:38 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Juri Linkov 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.0 (-) Dmitry Gutov writes: > On 17/06/2024 18:43, Eshel Yaron wrote: >> Dmitry Gutov writes: >> >>> On 17/06/2024 10:40, Eshel Yaron wrote: >>>>>> But this will not handle modes that don't use tabulated-list. >>>>>> For example, reverting an xref buffer with outlines now restores >>>>>> visibility of outlines, but doesn't restore point. OTOH, maybe it's >>>>>> not responsibility of outline-minor-mode to restore point when it's >>>>>> not on a heading line. >>>>> For xref I propose a separate patch that keeps point on the same line >>>>> after reverting the xref buffer: >>>> LGTM, but FWIW the situation with xref-revert-buffer is not ideal IMO: >>>> it might be cleaner to leave 'g' bound to the usual revert-buffer and >>>> set revert-buffer-function to (a slightly modified) xref-revert-buffer. >>>> That way xref-revert-buffer wouldn't need to duplicate generic parts of >>>> revert-buffer, such as running revert-buffer-restore-functions. WDYT? >>> >>> I'm okay with that. >> Here's a concrete proposal: > > Thanks, works for me, with some caveats. > >> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el >> [...] > > It seems like the interactive use of 'xref-revert-buffer' would suffer > with this change (it wouldn't call the restore functions). And it > might be used where people rebind it to a different key in their > configs. Right, good point. > Perhaps instead xref-revert-buffer should become an obsolete alias to > 'revert-buffer'. And the current definition would be renamed to > xref--revert-buffer (which we'll set revert-buffer-function to). SGTM, here's an updated diff, also with a NEWS entry and doc updates: diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 3a9bef9884a..3e5f3831260 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2467,9 +2467,8 @@ Xref Commands all the relevant files. @xref{Identifier Search}. @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}. @item M-, @findex xref-quit-and-pop-marker-stack diff --git a/etc/NEWS b/etc/NEWS index b2fdbc4a88f..b5dcd87e005 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1895,6 +1895,13 @@ options of GNU 'ls'. If non-nil, moving point forward or backward between widgets by typing 'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil. +** Xref + +*** 'xref-revert-buffer' is obsolete, prefer 'revert-buffer' instead. +The former is now an alias of the latter. The Xref results buffer sets +up 'revert-buffer-function' such that 'revert-buffer' behaves like +'xref-revert-buffer' did in previous Emacs versions. + ** Ruby mode *** New user option 'ruby-rubocop-use-bundler'. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fb6c9dad73b..37f5220cec3 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -993,7 +993,6 @@ xref--xref-buffer-mode-map ;; suggested by Johan Claesson "to further reduce finger movement": (define-key map (kbd ".") #'xref-next-line) (define-key map (kbd ",") #'xref-prev-line) - (define-key map (kbd "g") #'xref-revert-buffer) (define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack) map)) @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode #'xref--imenu-extract-index-name) (setq-local add-log-current-defun-function #'xref--add-log-current-defun) + (setq-local revert-buffer-function #'xref--revert-buffer) (setq-local outline-minor-mode-cycle t) (setq-local outline-minor-mode-use-buttons 'insert) (setq-local outline-search-function @@ -1273,22 +1273,16 @@ xref--show-common-initialize xref--original-window-intent (assoc-default 'display-action alist)) (setq xref--fetcher fetcher))) -(defun xref-revert-buffer () +(defun xref--revert-buffer (&rest _) ; Ignore `revert-buffer' args. "Refresh the search results in the current buffer." - (interactive) (let ((inhibit-read-only t) - (buffer-undo-list t) - restore-functions) - (when (boundp 'revert-buffer-restore-functions) - (run-hook-wrapped 'revert-buffer-restore-functions - (lambda (f) (push (funcall f) restore-functions) nil))) + (buffer-undo-list t)) (save-excursion (condition-case err (let ((alist (xref--analyze (funcall xref--fetcher))) (inhibit-modification-hooks t)) (erase-buffer) - (prog1 (xref--insert-xrefs alist) - (mapc #'funcall (delq nil restore-functions)))) + (xref--insert-xrefs alist)) (user-error (erase-buffer) (insert @@ -1296,6 +1290,8 @@ xref-revert-buffer (error-message-string err) 'face 'error))))))) +(define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1") + (defun xref--auto-jump-first (buf value) (when value (select-window (get-buffer-window buf)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 08:59:01 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 12:59:01 +0000 Received: from localhost ([127.0.0.1]:42217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYQO-0002Fz-Q1 for submit@debbugs.gnu.org; Tue, 18 Jun 2024 08:59:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYQM-0002Fk-W4 for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 08:58:59 -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 1sJYQE-0007YC-F2; Tue, 18 Jun 2024 08:58:50 -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=abnIigZS1crQS6qQxp8GC4kFiL8JAksIZvN/iSM3HtE=; b=lVkibdddQDa4 g2MffxvVJrnWp2jQtsKS9PjX4y3VKHdNl9LNfpnmMe9m7qMe5xI49C4W45FmkoZMheVT0RrBzt4zm BUrQIlW+3aVV5DC6fje+kJO6imp3/etzNiM0VSilFPl58UymfwocO3387vZI5i3UIc8bhqXUMi3gu qDum+R3Uyo+FdLRFcq0R7SdVMVotPXWvaaXqaRHo3SmnbLcdVwiIYrI0qFaxUkhBeR07JIsjUTVcd FHLGuz+PTYP3li1Ahg9ROCZWCDP01xCOAc2m9phgM+Wsv9n5ySxeaa+pHjJz0MENM5SeOOELPm73U RJ056eUag55TUT+kAa1fTQ==; Date: Tue, 18 Jun 2024 15:58:45 +0300 Message-Id: <867cemquey.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.3 (---) > Cc: 71466@debbugs.gnu.org, Juri Linkov > Date: Tue, 18 Jun 2024 09:00:38 +0200 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > @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. > +** Xref > + > +*** 'xref-revert-buffer' is obsolete, prefer 'revert-buffer' instead. > +The former is now an alias of the latter. The Xref results buffer sets Please use "The Xref buffer". "The Xref results buffer" reads awkwardly, and there actually is no such thing as "Xref results". > @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode > #'xref--imenu-extract-index-name) > (setq-local add-log-current-defun-function > #'xref--add-log-current-defun) > + (setq-local revert-buffer-function #'xref--revert-buffer) > (setq-local outline-minor-mode-cycle t) > (setq-local outline-minor-mode-use-buttons 'insert) > (setq-local outline-search-function > @@ -1273,22 +1273,16 @@ xref--show-common-initialize > xref--original-window-intent (assoc-default 'display-action alist)) > (setq xref--fetcher fetcher))) > > -(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: 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? From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 10:01:53 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 14:01:53 +0000 Received: from localhost ([127.0.0.1]:43805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJZPE-0004LC-L5 for submit@debbugs.gnu.org; Tue, 18 Jun 2024 10:01:53 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:36408 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJZP8-0004Kz-W6 for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 10:01:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718719303; bh=1K1bMb/BnMtwgZsKUxni43JDuAuP77I6s30Cqg5XHJE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=E6z4OoH/DX5KJaidy8hVTJOIttpypuvUSDSZScy1zf15tPfzRFnfl+fBOnGahc3qL S7VtKrlGCezZBXAhL+y5pPXPjbgtUNYop9NnlOAdQKA+2lc0BuP67QFuUPhKrGFQ+C NIH+fZVBUfD44O70W4vwd3VjKoUyhHNUSjisMXPwHqgVu1OnslxGA4fJkuy98R+0LK 7uFUC52KQFV+gccdKLmSVsIxIrW+MRnZSUj7+XRnhRPh08hYx3sImZOyFD+cb6aSAx tOmgYsv8XP0DaDMPrvp676FZOjq+TBhY9nbniN9tjacKEUDO5mkWv4uGBiljySagHx mNd//MooSaFFQ== From: Eshel Yaron To: Eli Zaretskii Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <867cemquey.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Jun 2024 15:58:45 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> Date: Tue, 18 Jun 2024 16:01:40 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.0 (-) Hi Eli, Eli Zaretskii writes: >> Cc: 71466@debbugs.gnu.org, Juri Linkov >> Date: Tue, 18 Jun 2024 09:00:38 +0200 >> From: Eshel Yaron via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> @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? >> +** Xref >> + >> +*** 'xref-revert-buffer' is obsolete, prefer 'revert-buffer' instead. >> +The former is now an alias of the latter. The Xref results buffer sets > > Please use "The Xref buffer". "The Xref results buffer" reads > awkwardly, and there actually is no such thing as "Xref results". All right, will do. >> @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode >> #'xref--imenu-extract-index-name) >> (setq-local add-log-current-defun-function >> #'xref--add-log-current-defun) >> + (setq-local revert-buffer-function #'xref--revert-buffer) >> (setq-local outline-minor-mode-cycle t) >> (setq-local outline-minor-mode-use-buttons 'insert) >> (setq-local outline-search-function >> @@ -1273,22 +1273,16 @@ xref--show-common-initialize >> xref--original-window-intent (assoc-default 'display-action alist)) >> (setq xref--fetcher fetcher))) >> >> -(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. > 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. Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 10:46:26 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 14:46:26 +0000 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 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 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==; Date: Tue, 18 Jun 2024 17:46:10 +0300 Message-Id: <864j9qqpfx.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron In-Reply-To: (message from Eshel Yaron on Tue, 18 Jun 2024 16:01:40 +0200) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 12:55:55 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 16:55:55 +0000 Received: from localhost ([127.0.0.1]:45658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJc7e-0006Qb-U8 for submit@debbugs.gnu.org; Tue, 18 Jun 2024 12:55:55 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:47354 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJc7c-0006QP-3D for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 12:55:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718729748; bh=CQAAEzetNin4UEw+LTS9GDewWXB7eW4FoegtK97oZXQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=v8VGGyaFNeKaqjkFyVoNjGOK+5Stn9l6mSbRB5K6SVa69DIRT/HZh4p3fKNU1oHT2 pwQY3F3vNpG/Cfa6TKe0sWN6osUkX8r+EytMsxtHN9mrw+aNT9nA7mGvwvaHv0z3YN lenAkFkcWe48T7KbSFA2I0OlYevluIdik2EauiLjkk5+DpgPg4HRneW3u5vZllDGM+ S2XpKIlR8Z/ZabNZ6TGQBsXg2sY/fJ2z0LkB365/yX4dvyArhSkJvCuaiULi6Cy1FU U4MvGE+Dc0t4G+Q30S6bJZVKa7bKdkUHu6dTosX4x3fnSo//pxiTAW3YRrNs/tqD62 zh0ufZyPgaRDw== From: Eshel Yaron To: Eli Zaretskii Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <864j9qqpfx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Jun 2024 17:46:10 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> Date: Tue, 18 Jun 2024 18:55:46 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.0 (-) Eli Zaretskii writes: >> 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. OK, thanks. >> >> -(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? See below. >> > 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. That's right, but revert-buffer-restore-functions makes revert-buffer more correct because it also restores outline-minor-mode state. So making xref-revert-buffer an alias of revert-buffer brings this benefit to users that invoke xref-revert-buffer directly, without duplicating any revert-buffer code in xref-revert-buffer. Anyway, I trust you and Dmitry to decide on the preferred solution, let me know I'll and post a final patch accordingly. Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 13:05:29 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 17:05:29 +0000 Received: from localhost ([127.0.0.1]:45913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcGv-0006kN-4s for submit@debbugs.gnu.org; Tue, 18 Jun 2024 13:05:29 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:50725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcGs-0006k5-QO for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 13:05:27 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id D0B7213802A9; Tue, 18 Jun 2024 13:05:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 18 Jun 2024 13:05:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718730318; x=1718816718; bh=yWO+etI2UWuh5MAAKDwCp2kPi3QGQJyxEjGQjzW7xlA=; b= ikvzt6GGzxcOxcKx7k1DyyozqC4QIougt9CgTVnmsa9xV22I3YSlFQD80hZqlfEv wwjXWBo034wxfLZDWXAWwLuG8c6lDx8/VwYczZPqqwDLfTzmMRvK7asmYO3qOVcH ExQB8sLunb4yXOmSbweSVQZ+Rh0+ITsd9w7xbQ26sV4dJPShmy5+wnJyN5SON63c KKVwNaP8eS8oCqqBaIjFdwOAWOJMs3LQRhoxXKEXzLSy5l71+5N+FWIvHGxRVEXo +rWdl7HXPTPJaBq7XtQcp18ztukNjc2tOHccd4KekhJOpDhIKsB32l3D6o1vIlun xfbSV+x67GTPJnfYcSgSTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718730318; x= 1718816718; bh=yWO+etI2UWuh5MAAKDwCp2kPi3QGQJyxEjGQjzW7xlA=; b=h ozgmO5jWCI52k5IVB/HA46F/m4x16D5ageQdseyzh1d4bKwotNwwgYcHU07L4E4S mtW4UE/3LzXY1FfAKchF1RvVVJ9QNjAi9zjBwG40S8cSvfbXuwyZFGzREIPob9/Z xViV7aGoWY0yBzfmI0nqvy2xXxmXxrdp47I6eX73+AdgaR1u1w+dRNLI9W+vYL5D VUMCe/coF6DWa4bL0ZgYlio5kp6mrEtqWmE0Clkm9iAHW0sKVc/cB658SAxdPk+P y8jVOB/UtIjDZZ2m2yf+9ohvL4LvCGVUyB+WjPc9QWzWJQIwjjTVNgSLntAxgdFs vm7Qia50bburOS0TZThfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvkedgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Jun 2024 13:05:16 -0400 (EDT) Message-ID: Date: Tue, 18 Jun 2024 20:05:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eli Zaretskii , Eshel Yaron References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <864j9qqpfx.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, juri@linkov.net 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.7 (-) On 18/06/2024 17:46, Eli Zaretskii wrote: > 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. The current xref-revert-buffer already does those things - namely invoke revert-buffer-restore-functions. Even though it's a relatively recent phenomenon. And it makes sense to provide this feature to the users of xref-revert-buffer, so I don't see why not. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 13:39:04 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 17:39:04 +0000 Received: from localhost ([127.0.0.1]:46712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcnQ-0007mz-46 for submit@debbugs.gnu.org; Tue, 18 Jun 2024 13:39:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcnN-0007mR-H4 for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 13:39:02 -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 1sJcl7-0006RZ-Kl; Tue, 18 Jun 2024 13:36: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=ZkKox1MTDTgtNJ3t1yg+MCpfrr+9s/2XqoCgWoQB7P4=; b=WYcc+QHNXeRV It08yVQPYD01wtHFHTnWP0kcbqIXMfSxTvlvKA8be25x8XCbZ2H3sZ/tdJX3Yep8zX3WeFznovD0K UIPocsrMgjevMym1ws4aWoIRf9ZAFjdHiIS22f0edksWeYDzl+LaCCL4yeKF44wqYOyaEIidFb3y8 gDPfp8mSJT/xV3vTkXWT+kkxI3xuW3E+OdpMCym5Qn2VohtQfEI3IKA5xy3nsbk3IZ1AlHw3x+cGr hv36wsXAoQGYAhsYF5J+P93th9OEp+FB44BUe4m7T9Db/4IXM2UXJ4exl8rnrsFInkSRh0sAxcRwQ CuFjjwGpkpzzU5/Cd7jOzg==; Date: Tue, 18 Jun 2024 20:36:39 +0300 Message-Id: <86tthqp2zc.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Tue, 18 Jun 2024 20:05:14 +0300) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, me@eshelyaron.com, juri@linkov.net 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.3 (---) > Date: Tue, 18 Jun 2024 20:05:14 +0300 > Cc: 71466@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > > On 18/06/2024 17:46, Eli Zaretskii wrote: > > 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. > > The current xref-revert-buffer already does those things - namely invoke > revert-buffer-restore-functions. Even though it's a relatively recent > phenomenon. > > And it makes sense to provide this feature to the users of > xref-revert-buffer, so I don't see why not. All things being equal, leaving the old names of the functions and commands should be preferred. That's all I'm saying. It's a minor issue, but the cost of staying more compatible is also minor. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 13:48:06 2024 Received: (at 71466) by debbugs.gnu.org; 18 Jun 2024 17:48:06 +0000 Received: from localhost ([127.0.0.1]:46923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcwA-00084N-6J for submit@debbugs.gnu.org; Tue, 18 Jun 2024 13:48:06 -0400 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]:47611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJcw7-00083q-MR for 71466@debbugs.gnu.org; Tue, 18 Jun 2024 13:48:04 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id F26D413802AD; Tue, 18 Jun 2024 13:47:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 18 Jun 2024 13:47:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718732874; x=1718819274; bh=nM5hxdeATB7HUcaIyXvvcnsWcp8qvHD7YHp/s8x1S5k=; b= B2vRNkgk5axKshuowTmjPiSAQg8wY6oE80WWPZBEYzI+QXUNxIaUm6MvphZmAQBG fAbLHjIYQVNHDzCjDasVHzMGI1UADoLvLYXt/WQhg1BN0/OJxBCq0U5jsAuMM/oR XWYsni1al3sBge/kosy+4FrFiEMkloFoJSXpr1YXld43PdAuRC0QRaJ60wFEo/Ya AO4UE83//ElGC9PcF2gUG5znxLcY5EN7spLHiE8xca5rA5Z+HMX8DMXWSeLPKkpw NkMjcKAqgYLkmZ4nw+9EI3lwP1JT1vD5sb9wHc0Au0km3vTlLC9+EH86g33cCnNt s0WZPx1WaFEqSUtFl0NNSQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718732874; x= 1718819274; bh=nM5hxdeATB7HUcaIyXvvcnsWcp8qvHD7YHp/s8x1S5k=; b=e uUZOdVkonYRNqm99TRJAP7bDUUXYi9JFZPkcjV/OgFRHlCr22G9ejq2cgYXP5IVx +VAvAyyIWIEBfF27zIJ3sdiYq8RrapEH2WlIkOZMlbV/TuqBTO3Suh3zVdG3uPEr gqzTH6/H60wCW2f+UaFXZF8fVMtEIw4J92yj4I2lx5nSoGdSXvG9U260Fj375FbJ h8W382VZEyidNDzu+K802L4ltBTudLj/IDDElzgAqWdJq8fORUFFTRjZtMaefQJE ZJ3CFU8RxqgYy1oZA1FYUd3wnARgmEj8TOE393SNy0tIIYX8HcktCF5vonyVYHgd 7U+qQirqkDZ6+nGT4FM/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvkedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Jun 2024 13:47:53 -0400 (EDT) Message-ID: Date: Tue, 18 Jun 2024 20:47:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eli Zaretskii References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86tthqp2zc.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, me@eshelyaron.com, juri@linkov.net 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.7 (-) On 18/06/2024 20:36, Eli Zaretskii wrote: >> And it makes sense to provide this feature to the users of >> xref-revert-buffer, so I don't see why not. > All things being equal, leaving the old names of the functions and > commands should be preferred. That's all I'm saying. It's a minor > issue, but the cost of staying more compatible is also minor. It might be important for the case when somebody has rebound 'g' in Xref buffers to some other letter - then they reference xref-revert-buffer by name in their init script. Having them end up with a subpar version of it (and perhaps not notice it either) feels like an unfortunate outcome. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 20 12:42:55 2024 Received: (at 71466) by debbugs.gnu.org; 20 Jun 2024 16:42:55 +0000 Received: from localhost ([127.0.0.1]:35983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKKsB-0007NO-Jk for submit@debbugs.gnu.org; Thu, 20 Jun 2024 12:42:55 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKKs9-0007N7-Dn for 71466@debbugs.gnu.org; Thu, 20 Jun 2024 12:42:53 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id C33F0FF80A; Thu, 20 Jun 2024 16:42:20 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Dmitry Gutov's message of "Tue, 18 Jun 2024 20:47:52 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> Date: Thu, 20 Jun 2024 19:38:58 +0300 Message-ID: <86tthnzp19.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Eli Zaretskii , 71466@debbugs.gnu.org, me@eshelyaron.com 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.7 (-) >>> And it makes sense to provide this feature to the users of >>> xref-revert-buffer, so I don't see why not. >> All things being equal, leaving the old names of the functions and >> commands should be preferred. That's all I'm saying. It's a minor >> issue, but the cost of staying more compatible is also minor. > > It might be important for the case when somebody has rebound 'g' in Xref > buffers to some other letter - then they reference xref-revert-buffer by > name in their init script. > > Having them end up with a subpar version of it (and perhaps not notice it > either) feels like an unfortunate outcome. So what is the decision? Maybe better to keep xref-revert-buffer as a wrapper around the new function xref--revert-buffer? (defun xref-revert-buffer () (let (restore-functions) (when (boundp 'revert-buffer-restore-functions) (run-hook-wrapped 'revert-buffer-restore-functions (lambda (f) (push (funcall f) restore-functions) nil))) (prog1 (xref--revert-buffer) (mapc #'funcall (delq nil restore-functions))))) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 20 13:36:04 2024 Received: (at 71466) by debbugs.gnu.org; 20 Jun 2024 17:36:04 +0000 Received: from localhost ([127.0.0.1]:37765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKLhc-0003Yz-1t for submit@debbugs.gnu.org; Thu, 20 Jun 2024 13:36:04 -0400 Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]:58693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKLha-0003YP-2a for 71466@debbugs.gnu.org; Thu, 20 Jun 2024 13:36:02 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9E27F11400CD; Thu, 20 Jun 2024 13:35:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 20 Jun 2024 13:35:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718904952; x=1718991352; bh=E0WkRGOxWxArnGeV0vs08WQ4EyIh7LsJUpPhhBvgmGU=; b= dm3qWVuCM3Tkcg9HurvbMb6ofX+wGHMx1kxNTeS9hsqpdotcXKPhnBfu52w0RJQ2 PhlkOnyRmTpYxyXqQ88jOg+6+N+vErYb9NrjjoKC1I2NY67BiMxBdH//6dGp2zVv G/CBn0Zrb+Kr5ZjXLuPCcl+GJA5r10D4gU/Sxru4FBphx8koQcNbRpwpYxJL/gOA cl2Tfif4db2iTxTE64jkAJMdg7uQxtO45WRaXQbdQuvmOmchptthg6AMZk0FyMJJ bvK/T0Ggl2feu+KM/8dGS7iOwVkjy/Gl5wcBStsbJtE8I4l7vO+eM/S8+yXujbsU UYg7WrSm9wOYniStiGH6Kw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718904952; x= 1718991352; bh=E0WkRGOxWxArnGeV0vs08WQ4EyIh7LsJUpPhhBvgmGU=; b=N NHFe2r3i6ybdC1qEi8sUrUrYtIAyssn8fJ7WzT3d/cnhH7phkIhw7NpgqnvAL5J/ 4dyWrPDcVq6y5ona8HtnuIA0hP3q59FSEeg4PcenZ+IBn6PDpXTG7Y3/XPaLwuJn lYrDR6PFmNk6C8sK/IPKoBzbaSsfmuEtR+LRUXFw//5FrRsaIutKJx5gBTvK8mxz 5RlYTrWFxFJJRD93Rnr6tCpYMOOWMtJvGgy1exqZNGwbftDrqi/2oBfVKWKwUz9h jGvshzF8deugEuTtd+J+pEhR+9GYwCPhIOgK1TV5t7mWqBAPV4ZA/lRAxk/yB9b/ xWXvmmqfs6o9lMeqIiEwA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefvddgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveeg udejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 20 Jun 2024 13:35:50 -0400 (EDT) Message-ID: <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> Date: Thu, 20 Jun 2024 20:35:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Juri Linkov References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86tthnzp19.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Eli Zaretskii , 71466@debbugs.gnu.org, me@eshelyaron.com 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.7 (-) On 20/06/2024 19:38, Juri Linkov wrote: > So what is the decision? Maybe better to keep xref-revert-buffer > as a wrapper around the new function xref--revert-buffer? That should work, though at the expense of duplicating some code. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 02:49:06 2024 Received: (at 71466) by debbugs.gnu.org; 24 Jun 2024 06:49:06 +0000 Received: from localhost ([127.0.0.1]:42742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLdVh-0000AD-OP for submit@debbugs.gnu.org; Mon, 24 Jun 2024 02:49:06 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:57909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLdVf-00009Y-Ij for 71466@debbugs.gnu.org; Mon, 24 Jun 2024 02:49:04 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id BDC881BF204; Mon, 24 Jun 2024 06:48:54 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> (Dmitry Gutov's message of "Thu, 20 Jun 2024 20:35:47 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> Date: Mon, 24 Jun 2024 09:27:52 +0300 Message-ID: <86r0cmg9wf.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Eli Zaretskii , 71466@debbugs.gnu.org, me@eshelyaron.com 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.7 (-) >> So what is the decision? Maybe better to keep xref-revert-buffer >> as a wrapper around the new function xref--revert-buffer? > > That should work, though at the expense of duplicating some code. I still don't understand how duplicating revert-buffer +(defun xref-revert-buffer () + "Refresh the search results in the current buffer." + (declare (obsolete revert-buffer "30.1")) + (interactive) + (let (restore-functions) + (when (boundp 'revert-buffer-restore-functions) + (run-hook-wrapped 'revert-buffer-restore-functions + (lambda (f) (push (funcall f) restore-functions) nil))) + (prog1 (xref--revert-buffer) + (mapc #'funcall (delq nil restore-functions))))) can be better than what Eshel proposed with an alias: + (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1") From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 18:42:59 2024 Received: (at 71466) by debbugs.gnu.org; 24 Jun 2024 22:42:59 +0000 Received: from localhost ([127.0.0.1]:35774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLsOp-0000Ea-8T for submit@debbugs.gnu.org; Mon, 24 Jun 2024 18:42:59 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:47923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLsOn-0000EM-Db for 71466@debbugs.gnu.org; Mon, 24 Jun 2024 18:42:58 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 658631380120; Mon, 24 Jun 2024 18:42:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 24 Jun 2024 18:42:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1719268970; x=1719355370; bh=o7W3LGb+i8l6p0DLOhEdvOMfPpyg6L/gxS9K9qxFr40=; b= bWOUbhIcJ/V8LRIkmE7qaqP7MZvCllyzTg/oqA21JrBnTxlPxsIMwIjP0U9XTkR8 q3oRM7xTHbPm2YaIa/hm1FiV4ov93HFhjhtsVCElgSsYhuqEX6gBUc36bCCbcHB2 nAyehrIY0cBtK4h8kKKbwLjEeEicJm4898NHmJJXE71GhzgCw2MoL5slUWp65AoV +UnPQPD04AKQefT8J6iNHI5sjEc8vRN10ywPxIX+xgXwULzUzVF+pcIoIMgC0+Hu k0I/+ZRtOFmCR3uxA+/gH9bmpUC2iE1xfwc83zIoljPEf89cbz9yWwsRBKeYQ6Pw wS4/AH5jTHZSoOQTH4tzwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719268970; x= 1719355370; bh=o7W3LGb+i8l6p0DLOhEdvOMfPpyg6L/gxS9K9qxFr40=; b=L o/A9Hh0iFOb1WSEr2wV8/eUzAMn0bffdCVp/PJ8X6wS00V8QE2JgQ9wrQR4Kx/Mv TJ8M0XuBSSmpMFI9BNXBbl+cS/3v+E5xYrQ8cnExDi1wqfA3H1+RTIhiZitkhAi7 1Uk0OS814OyOnPA/uTae0nsQ+EVQawKELW4iOT+IJaYwm29w5A/wPraHvhj6KIZP rhNOB0hiRsIF4IKrV7L8oKP+EZtbUDvbQxTPrLTivtyIhSwKEIdgVZItvn6Y+6Gt fsADMx531mBNuMS3H4rqs8d/Z53CS+EvHyjRd2JL/Vd8/O9ysNjOfO/exdZb6/gv RQKs9UqyNyxXIDxFXSe5A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeegvddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jun 2024 18:42:48 -0400 (EDT) Message-ID: Date: Tue, 25 Jun 2024 01:42:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Juri Linkov References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86r0cmg9wf.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Eli Zaretskii , 71466@debbugs.gnu.org, me@eshelyaron.com 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.7 (-) On 24/06/2024 09:27, Juri Linkov wrote: > I still don't understand how duplicating revert-buffer > > +(defun xref-revert-buffer () > + "Refresh the search results in the current buffer." > + (declare (obsolete revert-buffer "30.1")) > + (interactive) > + (let (restore-functions) > + (when (boundp 'revert-buffer-restore-functions) > + (run-hook-wrapped 'revert-buffer-restore-functions > + (lambda (f) (push (funcall f) restore-functions) nil))) > + (prog1 (xref--revert-buffer) > + (mapc #'funcall (delq nil restore-functions))))) > > can be better than what Eshel proposed with an alias: > > + (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1") That is my opinion as well: better obsolete it this way. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 03:00:54 2024 Received: (at 71466) by debbugs.gnu.org; 25 Jun 2024 07:00:54 +0000 Received: from localhost ([127.0.0.1]:36163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM0Ag-0007gK-Ip for submit@debbugs.gnu.org; Tue, 25 Jun 2024 03:00:54 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:58731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM0Ab-0007fs-Eq for 71466@debbugs.gnu.org; Tue, 25 Jun 2024 03:00:50 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id BD8691BF208; Tue, 25 Jun 2024 07:00:40 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Dmitry Gutov's message of "Tue, 25 Jun 2024 01:42:46 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> Date: Tue, 25 Jun 2024 09:54:32 +0300 Message-ID: <86v81xh5qv.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: Eli Zaretskii , 71466@debbugs.gnu.org, me@eshelyaron.com 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.7 (-) >> I still don't understand how duplicating revert-buffer >> +(defun xref-revert-buffer () >> + "Refresh the search results in the current buffer." >> + (declare (obsolete revert-buffer "30.1")) >> + (interactive) >> + (let (restore-functions) >> + (when (boundp 'revert-buffer-restore-functions) >> + (run-hook-wrapped 'revert-buffer-restore-functions >> + (lambda (f) (push (funcall f) restore-functions) nil))) >> + (prog1 (xref--revert-buffer) >> + (mapc #'funcall (delq nil restore-functions))))) >> can be better than what Eshel proposed with an alias: >> + (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer >> "30.1") > > That is my opinion as well: better obsolete it this way. Nice, then Eshel could push the latest patch (with discussed amendments). From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 08:54:54 2024 Received: (at 71466) by debbugs.gnu.org; 25 Jun 2024 12:54:54 +0000 Received: from localhost ([127.0.0.1]:36453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM5hG-0005aP-Ch for submit@debbugs.gnu.org; Tue, 25 Jun 2024 08:54:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM5hD-0005a8-VK for 71466@debbugs.gnu.org; Tue, 25 Jun 2024 08:54:53 -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 1sM5h6-0004cL-3w; Tue, 25 Jun 2024 08:54:44 -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=q1alD8Cd0uH28mN2mxJiYa+YGKwgIAJ/ZI20opiEVy4=; b=DmJRKL3pmPjr X8DY6iDnfRW34ARtmpUgwZBOCB/xP7Sk/yqKm+yrUkBwbKYOnmK7L/ZLUjp/pldsQwBkXigB9w2Zt tHMkO9KRVskjCb2tj/hRGWgdYedte5J+SOCuwKERSlI31WePpTEgLh8YVG5ocCC1PUcC9yedCajKX NpaGjU60VRq5zYnZxHnfMhXgsWvkgJd2WwUxJPk3hhwrZgj+YlBME6oM8e6NhMeHFn93VcGZ0j2NS jmI3aX53tE9dcxnAdYOaq1qMl8if0S4BKX3BIFv+las6XwoFRZ/6z1atL197IhBTZiUOr3tRlrdsz X3JDndL4QFUUZYycbxD+LA==; Date: Tue, 25 Jun 2024 15:54:40 +0300 Message-Id: <86tthh9o8f.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Tue, 25 Jun 2024 01:42:46 +0300) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, me@eshelyaron.com, juri@linkov.net 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.3 (---) > Date: Tue, 25 Jun 2024 01:42:46 +0300 > Cc: Eli Zaretskii , me@eshelyaron.com, 71466@debbugs.gnu.org > From: Dmitry Gutov > > On 24/06/2024 09:27, Juri Linkov wrote: > > I still don't understand how duplicating revert-buffer > > > > +(defun xref-revert-buffer () > > + "Refresh the search results in the current buffer." > > + (declare (obsolete revert-buffer "30.1")) > > + (interactive) > > + (let (restore-functions) > > + (when (boundp 'revert-buffer-restore-functions) > > + (run-hook-wrapped 'revert-buffer-restore-functions > > + (lambda (f) (push (funcall f) restore-functions) nil))) > > + (prog1 (xref--revert-buffer) > > + (mapc #'funcall (delq nil restore-functions))))) > > > > can be better than what Eshel proposed with an alias: > > > > + (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1") > > That is my opinion as well: better obsolete it this way. Why obsolete it at all? If we use an alias without obsoleting, I think everyone wins. No? From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 19:15:40 2024 Received: (at 71466) by debbugs.gnu.org; 25 Jun 2024 23:15:40 +0000 Received: from localhost ([127.0.0.1]:37746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMFNt-00015W-8Z for submit@debbugs.gnu.org; Tue, 25 Jun 2024 19:15:40 -0400 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]:37017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMFNP-000144-Lq for 71466@debbugs.gnu.org; Tue, 25 Jun 2024 19:15:27 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 06AD111401CE; Tue, 25 Jun 2024 19:14:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 25 Jun 2024 19:14:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1719357290; x=1719443690; bh=bLkmkv9yN5W3w4D4x6MCeiHnEJn4qTQzP/2OEnfiUE8=; b= LT4Nhnth2sVQwC/KGSYi+rrX/BeWQRFIJU6aX+nye5saRpSHoK1vxiGvX9dDNC8Z Q6iDXkC4AhXlzDX09thhj6kZmlY1OYUJ3KKGiR05BuFpdlBMJYYrRFdzP3znPbi7 85IMDoan7gZ6u2rbu0+off7BCgB//l13mu/GWWaVpP98ihLpvMXfvFCTwZk2qlpl fo/K2BYdoEX2+pUtPF8f/WsfyGOVC2v8v3d2UFTWNIC80P5zkz53A0LUeB/UCNUz gG8h+xigJuWr9/0xSjKKVVFCRg8N4nQdwL6r0C36ElEfugYe6NlWJnuPLuhCD1PK vAhwIv9S69nvwhCpFuqSUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719357290; x= 1719443690; bh=bLkmkv9yN5W3w4D4x6MCeiHnEJn4qTQzP/2OEnfiUE8=; b=u y0g4nt0KZHKvexWZnCU1Vo6smb8MulSLbwK1CjWuAI34OSjmhTMHVvVcFxoFEni9 Oc8LFKLqyKtQncRfoElB4Vb2Kjf8FgScpsw4fhTLsroOqAl3qfdIqZJrNqHK85UJ woK7TUHgTudCdiUMouXOXssJxULlUP0FzzSXzxAzlIt3ILV0slpPmOpCKy+dFtUc 94TT8T/xH02obCgPBiPnXYhfylEpnBXxeJc42nhCJzWKXyi7tzN2XYNzNSxNufgQ mE/2GUb0KpGjjzNLevRCZUfPAHqqkM7oX9Fj9A1wrEemPyDNZ1S9Y0m4FWa7Nc7o /ETuaI/DdJBwfKYPfyw8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtddugddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jun 2024 19:14:48 -0400 (EDT) Message-ID: Date: Wed, 26 Jun 2024 02:14:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eli Zaretskii References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86tthh9o8f.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, me@eshelyaron.com, juri@linkov.net 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.0 (-) On 25/06/2024 15:54, Eli Zaretskii wrote: >> Date: Tue, 25 Jun 2024 01:42:46 +0300 >> Cc: Eli Zaretskii,me@eshelyaron.com,71466@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 24/06/2024 09:27, Juri Linkov wrote: >>> I still don't understand how duplicating revert-buffer >>> >>> +(defun xref-revert-buffer () >>> + "Refresh the search results in the current buffer." >>> + (declare (obsolete revert-buffer "30.1")) >>> + (interactive) >>> + (let (restore-functions) >>> + (when (boundp 'revert-buffer-restore-functions) >>> + (run-hook-wrapped 'revert-buffer-restore-functions >>> + (lambda (f) (push (funcall f) restore-functions) nil))) >>> + (prog1 (xref--revert-buffer) >>> + (mapc #'funcall (delq nil restore-functions))))) >>> >>> can be better than what Eshel proposed with an alias: >>> >>> + (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1") >> That is my opinion as well: better obsolete it this way. > Why obsolete it at all? If we use an alias without obsoleting, I > think everyone wins. No? Well, we normally obsolete functions that aren't in use anymore, nor recommended for third parties. Right? We can stop from obsoleting it now (just make an alias), but add a comment to do that in the next Emacs release. How about that? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 07:25:28 2024 Received: (at 71466) by debbugs.gnu.org; 26 Jun 2024 11:25:28 +0000 Received: from localhost ([127.0.0.1]:38655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMQmF-0002hx-Ve for submit@debbugs.gnu.org; Wed, 26 Jun 2024 07:25:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMQmA-0002h8-Kq for 71466@debbugs.gnu.org; Wed, 26 Jun 2024 07:25: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 1sMQlz-0000vw-7A; Wed, 26 Jun 2024 07:25: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=Sf6al9yGvoyvXmARWW9L9mI6tvTjl0EfzBtvaG1rd0Q=; b=Prtybj4fG6QY aHlKLbbHgjNMtrOdPD1bgp64QBRtHEVkmDrjzOba+cwc4/raQZ3nM/Z8EN2A7fYem+FsSJ8W4U6eq ZZDvt2dTsAyEwGJGz5jesbeooDi9MNloITlw55YqYFRz7v0vHjrFqAR/5j/U3G6Ob3dvhzeNLTG+p CdeJEpRqDYI8lWA3WYGKK0/Mz+10h7qjwGwnMka8PV68p6MtiWGlKkOvxewUYOFyeHg9LJCm4NYqW G7KgKOnhRNVPNk027/WKT0kdqSg/whBJCApCTMMOFe0Z+EE1tq1RDDEupP/VaZMLpjjeHB1nvSkQV YuG88117yBH2YqOkYMiP6g==; Date: Wed, 26 Jun 2024 14:25:01 +0300 Message-Id: <865xtw9caa.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Wed, 26 Jun 2024 02:14:45 +0300) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, me@eshelyaron.com, juri@linkov.net 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.3 (---) > Date: Wed, 26 Jun 2024 02:14:45 +0300 > Cc: juri@linkov.net, me@eshelyaron.com, 71466@debbugs.gnu.org > From: Dmitry Gutov > > >> That is my opinion as well: better obsolete it this way. > > Why obsolete it at all? If we use an alias without obsoleting, I > > think everyone wins. No? > > Well, we normally obsolete functions that aren't in use anymore, nor > recommended for third parties. Right? > > We can stop from obsoleting it now (just make an alias), but add a > comment to do that in the next Emacs release. How about that? Better. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 12:57:02 2024 Received: (at 71466) by debbugs.gnu.org; 26 Jun 2024 16:57:02 +0000 Received: from localhost ([127.0.0.1]:40202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMVx7-0003GC-UG for submit@debbugs.gnu.org; Wed, 26 Jun 2024 12:57:02 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:52088 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMVx5-0003Ft-06 for 71466@debbugs.gnu.org; Wed, 26 Jun 2024 12:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1719421015; bh=8SMBErXM664nB0Hf6+IsdPHv0ylncAn+F5UaGVoWETY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aI5/zj9HeI0euuHNEFePutc7x8N6pTqQvQAlr5fBAaRIhaOK2COtVRXaYci7uW14r 9CHd94UpLUxDtHJLE0ZBO+dc39rCDDyRJKVVRCppdFiFH11S0Dtxd3+F9xsoDjCO4T KOdmKdbngZw9FleExJQ0HSWgInNV+abPAMLpiVlKqfQZrZoq4tnJd4ARgGW+mYyfrW odPWm8AGTUIiGrN/Kf/QCAXBmhBgs9KM7STCdciZRo0Zu31Gu/T/WSz+ftGFsut8Sa hE/bSoR7FQiHmmUyQ66eLfbauQMmtDWDAEHGkor/mxAAVdRDyui8cuWRJT4Hp0GPiM uPH6+jlqDgeFg== From: Eshel Yaron To: Eli Zaretskii Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <865xtw9caa.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Jun 2024 14:25:01 +0300") References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> Date: Wed, 26 Jun 2024 18:56:53 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71466 Cc: Dmitry Gutov , 71466@debbugs.gnu.org, juri@linkov.net 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.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Date: Wed, 26 Jun 2024 02:14:45 +0300 >> Cc: juri@linkov.net, me@eshelyaron.com, 71466@debbugs.gnu.org >> From: Dmitry Gutov >> >> >> That is my opinion as well: better obsolete it this way. >> > Why obsolete it at all? If we use an alias without obsoleting, I >> > think everyone wins. No? >> >> Well, we normally obsolete functions that aren't in use anymore, nor >> recommended for third parties. Right? >> >> We can stop from obsoleting it now (just make an alias), but add a >> comment to do that in the next Emacs release. How about that? > > Better. All right, so here's an updated patch. This is based on emacs-30, let me know if this should go to master instead. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-revert-function-in-xref-buffer.patch >From 0b6756fd31b071a2c88f4731d4dc3a74fcfac5f8 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 26 Jun 2024 18:51:32 +0200 Subject: [PATCH] Use 'revert-function' in *xref* buffer * lisp/progmodes/xref.el (xref--xref-buffer-mode-map): Cease binding 'g' to 'xref-revert-buffer'. (xref--xref-buffer-mode): Set 'revert-buffer-function' to... (xref--revert-buffer): ...this. New function, renamed from... (xref-revert-buffer): ...this. Make it an alias of 'revert-buffer'. * etc/NEWS: Announce it. * doc/emacs/maintaining.texi (Xref Commands): Update docs. --- doc/emacs/maintaining.texi | 6 +++--- etc/NEWS | 7 +++++++ lisp/progmodes/xref.el | 17 +++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 3a9bef9884a..64d77fb88a5 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2466,10 +2466,10 @@ Xref Commands @file{*xref*} buffers that show all the matches for an identifier in all the relevant files. @xref{Identifier Search}. +@cindex revert-buffer, in @file{*xref*} buffers @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}. @item M-, @findex xref-quit-and-pop-marker-stack diff --git a/etc/NEWS b/etc/NEWS index 716eb612720..8d360063f7a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1916,6 +1916,13 @@ the 'widget-inactive' face). If non-nil, moving point forward or backward between widgets by typing 'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil. +** Xref + +*** 'xref-revert-buffer' is now an alias of 'revert-buffer'. +The Xref buffer now sets up 'revert-buffer-function' such that +'revert-buffer' behaves like 'xref-revert-buffer' did in previous Emacs +versions, and the latter is now an alias of the former. + ** Ruby mode *** New user option 'ruby-rubocop-use-bundler'. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fb6c9dad73b..0b069941438 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -993,7 +993,6 @@ xref--xref-buffer-mode-map ;; suggested by Johan Claesson "to further reduce finger movement": (define-key map (kbd ".") #'xref-next-line) (define-key map (kbd ",") #'xref-prev-line) - (define-key map (kbd "g") #'xref-revert-buffer) (define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack) map)) @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode #'xref--imenu-extract-index-name) (setq-local add-log-current-defun-function #'xref--add-log-current-defun) + (setq-local revert-buffer-function #'xref--revert-buffer) (setq-local outline-minor-mode-cycle t) (setq-local outline-minor-mode-use-buttons 'insert) (setq-local outline-search-function @@ -1273,22 +1273,16 @@ xref--show-common-initialize xref--original-window-intent (assoc-default 'display-action alist)) (setq xref--fetcher fetcher))) -(defun xref-revert-buffer () +(defun xref--revert-buffer (&rest _) ; Ignore `revert-buffer' args. "Refresh the search results in the current buffer." - (interactive) (let ((inhibit-read-only t) - (buffer-undo-list t) - restore-functions) - (when (boundp 'revert-buffer-restore-functions) - (run-hook-wrapped 'revert-buffer-restore-functions - (lambda (f) (push (funcall f) restore-functions) nil))) + (buffer-undo-list t)) (save-excursion (condition-case err (let ((alist (xref--analyze (funcall xref--fetcher))) (inhibit-modification-hooks t)) (erase-buffer) - (prog1 (xref--insert-xrefs alist) - (mapc #'funcall (delq nil restore-functions)))) + (xref--insert-xrefs alist)) (user-error (erase-buffer) (insert @@ -1296,6 +1290,9 @@ xref-revert-buffer (error-message-string err) 'face 'error))))))) +;;; FIXME: Make this alias obsolete in future release. +(defalias 'xref-revert-buffer #'revert-buffer) + (defun xref--auto-jump-first (buf value) (when value (select-window (get-buffer-window buf)) -- 2.45.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 14:33:18 2024 Received: (at 71466) by debbugs.gnu.org; 26 Jun 2024 18:33:18 +0000 Received: from localhost ([127.0.0.1]:40256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMXSH-0005qR-Tt for submit@debbugs.gnu.org; Wed, 26 Jun 2024 14:33:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMXSC-0005qC-QN for 71466@debbugs.gnu.org; Wed, 26 Jun 2024 14:33:16 -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 1sMXS3-0006m7-Pq; Wed, 26 Jun 2024 14:33:03 -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=XPfobiLda+km3yCvtoj2yWywWO8EI6iP+gr+W8pIObc=; b=eL9lYHky6MI2 aCm/utYVyO6OXIRIJgH7sFE4TQF1z4duqfFNy0xDOJBl3/4tOcBL3q50t3qV5PqY5WboEVgtSq6B6 zUkIrBxuTbPK3atEfLYncXoCiq/ZQFdx6GYVfCntLykCExE9RCoT7YP/1jpQ2ORk63sK5BGC848+m nvVVeWPSw9bIpVYjqKvBzox/d2o2txLJmlKFFf+JYsHqgXQO9chbXVUEguw/mAzYbS4zgCppQSm59 w6LcQjL3DlpxpnD3VPikmO29o7KYIkuNU/mY5ufUItu3tldZVktGo/mZUpbWHJULYTkU14nNuh63D KolxgO6IJscEtisH3Dlg+Q==; Date: Wed, 26 Jun 2024 21:33:01 +0300 Message-Id: <86sewz7dwi.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron In-Reply-To: (message from Eshel Yaron on Wed, 26 Jun 2024 18:56:53 +0200) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.3 (---) > From: Eshel Yaron > Cc: Dmitry Gutov , juri@linkov.net, 71466@debbugs.gnu.org > Date: Wed, 26 Jun 2024 18:56:53 +0200 > > Eli Zaretskii writes: > > >> Date: Wed, 26 Jun 2024 02:14:45 +0300 > >> Cc: juri@linkov.net, me@eshelyaron.com, 71466@debbugs.gnu.org > >> From: Dmitry Gutov > >> > >> >> That is my opinion as well: better obsolete it this way. > >> > Why obsolete it at all? If we use an alias without obsoleting, I > >> > think everyone wins. No? > >> > >> Well, we normally obsolete functions that aren't in use anymore, nor > >> recommended for third parties. Right? > >> > >> We can stop from obsoleting it now (just make an alias), but add a > >> comment to do that in the next Emacs release. How about that? > > > > Better. > > All right, so here's an updated patch. This is based on emacs-30, let > me know if this should go to master instead. I think emacs-30 is fine for this, thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 20:12:03 2024 Received: (at 71466) by debbugs.gnu.org; 27 Jun 2024 00:12:04 +0000 Received: from localhost ([127.0.0.1]:40613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMck7-0005yf-Jb for submit@debbugs.gnu.org; Wed, 26 Jun 2024 20:12:03 -0400 Received: from fout7-smtp.messagingengine.com ([103.168.172.150]:35627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMck5-0005y9-SO for 71466@debbugs.gnu.org; Wed, 26 Jun 2024 20:12:02 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 8A993138012F; Wed, 26 Jun 2024 20:11:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 26 Jun 2024 20:11:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1719447113; x=1719533513; bh=77kheUiDx7GnrxSnsk22EpfIW6gLeeoAUTSm0aeDuqo=; b= x1TMoohRHUsEjvJ2YgdgtaXL12XQFLhfVuBcY9ysQoOqyIOCzzjtREzw5oG4EOBw FD+zQeis2XOIoOzNmrnFU1ByI+4Ic9/1rqF1/ZWBWcg/2zkTEGYPIyJFTXeKtYXE oE3Dd5zsXBuNkOLTKVlnpS0+aGEMuRrGunMdoLOkPI1xKsfWhQHwuzeXCquR+b9M CGodRMMDcx46lIExfNrePAQ/ND2yGNXjw5ndmUaUQ3K4j/WCML4UE9ayB0KP6GqW y7CogWFGoh6NWjvkcv+mpxRIyw8JdVDhnnYeVlrJkG6sjevyKS40rguyIETS9Zen iP9e9kDCzihdXm7ou5BNBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719447113; x= 1719533513; bh=77kheUiDx7GnrxSnsk22EpfIW6gLeeoAUTSm0aeDuqo=; b=G ENa+RH/KR7UNHO4fZz8wH0lzlyEt59PsNVVhC2pEyGmaK4fJR5/nP0UtVzVnbQHe 6A9otYhgh1UxaZD/QwSyEareRtBLpzWWxsc14Yp6wZ/ejApVN+poAM7u5Dioh/SN 9a2hxS1kE+Plx8ySveAh+4TX8GZ4RUf01E7UA1Lox5Suc2VrZnaFcI/+olq0XxZn zVHNXFVaeL4YKds9Zh3yJEywDjdQ9IjZB7l0MdMQqmI2kHN/p0lUYGS64glhxtAM jRAgtHmbeBfXdNThnhcfF5vZndTKHf5OdtYRD+E74QHlSJTme8yaQpufxVsLijrS osrO5R1rC0NDoK47TDfFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdefgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Jun 2024 20:11:51 -0400 (EDT) Message-ID: Date: Thu, 27 Jun 2024 03:11:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted To: Eshel Yaron , Eli Zaretskii References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, juri@linkov.net 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.7 (-) On 26/06/2024 19:56, Eshel Yaron wrote: > All right, so here's an updated patch. This is based on emacs-30, let > me know if this should go to master instead. LGTM, please install. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 01:46:54 2024 Received: (at 71466) by debbugs.gnu.org; 27 Jun 2024 05:46:55 +0000 Received: from localhost ([127.0.0.1]:40793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMhyA-00063H-Fi for submit@debbugs.gnu.org; Thu, 27 Jun 2024 01:46:54 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:45758 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMhy8-000636-67; Thu, 27 Jun 2024 01:46:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1719467208; bh=yTciWkUyTU39kgZyGQ1EBOiaRpxQSnqgihJ2QeJ06Hk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=A7lYUih4rg+04/zu1GvldjzHaog0oCthrd09tJVa2zkmMpbZU/suRgJNr3c+7fLnb hRkeN6WdiYUs3tz5QDtVFT3DPoTrQU3vcPcLNo6LR+wwbtNKX2af/bUydHs7EFd4RM +ltc3ogcAj85f4qTi2hYD5hUOdv4HzGX7HocdEXwE/8XTEYU7WvrUDfI52FXxz3m92 Pv3U4H2hZ3QUAHlKnEpUH2tZ78khAVVoMrall1Havg9VJkyP8hgE7K0JDVHhbssmYF YDx7k5F/OHYasxbTlhFtmcXvmdnZZcFAnH4nenIuipnQ1AJ5HazQbDolwDdOq4N+FX Ew/qroXpH5zBA== From: Eshel Yaron To: Eli Zaretskii Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: <86sewz7dwi.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Jun 2024 21:33:01 +0300") References: <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> <86sewz7dwi.fsf@gnu.org> Date: Wed, 26 Jun 2024 23:05:20 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 71466 30.1 quit Eli Zaretskii writes: >> From: Eshel Yaron >> >> All right, so here's an updated patch. This is based on emacs-30, let >> me know if this should go to master instead. > > I think emacs-30 is fine for th [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, juri@linkov.net 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.1 (/) close 71466 30.1 quit Eli Zaretskii writes: >> From: Eshel Yaron >> >> All right, so here's an updated patch. This is based on emacs-30, let >> me know if this should go to master instead. > > I think emacs-30 is fine for this, thanks. Dmitry Gutov writes: > LGTM, please install. Thanks! Done in commit 82125b1a661, and closing the bug. Thank you all, Eshel From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 02:55:05 2024 Received: (at 71466) by debbugs.gnu.org; 27 Jun 2024 06:55:05 +0000 Received: from localhost ([127.0.0.1]:40837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMj29-00024U-Ci for submit@debbugs.gnu.org; Thu, 27 Jun 2024 02:55:05 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:41967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMj27-00023e-Hk for 71466@debbugs.gnu.org; Thu, 27 Jun 2024 02:55:03 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 849E120004; Thu, 27 Jun 2024 06:54:51 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Dmitry Gutov's message of "Tue, 18 Jun 2024 01:16:31 +0300") Organization: LINKOV.NET References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> <86wmmny1iy.fsf@mail.linkov.net> Date: Thu, 27 Jun 2024 09:43:25 +0300 Message-ID: <86frsyevhu.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: 71466@debbugs.gnu.org, Eshel Yaron 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.7 (-) >> Ok, so this is implemented here: > > LGTM, thanks! So now this is pushed as well. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 02:55:19 2024 Received: (at 71466) by debbugs.gnu.org; 27 Jun 2024 06:55:19 +0000 Received: from localhost ([127.0.0.1]:40845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMj2N-00025K-EP for submit@debbugs.gnu.org; Thu, 27 Jun 2024 02:55:19 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:54353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMj2L-000255-Ng for 71466@debbugs.gnu.org; Thu, 27 Jun 2024 02:55:18 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1961B40008; Thu, 27 Jun 2024 06:54:45 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted In-Reply-To: (Eshel Yaron's message of "Wed, 26 Jun 2024 23:05:20 +0200") Organization: LINKOV.NET References: <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> <86sewz7dwi.fsf@gnu.org> Date: Thu, 27 Jun 2024 09:39:36 +0300 Message-ID: <86le2qevzv.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.7 (/) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, Eli Zaretskii , 71466@debbugs.gnu.org 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.7 (-) >>> All right, so here's an updated patch. This is based on emacs-30, let >>> me know if this should go to master instead. >> >> I think emacs-30 is fine for this, thanks. > >> LGTM, please install. Thanks! > > Done in commit 82125b1a661, and closing the bug. > > Thank you all, This "FIXME: Make this alias obsolete in future release" means that after syncing the commit from emacs-30 to master, it could be declared obsolete in master immediately? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 03:20:08 2024 Received: (at 71466) by debbugs.gnu.org; 27 Jun 2024 07:20:09 +0000 Received: from localhost ([127.0.0.1]:40877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMjQO-0005Y4-H5 for submit@debbugs.gnu.org; Thu, 27 Jun 2024 03:20:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMjQM-0005XL-3G for 71466@debbugs.gnu.org; Thu, 27 Jun 2024 03:20:06 -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 1sMjQD-0007GW-H9; Thu, 27 Jun 2024 03:19:57 -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=YmAFy7ZxXq4wk7NfpdABFnlQgJ8bjK7gl7/30/uP7T0=; b=erv94KaN4AWH DVw7Uov0DuVQxF/DbBNECb5U43KaG5A5wNC9MmE8FGQp5ZnsjrpsPbbE1Y1SLC/nvb+vpqveSzQhR 3CNWS9cN6siDHRT7Hbn7hqZo2iIcvLlnXZ5sfKq2ROo749QGFkQUKYuwY4oJvVvt4n+FvTgwC0Wor muRYZ/thlsoaeGKH2Icd0/VomSAKyh8ygMTEQWqE5WrKp3DhmA0BVXG86AtQ4F9rj2LyCaTrD01Mw W2vMoRMO+lFRVzdpOOuMvZV2OeiPtRmz29Pu5yJ7V+5sPCownNxvTaDjL1HwBg85IBorOlC110Sbo X2ARp1LXOzTihWpHOdl9Aw==; Date: Thu, 27 Jun 2024 10:19:54 +0300 Message-Id: <86a5j67syt.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86le2qevzv.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 27 Jun 2024 09:39:36 +0300) Subject: Re: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted References: <30404984-e7ac-4f92-a194-06438dbf2d03@gutov.dev> <867cemquey.fsf@gnu.org> <864j9qqpfx.fsf@gnu.org> <86tthqp2zc.fsf@gnu.org> <86tthnzp19.fsf@mail.linkov.net> <10881a4d-5b44-4b7e-9686-d6f7bf3ddace@gutov.dev> <86r0cmg9wf.fsf@mail.linkov.net> <86tthh9o8f.fsf@gnu.org> <865xtw9caa.fsf@gnu.org> <86sewz7dwi.fsf@gnu.org> <86le2qevzv.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71466 Cc: dmitry@gutov.dev, 71466@debbugs.gnu.org, me@eshelyaron.com 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.3 (---) > From: Juri Linkov > Cc: Eli Zaretskii , dmitry@gutov.dev, 71466@debbugs.gnu.org > Date: Thu, 27 Jun 2024 09:39:36 +0300 > > >>> All right, so here's an updated patch. This is based on emacs-30, let > >>> me know if this should go to master instead. > >> > >> I think emacs-30 is fine for this, thanks. > > > >> LGTM, please install. Thanks! > > > > Done in commit 82125b1a661, and closing the bug. > > > > Thank you all, > > This "FIXME: Make this alias obsolete in future release" > means that after syncing the commit from emacs-30 to master, > it could be declared obsolete in master immediately? No, we need to collect user experience first. From unknown Fri Jun 20 18:24:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Jul 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator