From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16052: 24.3.50; `set-frame-parameter` broken for `tool-bar-lines` Date: Sat, 4 Jan 2014 08:08:10 -0800 (PST) Message-ID: <48a0fee9-164b-4f89-81bc-61a1adcda3e8@default> References: <182110eb-2981-45c0-addb-61219af38e0a@default> <52C81046.7050803@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1388851758 25095 80.91.229.3 (4 Jan 2014 16:09:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jan 2014 16:09:18 +0000 (UTC) Cc: 16052@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 17:09:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VzTmt-0003OX-0I for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2014 17:09:23 +0100 Original-Received: from localhost ([::1]:54933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzTms-0007va-IS for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2014 11:09:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzTmg-0007iu-UF for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2014 11:09:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzTmY-00035w-As for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2014 11:09:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzTmY-00035o-7o for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2014 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VzTmX-0003IM-Jo for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2014 11:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2014 16:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16052 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16052-submit@debbugs.gnu.org id=B16052.138885170012608 (code B ref 16052); Sat, 04 Jan 2014 16:09:01 +0000 Original-Received: (at 16052) by debbugs.gnu.org; 4 Jan 2014 16:08:20 +0000 Original-Received: from localhost ([127.0.0.1]:33990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VzTlr-0003HI-FF for submit@debbugs.gnu.org; Sat, 04 Jan 2014 11:08:19 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45945) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VzTlp-0003H8-1c for 16052@debbugs.gnu.org; Sat, 04 Jan 2014 11:08:17 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id s04G8FXK026762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 4 Jan 2014 16:08:16 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s04G8EWX012042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Jan 2014 16:08:15 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s04G8E9Y012034; Sat, 4 Jan 2014 16:08:14 GMT In-Reply-To: <52C81046.7050803@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82921 Archived-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' =3D> 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' =3D> 2 > > (wrong). > Before using terms like "wrong" in bug reports please consult the > Elisp manual: >=20 > 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.