GNU bug report logs -
#74924
29.3; Buffer showing manpage jumps back to beginning
Previous Next
Full log
View this message in rfc822 format
>> 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 ;-)
This bug report was last modified 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.