From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: 1754@emacsbugs.donarmstrong.com
Subject: bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off
Date: Fri, 02 Jan 2009 08:52:02 +0100 [thread overview]
Message-ID: <495DC7A2.6000106@gmx.at> (raw)
In-Reply-To: <008801c96c57$dcbd5540$0200a8c0@us.oracle.com>
>> > (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
next prev parent reply other threads:[~2009-01-02 7:52 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <496873E5.9080601@gmx.at>
2008-12-31 22:15 ` bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off Drew Adams
2009-01-01 15:24 ` martin rudalics
2009-01-01 15:53 ` Jason Rumney
2009-01-01 16:09 ` martin rudalics
2009-01-01 21:28 ` Drew Adams
2009-01-01 21:51 ` Drew Adams
2009-01-02 7:52 ` martin rudalics
2009-01-02 7:52 ` martin rudalics [this message]
2009-01-03 3:12 ` Stefan Monnier
2009-01-03 10:13 ` martin rudalics
2009-01-05 4:10 ` Stefan Monnier
2009-01-05 7:57 ` martin rudalics
2009-01-05 22:20 ` Stefan Monnier
2009-01-06 13:37 ` martin rudalics
2009-01-09 19:37 ` martin rudalics
2009-01-10 2:29 ` Stefan Monnier
2009-01-10 10:04 ` martin rudalics
2009-01-10 22:38 ` Stefan Monnier
2009-01-11 11:22 ` martin rudalics
2009-01-11 14:56 ` Stefan Monnier
2009-01-11 17:14 ` martin rudalics
2009-01-11 23:12 ` Stefan Monnier
2009-01-12 9:58 ` martin rudalics
2009-01-12 15:23 ` Stefan Monnier
2009-01-12 16:00 ` martin rudalics
2009-01-12 18:29 ` Stefan Monnier
2009-01-12 19:33 ` Lennart Borgman
2009-01-12 20:57 ` Stefan Monnier
2009-01-12 21:59 ` Drew Adams
2009-01-14 14:20 ` martin rudalics
2009-01-17 18:33 ` Drew Adams
2009-01-09 19:37 ` martin rudalics
2009-01-09 20:21 ` Chong Yidong
2009-01-10 10:20 ` bug#1754: marked as done (23.0.60; tool-bar is shown with tool-bar-mode off) Emacs bug Tracking System
2009-01-01 3:05 bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off Chong Yidong
2009-01-01 5:17 ` Drew Adams
2009-01-01 7:03 ` Chong Yidong
2009-01-01 21:28 ` Drew Adams
2009-01-01 21:51 ` Drew Adams
2009-01-02 0:01 ` Jason Rumney
2009-01-02 1:14 ` Drew Adams
2009-01-02 2:27 ` Drew Adams
2009-01-02 2:47 ` Drew Adams
2009-01-02 11:57 ` Jason Rumney
2009-01-02 14:50 ` martin rudalics
2009-01-01 7:36 ` Jason Rumney
2009-01-01 21:28 ` Drew Adams
2009-01-01 23:53 ` Jason Rumney
2009-01-02 1:14 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2009-01-01 13:47 grischka
2009-01-01 13:51 ` Jason Rumney
2009-01-01 14:30 ` grischka
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=495DC7A2.6000106@gmx.at \
--to=rudalics@gmx.at \
--cc=1754@emacsbugs.donarmstrong.com \
--cc=drew.adams@oracle.com \
/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).