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
Message #36 received at 32536 <at> debbugs.gnu.org (full text, mbox):
> 1. In Man-mode we have to add hook window-size-change-functions only
> buffer-locally (using the arg LOCAL of add-hook) rather than globally,
> because otherwise we can't remove this hook when a Man buffer is
> not displayed anymore.
I can't follow you here. Shouldn't we remove the hook _when_ a Man
buffer is not displayed anymore. That is, when
'Man-window-size-change' detects that no Man buffer is displayed
anymore, remove it from 'window-size-change-functions' and re-add it
as soon as a Man buffer gets displayed again.
> But the problem is that buffer-local
> window-size-change-functions is called only when the current buffer
> is in Man-mode. If it's not, it's not called even when resizing of
> the current non-Man buffer causes the resize of a Man-mode buffer
> in an adjacent window.
>
> 2. What if the same Man-mode buffer is displayed in two adjacent windows
> side-by-side? I guess we need to find all windows with the same buffer,
> compare their widths, and call Man-update-manpage only in the window
> with minimal width. Also it seems window-size-change-functions is
> not called twice for every window with Man-mode buffer, this is good.
I think 'Man-window-size-change' will have to take care of such cases.
Also we'll have to look into how 'follow-mode' works when displaying a
Man buffer in several side-by-side windows.
> 3. When windows are resized using the mouse, is it possible to call
> window-size-change-functions only when the mouse button is released?
> This will increase responsiveness. But the same problem will remain
> for keyboard resizing with e.g. C-x } } }
> A debounce-like function could help, but I can't find its Emacs Lisp
> implementation anywhere. I mean something similar to
> https://stackoverflow.com/questions/15927371/what-does-debounce-do
> It's easy to implement using timers, but better to have idiomatic
> implementation.
I used a timer in 'mouse-autoselect-window'. It might be interesting
to come up with a generic function.
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.