From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74924: 29.3; Buffer showing manpage jumps back to beginning Date: Thu, 09 Jan 2025 09:40:44 +0200 Organization: LINKOV.NET Message-ID: <87y0zkxy17.fsf@mail.linkov.net> References: <87seqm302a.fsf@gmail.com> <87ed1fvjil.fsf@mail.linkov.net> <5af72953-383a-4337-8c64-d1df92934ab6@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36501"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Robert Pluim , Ture =?UTF-8?Q?P=C3=A5lsson?= , Stefan Kangas , 74924@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 09 08:49:28 2025 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 1tVnIG-0009KZ-BR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jan 2025 08:49:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVnHu-0002FT-E6; Thu, 09 Jan 2025 02:49:06 -0500 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 1tVnHs-0002FA-DI for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 02:49:04 -0500 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 1tVnHq-0002uW-8r for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 02:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=vNoTaQb2WsFtD4O6N7SXEhdo9KaYDHEThvsWJqNzd7o=; b=HxF7cHz5WSeff07q6F40bNnrQijtz8DP/88WnDZSB09nl1R/dspYNYqGiOsbqYb59SR3I61a5jjSwRaksROjtmMxch74IBhF1wtfQA28oRliRnD8wcbw11o7HC1yeP6Y03g554HVD4195LvoujXtZ4pLs6QIRrGLRzVZsqI7RlV2JtSckWywnw1N1dok6aRsue6UqRX/ww+hGZ6nf/vmMdAWlkpOtF/ltUa1bUUVFog7qgrowJL/Cre3GMLIwnPONhC6az8Pj0GuALIfYqWZ1+/IH2HWuOsfGwxjlrtXheHuLO4pAEa8Pb321jHK7Odc0/XZ38lRhWUrqJDJN/Uymw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVnHq-0007zG-3X for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 02:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jan 2025 07:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74924 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 74924-submit@debbugs.gnu.org id=B74924.173640893830688 (code B ref 74924); Thu, 09 Jan 2025 07:49:02 +0000 Original-Received: (at 74924) by debbugs.gnu.org; 9 Jan 2025 07:48:58 +0000 Original-Received: from localhost ([127.0.0.1]:50275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVnHm-0007yu-AY for submit@debbugs.gnu.org; Thu, 09 Jan 2025 02:48:58 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54927) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVnHj-0007yc-Hf for 74924@debbugs.gnu.org; Thu, 09 Jan 2025 02:48:56 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 4BDB6E0006; Thu, 9 Jan 2025 07:48:46 +0000 (UTC) In-Reply-To: <5af72953-383a-4337-8c64-d1df92934ab6@gmx.at> (martin rudalics's message of "Wed, 8 Jan 2025 10:56:49 +0100") X-GND-Sasl: juri@linkov.net 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:298812 Archived-At: >> However, before pushing the patch, let's solve another problem >> that the manpage window jumps back to the beginning >> even on a window system. Here is the reproducible test case: >> >> 1. emacs -Q >> 2. M-x man RET man RET >> 3. C-M-v (scroll-other-window) >> 4. Reduce the width of the frame >> 5. manpage window jumps back to the beginning > > Why does it do that? I can try to find out by myself but I hope you > already know better. After resizing the frame, 'man' have to regenerate the buffer's contents with new width. >> So unless Martin has objections, I will also change >> 'with-current-buffer' to 'with-selected-window': > > I don't have any objections but we'd have to say why it is necessary for > curing the above problem. I didn't realize that the problem is worse and actually 'with-selected-window' is not much of help. This is the same problem how to restore the point position after reverting Dired buffer, but much worse. In Dired we can remember a file name under point. But for the Man buffer we can't even use some context around point because after regeneration, the text layout changes significantly. For example, in 'M-x man RET man RET' there is such text: The manual page associated with each of these arguments We could remember the context "The manual page". But after resizing it's split to next line: The manual page associated with each of these arguments Ok, need to try using 'window-point-context-use-default-function' and modify it to ignore whitespace changes in context strings. But first need to move 'window-point-context-use-default-function' to the new file lisp/window-x.el after you will push Pranshu's patch that creates the new file lisp/window-x.el ;-)