From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: "Robert Pluim" <rpluim@gmail.com>,
"Ture Pålsson" <ture@turepalsson.se>,
"Stefan Kangas" <stefankangas@gmail.com>,
74924@debbugs.gnu.org
Subject: bug#74924: 29.3; Buffer showing manpage jumps back to beginning
Date: Thu, 09 Jan 2025 09:40:44 +0200 [thread overview]
Message-ID: <87y0zkxy17.fsf@mail.linkov.net> (raw)
In-Reply-To: <5af72953-383a-4337-8c64-d1df92934ab6@gmx.at> (martin rudalics's message of "Wed, 8 Jan 2025 10:56:49 +0100")
>> 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 ;-)
next prev parent reply other threads:[~2025-01-09 7:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 9:07 bug#74924: 29.3; Buffer showing manpage jumps back to beginning Ture Pålsson
2024-12-17 13:19 ` Stefan Kangas
2024-12-17 13:34 ` Robert Pluim
2024-12-28 11:39 ` Eli Zaretskii
2025-01-06 19:18 ` Juri Linkov
2025-01-08 9:56 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 7:40 ` Juri Linkov [this message]
2025-01-09 8:53 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 9:04 ` Eli Zaretskii
2025-01-09 9:35 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-09 14:38 ` Eli Zaretskii
2025-01-09 18:34 ` Juri Linkov
2024-12-17 13:36 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y0zkxy17.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=74924@debbugs.gnu.org \
--cc=rpluim@gmail.com \
--cc=rudalics@gmx.at \
--cc=stefankangas@gmail.com \
--cc=ture@turepalsson.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).