From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 16052@debbugs.gnu.org
Subject: bug#16052: 24.3.50; `set-frame-parameter` broken for `tool-bar-lines`
Date: Sat, 4 Jan 2014 08:08:10 -0800 (PST) [thread overview]
Message-ID: <48a0fee9-164b-4f89-81bc-61a1adcda3e8@default> (raw)
In-Reply-To: <52C81046.7050803@gmx.at>
> > M-x tool-bar-mode ; turn it on
> > M-x pp-eval-expression RET (frame-parameters)
> >
> > In frame *Pp Eval Output* search for `tool-bar-lines' => 2
> > (wrong).
> > M-x pp-eval-expression RET
> > (set-frame-parameter nil 'tool-bar-lines 1)
> > M-x pp-eval-expression RET (frame-parameters)
> >
> > In frame *Pp Eval Output* search for `tool-bar-lines' => 2
> > (wrong).
> Before using terms like "wrong" in bug reports please consult the
> Elisp manual:
>
> On each frame, the frame parameter `tool-bar-lines' controls
> how many lines' worth of height to reserve for the tool bar.
That does not contradict my expectation. Is there some nuanced
interpretation of "reserved" that I need to guess here, such that
perhaps "reserving" that much height does not actually give the
tool bar area that much height?
And actually, node (elisp) `Layout Parameters' says that it is "the
number of lines to USE for the tool bar." Not just reserved but
used.
Furthermore, it says explicitly that "The default is 1 if Tool Bar
mode is enabled, and 0 otherwise." That pretty much describes the
intended default behavior, and it coincides with my uninformed
expectation.
> What you see is either 0 when `tool-bar-mode' is turned off or 2
> which probably comes from the actual toolbar pixel height divided
> by the frame's default line height.
What it really comes from should be *specified* in the manual.
IOW, what is the default number? Otherwise, it is pretty reasonable
to assume (as I did) that the default is one. Whether reasonable or
not, users should not need to guess the default behavior for the
on state.
And see above. The manual in fact DOES say what the default is,
and it is not 2. Is the manual wrong here or is the implementation
bugged in this regard?
> Explicitly setting the `tool-bar-lines' parameter has no effect
> when `auto-resize-tool-bars' is non-nil (which it is with emacs -Q).
Thanks for that explanation of what the implementation does.
However, that too is unlikely to be guessed by users. And the doc
does not say that at all, AFAICT. It says only that the tool bar
gets resized automatically.
All of the info regarding `tool-bar-lines' should be either
documented in the same place or clearly interconnected using cross
references.
Layout parameter `tool-bar-lines' is documented primarily in node
`Layout Parameters' - that it the reference doc for it. At the
very least there needs to be a cross reference from there to node
`Tool Bar' (and vice versa).
And preferably it would be explicitly mentioned at `Layout
Parameters' what the effect is of `auto-resize-tool-bars' on
`tool-bar-lines' (the latter is ignored if the former is non-nil,
i.e., it is IGNORED by DEFAULT).
So if the behavior is as it is intended to be, then the doc is
inadequate. It does not describe the behavior. And what it does
suggest (i.e., by default, setting `tool-bar-lines' would do just
what the `tool-bar-lines' doc says: change the number of tool bar
lines) is something quite different from the actual behavior.
next prev parent reply other threads:[~2014-01-04 16:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 15:01 bug#16052: 24.3.50; `set-frame-parameter` broken for `tool-bar-lines` Drew Adams
2014-01-04 13:44 ` martin rudalics
2014-01-04 16:08 ` Drew Adams [this message]
2014-01-04 16:39 ` martin rudalics
2021-08-20 15:16 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48a0fee9-164b-4f89-81bc-61a1adcda3e8@default \
--to=drew.adams@oracle.com \
--cc=16052@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).