From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted Date: Mon, 17 Jun 2024 09:40:30 +0200 Message-ID: References: <86tthzwgsw.fsf@mail.linkov.net> <86msnkyt7c.fsf@mail.linkov.net> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , 71466@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 17 09:41:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJ6zQ-0004Rn-8e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Jun 2024 09:41:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJ6z7-0008Q7-6Q; Mon, 17 Jun 2024 03:41:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJ6z6-0008Pn-3G for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:41:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJ6z5-0007Dy-Qy for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:40:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJ6z7-0001N5-LC for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jun 2024 07:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71466 X-GNU-PR-Package: emacs Original-Received: via spool by 71466-submit@debbugs.gnu.org id=B71466.17186100375232 (code B ref 71466); Mon, 17 Jun 2024 07:41:01 +0000 Original-Received: (at 71466) by debbugs.gnu.org; 17 Jun 2024 07:40:37 +0000 Original-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 Original-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== In-Reply-To: <86msnkyt7c.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 17 Jun 2024 09:35:11 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287366 Archived-At: 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