GNU bug report logs - #46178
28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Fri, 29 Jan 2021 18:13:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; auto-resize-tool-bars / auto-resize-tab-bars grow-only
Date: Fri, 29 Jan 2021 19:12:02 +0100
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





This bug report was last modified 4 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.