* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
@ 2021-01-29 18:12 martin rudalics
2021-01-29 20:09 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2021-01-29 18:12 UTC (permalink / raw
To: 46178
With emacs -Q run a graphical build with a tab bar or an internal tool
bar (motif, lucid, no toolkit have the latter). Do
(setq auto-resize-tab-bars 'grow-only)
and/or
(setq auto-resize-tool-bars 'grow-only)
Now make the frame very narrow so the tool and/or tab bar wrap(s)
around. Expand the frame again, so the items on the bar(s) occupy one
line only. You will see empty lines below the lines showing the items.
According to the doc-strings of the above options and the Elisp manual
you should now be able to use 'recenter' to get rid of these empty
lines:
If value is ‘grow-only’, the tab-bar’s height is only increased
automatically; to decrease the tab-bar height, use M-x recenter.
However, this doesn't work by default since in the following part of
'recenter'
if (!NILP (redisplay)
&& !NILP (Vrecenter_redisplay)
&& (!EQ (Vrecenter_redisplay, Qtty)
|| !NILP (Ftty_type (selected_frame))))
{
ptrdiff_t i;
/* Invalidate pixel data calculated for all compositions. */
for (i = 0; i < n_compositions; i++)
composition_table[i]->font = NULL;
#if defined (HAVE_WINDOW_SYSTEM)
WINDOW_XFRAME (w)->minimize_tab_bar_window_p = 1;
#endif
#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1;
#endif
Fredraw_frame (WINDOW_FRAME (w));
SET_FRAME_GARBAGED (WINDOW_XFRAME (w));
Vrecenter_redisplay is by default 'tty' and Ftty_type (selected_frame)
is nil, so the conjunct never becomes true and minimize_tab_bar_window_p
is never set to 1.
So we'd have to mention in the docs of this option that one can regain
these lines only by setting 'recenter-redisplay' to anything but the
default. Better IMHO would be to abolish the never used and completely
useless 'grow-only' value for these options.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
2021-01-29 18:12 bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only martin rudalics
@ 2021-01-29 20:09 ` Eli Zaretskii
2021-01-30 10:18 ` martin rudalics
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-29 20:09 UTC (permalink / raw
To: martin rudalics; +Cc: 46178
> From: martin rudalics <rudalics@gmx.at>
> Date: Fri, 29 Jan 2021 19:12:02 +0100
>
> So we'd have to mention in the docs of this option that one can regain
> these lines only by setting 'recenter-redisplay' to anything but the
> default.
The doc string already says that.
> Better IMHO would be to abolish the never used and completely
> useless 'grow-only' value for these options.
That's a separate issue.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
2021-01-29 20:09 ` Eli Zaretskii
@ 2021-01-30 10:18 ` martin rudalics
2021-01-30 14:17 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2021-01-30 10:18 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 46178
>> So we'd have to mention in the docs of this option that one can regain
>> these lines only by setting 'recenter-redisplay' to anything but the
>> default.
>
> The doc string already says that.
That of 'recenter' does. But since these options do not work out of the
box (a user has to customize the option 'recenter-redisplay' too), it
would be useful if the docs of 'auto-resize-tool-bars' and
'auto-resize-tab-bars' told so. At the moment they just tell me to use
M-x recenter or C-l. Also, the doc string of 'recenter' does not
mention the tab bar and its Elisp manual entry mentions neither the tab
nor the tool bar.
>> Better IMHO would be to abolish the never used and completely
>> useless 'grow-only' value for these options.
>
> That's a separate issue.
We could stop mentioning 'grow-only' in the doc-strings and manuals and
leave it in as an undocumented feature.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
2021-01-30 10:18 ` martin rudalics
@ 2021-01-30 14:17 ` Eli Zaretskii
2021-01-30 15:27 ` martin rudalics
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-30 14:17 UTC (permalink / raw
To: martin rudalics; +Cc: 46178
> Cc: 46178@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> Date: Sat, 30 Jan 2021 11:18:09 +0100
>
> >> So we'd have to mention in the docs of this option that one can regain
> >> these lines only by setting 'recenter-redisplay' to anything but the
> >> default.
> >
> > The doc string already says that.
>
> That of 'recenter' does. But since these options do not work out of the
> box (a user has to customize the option 'recenter-redisplay' too), it
> would be useful if the docs of 'auto-resize-tool-bars' and
> 'auto-resize-tab-bars' told so. At the moment they just tell me to use
> M-x recenter or C-l.
OK, I fixed that.
> Also, the doc string of 'recenter' does not mention the tab bar and
> its Elisp manual entry mentions neither the tab nor the tool bar.
Not sure why that is a problem. We don't have to have everything
mentioned in every possible place.
> >> Better IMHO would be to abolish the never used and completely
> >> useless 'grow-only' value for these options.
> >
> > That's a separate issue.
>
> We could stop mentioning 'grow-only' in the doc-strings and manuals and
> leave it in as an undocumented feature.
You know me: I'm uneasy about downgrading features just because they
are awkward or inconvenient to document.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
2021-01-30 14:17 ` Eli Zaretskii
@ 2021-01-30 15:27 ` martin rudalics
2021-01-30 19:48 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2021-01-30 15:27 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 46178
>> That of 'recenter' does. But since these options do not work out of the
>> box (a user has to customize the option 'recenter-redisplay' too), it
>> would be useful if the docs of 'auto-resize-tool-bars' and
>> 'auto-resize-tab-bars' told so. At the moment they just tell me to use
>> M-x recenter or C-l.
>
> OK, I fixed that.
Thanks. You won't believe it but yesterday this would have saved me
half an hour poking around with this. Until then I didn't know that
'recenter' is now our moral equivalent of 'redisplay'.
You might also reconsider the Elisp manual entry where it says
If this variable is non-‘nil’, the tool bar automatically resizes
to show all defined tool bar items—but not larger than a quarter of
the frame’s height.
I've been digging through Gerd's and Kim's rewrites of
'redisplay_tool_bar' and nowhere found a reference to that "quarter".
Did that ever work and when?
>> We could stop mentioning 'grow-only' in the doc-strings and manuals and
>> leave it in as an undocumented feature.
>
> You know me: I'm uneasy about downgrading features just because they
> are awkward or inconvenient to document.
I stumbled across this feature because wrapping and unwrapping the tool
bar on Motif by changing the frame width shrinks the frame height for
inexplicable reasons until it is down to a few lines. Lucid and
non-toolkit builds do not have this issue. Currently, I just try to
understand the design considerations and whether they are responsible
for the behavior I see.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
2021-01-30 15:27 ` martin rudalics
@ 2021-01-30 19:48 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-30 19:48 UTC (permalink / raw
To: martin rudalics; +Cc: 46178
> Cc: 46178@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> Date: Sat, 30 Jan 2021 16:27:11 +0100
>
> You might also reconsider the Elisp manual entry where it says
>
> If this variable is non-‘nil’, the tool bar automatically resizes
> to show all defined tool bar items—but not larger than a quarter of
> the frame’s height.
>
> I've been digging through Gerd's and Kim's rewrites of
> 'redisplay_tool_bar' and nowhere found a reference to that "quarter".
> Did that ever work and when?
If the current behavior is that we allow any number of tool-bar lines,
then this text is inaccurate and should be fixed to describe the
current behavior.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-30 19:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-29 18:12 bug#46178: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only martin rudalics
2021-01-29 20:09 ` Eli Zaretskii
2021-01-30 10:18 ` martin rudalics
2021-01-30 14:17 ` Eli Zaretskii
2021-01-30 15:27 ` martin rudalics
2021-01-30 19:48 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.