From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off Date: Fri, 02 Jan 2009 08:52:02 +0100 Message-ID: <495DC7A2.6000106@gmx.at> References: <005301c96b95$547ae890$c2b22382@us.oracle.com> <495CE033.70808@gmx.at> <008801c96c57$dcbd5540$0200a8c0@us.oracle.com> Reply-To: martin rudalics , 1754@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230889422 20470 80.91.229.12 (2 Jan 2009 09:43:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2009 09:43:42 +0000 (UTC) Cc: 1754@emacsbugs.donarmstrong.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 02 10:44:51 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LIgaH-0006lE-I3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2009 10:44:49 +0100 Original-Received: from localhost ([127.0.0.1]:34203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIgZ2-0004jM-Hi for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2009 04:43:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LIgYx-0004iC-N1 for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 04:43:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LIgYv-0004g9-OH for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 04:43:26 -0500 Original-Received: from [199.232.76.173] (port=41991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIgYv-0004fz-Cy for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 04:43:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58203) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LIgYu-0002el-SI for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 04:43:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n029hMBn026505; Fri, 2 Jan 2009 01:43:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n029Z3vL024281; Fri, 2 Jan 2009 01:35:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 02 Jan 2009 09:35:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1754 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1754-submit@emacsbugs.donarmstrong.com id=B1754.123088856722926 (code B ref 1754); Fri, 02 Jan 2009 09:35:03 +0000 Original-Received: (at 1754) by emacsbugs.donarmstrong.com; 2 Jan 2009 09:29:27 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n029TNMi022913 for <1754@emacsbugs.donarmstrong.com>; Fri, 2 Jan 2009 01:29:24 -0800 Original-Received: (qmail invoked by alias); 02 Jan 2009 09:29:17 -0000 Original-Received: from 62-47-63-144.adsl.highway.telekom.at (EHLO [62.47.63.144]) [62.47.63.144] by mail.gmx.net (mp047) with SMTP; 02 Jan 2009 10:29:17 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/zjLhA8HbzkCXqfOUZmnR4IPGVxJAezLuhN98/q8 JClWeQI/nPOUCq User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <008801c96c57$dcbd5540$0200a8c0@us.oracle.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 02 Jan 2009 04:43:26 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23685 Archived-At: >> > (tool-bar-mode -1) >> [...] >> > (setq default-frame-alist >> > (append (list (cons 'tool-bar-lines 1)) >> > default-frame-alist)) >> >> Inherently, you're painting yourself into a corner by simultaneously >> demanding and rejecting toolbars. Moreover, that last assignment gets >> you a second entry for `tool-bar-lines' in >> `default-frame-alist' (and we have received _lots_ of mails >> from you complaining about such duplicate entries before). > > No, as a result of those "_lots_ of mails" I sent, that bug was finally fixed. > No duplicate entries are created by Emacs since 2008-12-31. > > However, you are correct that the code above creates a second entry for > `tool-bar-lines'. That should not be a problem - the first entry is used (it is > an alist, after all). You mean what's good for you is not good for Emacs? > That is, there is no corner. There is. You want toolbars and eat them too. > The latest change to the > parameter `tool-bar-lines' should _always_ prevail - regardless of whether you > use `modify-frame-parameters' or (setq default-frame-alist...) or you call > `tool-bar-mode'. What makes you think it doesn't? > The problem is, I'm thinking now, that the entry (tool-bar-lines . 1) in > `pop-up-frames-alist' is being used for the creation of new frames when > `pop-up-frames' is non-nil. If that is happening, it is incorrect behavior, on > two counts: > > 1. `tool-bar-mode' should be modal and affect all existing and subsequent > frames, regardless of their default alist (`special-display-frame-alist', > `pop-up-frame-alist', or `default-frame-alist'). > > 2. `pop-up-frame-alist' should not be used for creating normal new frames. As Drew uses to say "the Elisp manual is your friend": -- User Option: pop-up-frame-alist This variable holds an alist specifying frame parameters used when `display-buffer' makes a new frame. *Note Frame Parameters::, for more information about frame parameters. >> However, you do _not_ set `initial-frame-alist' simultaneously, >> so you won't get a toolbar for the first frame which is the >> correct behavior since you have toggled tool-bar-mode off >> before and only that counts for the initial frame (unless you >> explicitly override it). Since `default-frame-alist' contains >> a tool-bar-lines entry you will get a toolbar for future frames >> which is correct as well. > > Sorry, all of that text is irrelevant to my bug report. I am not concerned about > the initial frame. You should be. Unfortunately, you are not concerned about reading what I write either. So here we go again: When you do (tool-bar-mode -1) you also create a (tool-bar-lines . 0) entry for _both_ `initial-frame-alist' and `default-frame-alist'. When you do (setq default-frame-alist (append (list (cons 'tool-bar-lines 1)) default-frame-alist)) you override the (tool-bar-lines . 0) by a (tool-bar-lines . 1) entry _for the default frame only_. However, the initial frame will continue to have the (tool-bar-lines . 0) entry you created earlier. So the initial frame won't have a toolbar, subsequently created frames will. > More importantly, if you turn the mode off, new frames should also not have tool > bars. That is the point here. When you set tool-bar-lines to 1 in `default-frame-alist' the way you do, new frames will have a toolbar. > I tried your patch (by just redefining tool-bar-mode after running my test > case), but it unfortunately does not seem to fix the problem. I suspect the > remaining problem is as I indicated above: `pop-up-frame-alist' is being used > when it shouldn't be used - to open normal frames (not popup frames). Even if you were right about this one, the (tool-bar-lines . 1) entry in `default-frame-alist' would continue to produce toolbars for new frames. martin