GNU bug report logs -
#32536
displayed width of man pages
Previous Next
Reported by: hw <hw <at> adminart.net>
Date: Sun, 26 Aug 2018 16:43:02 UTC
Severity: wishlist
Tags: fixed
Merged with 9385
Found in versions 23.3, 24.3
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> I reported this in bug#32637, please see there.
>
> Thanks to Martin, a request in bug#32637 is now implemented and closed.
BTW, I plan to change the behavior of 'window-size-change-functions'
as follows.
(1) Run the buffer-local hook not only once for each buffer per frame
but for each window showing the buffer.
(2) Run the buffer-local hook with the window as argument instead of
the frame.
(3) Run the buffer-local hook for changes of the window's body size
too.
(4) Run the buffer-local hook also when a window has not shown the
buffer the last time this hook was run.
This way, a function that should be run whenever a window showing a
certain buffer is created/used or changes size is guaranteed to run in
each case and no further checks are needed.
All changes would be strictly based on 'local-variable-p' (and not on
'buffer-local-value') so any calls from 'window-size-change-functions'
in Emacs < 27.1 would remain unaffected. WDYT?
> But still this bug#32536 can't be closed because I found an insolvable
> problem: 'M-x occur' is impossible to use on automatically resized
> Man-mode buffers: after running 'M-x occur' in a Man buffer, it splits
> the wide frame horizontally, that changes the width of the Man buffer,
> that causes window-size-change-functions to run, that starts a new
> Man process to reformat the Man buffer according to the new width of the
> Man buffer. After that, typing RET on all matching lines in the Occur buffer
> will jump to the beginning of the Man buffer, because reformatting invalidates
> all markers that point from lines in the Occur buffer to lines in the
> Man buffer, i.e. typing 'C-u C-x =' on all lines in the Occur buffer
> displays the same:
>
> There are text properties here:
> occur-target #<marker at 1 in *Man bash*>
So essentially you would have to rerun occur whenever the Man buffer
is reformatted.
Otherwise, I see only one way to handle this. Before reformatting,
store the context of each marker (in a bookmark-like or diff-like
fashion) and restore the markers from that context. The matching done
in the restore step would have to identify and ignore "soft" changes
of whitespace.
martin
This bug report was last modified 5 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.