Subject: Re: bug#17671: 24.3.91; RET on a link in *Help* buffer resizes *Help*

From: Eli Zaretskii <[email-masked]>
Date: Tue, 03 Jun 2014 10:47:52 +0300

> Date: Tue, 03 Jun 2014 09:21:56 +0200
> From: martin rudalics <[email-masked]>
> 
>  >    C-h f line-move-visual RET
>  >    C-x o
>  >    move to the link under "simple.el" and type RET
>  >    drag the mode line so that the lower window showing *Help* becomes
>  >     smaller
> 
> `temp-buffer-resize-mode' would do that automatically.

Then perhaps we should turn on that mode by default.

>  >    move cursor to the first call to vertical-motion
>  >    C-h f RET
>  >    C-x o
>  >    move to the link under "C source code" and type RET
>  >    the window showing *Help* is resized back to half the frame
> 
> It's due to this code in `display-buffer-use-some-window':
> 
>        ;; If the window was used by `display-buffer' before, try to
>        ;; resize it to its old height but don't signal an error.
>        (when (and (listp quad)
> 		 (integerp (nth 3 quad))
> 		 (/= (nth 3 quad) (window-total-height window)))
> 	(condition-case nil
> 	    (window-resize window (- (nth 3 quad) (window-total-height window)))
> 	  (error nil)))
> 
>  > This is annoying.  I like my *Help* windows to be small, but many
>  > times (but not always) they are resized when I need to request
>  > documentation of something else.
> 
> In the case at hand the *Help* window gets resized _implicitly_ because
> the _other_ window is resized so the behavior is not tied to using help.

So this means that as long as the links in *Help* point to the same
file which is already displayed in the window above *Help*, the size
will stick, but as soon as another file is displayed in the window
above *Help*, we get a resize, is that right?  That's a really
annoying inconsistency, IMO.

>  > Why cannot Emacs keep the size of that window?
> 
> I can't remember.  Maybe to assure that the window used for displaying
> `vertical-motion' is reasonably large (after all you could have dragged
> the mode line to make the window showing *Help* larger).  Maybe simply
> to assure that when the same or a similar buffer is displayed in that
> window again, one can continue to work with its previous size (I vaguely
> remember that you requested something similar once wrt the position of
> `point' in such case).  Maybe it was also completlely unmotivated.
> 
> We can either remove that part or make it customizable.  Since I never
> use `display-buffer-use-some-window' I can't judge how offending the
> behavior is.

Is it possible to do something special for the specific scenario I
described, i.e. when a *Help* link causes a buffer to be displayed?

Or maybe the window showing *Help* should be small by default; taking
half of its frame is really gross, IMO.  It is especially annoying in
"emacs -Q", which starts with a small frame.