unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
@ 2008-10-02 18:13 Romain Francoise
  2008-10-02 19:47 ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Francoise @ 2008-10-02 18:13 UTC (permalink / raw)
  To: emacs-pretest-bug

When Emacs is started with --daemon, (tool-bar-mode -1) has no
effect when used in ~/.emacs.

To reproduce:
1. echo "(tool-bar-mode -1)" >~/.emacs
2. Start Emacs, note that it has no tool bar, exit
3. emacs --daemon
4. emacsclient -c: the frame has a tool bar when it should not

In the created frame, the first call to M-x tool-bar-mode has no
effect.  A second call finally disables the tool bar.



In GNU Emacs 23.0.60.12 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.11)
 of 2008-10-02 on elegiac
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  'CFLAGS=-O0 -g''







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-02 18:13 Romain Francoise
@ 2008-10-02 19:47 ` Dan Nicolaescu
  2008-10-02 20:07   ` Romain Francoise
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2008-10-02 19:47 UTC (permalink / raw)
  To: Romain Francoise; +Cc: emacs-pretest-bug, 1066

Romain Francoise <romain@orebokech.com> writes:

  > When Emacs is started with --daemon, (tool-bar-mode -1) has no
  > effect when used in ~/.emacs.
  > 
  > To reproduce:
  > 1. echo "(tool-bar-mode -1)" >~/.emacs
  > 2. Start Emacs, note that it has no tool bar, exit
  > 3. emacs --daemon
  > 4. emacsclient -c: the frame has a tool bar when it should not
  > 
  > In the created frame, the first call to M-x tool-bar-mode has no
  > effect.  A second call finally disables the tool bar.

Can you please test this patch:

--- faces.el.~1.425.~	2008-09-24 12:55:17.000000000 -0700
+++ faces.el	2008-10-02 12:39:46.000000000 -0700
@@ -2001,7 +2001,6 @@ Value is the new frame created."
 	  ;; Make sure the tool-bar is ready to be enabled.  The
 	  ;; `tool-bar-lines' frame parameter will not take effect
 	  ;; without this call.
-	  (tool-bar-setup frame)
 	  (if (null visibility-spec)
 	      (make-frame-visible frame)
 	    (modify-frame-parameters frame (list visibility-spec)))






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-02 19:47 ` Dan Nicolaescu
@ 2008-10-02 20:07   ` Romain Francoise
  2008-10-02 20:52     ` Dan Nicolaescu
  2008-10-02 21:14     ` Dan Nicolaescu
  0 siblings, 2 replies; 8+ messages in thread
From: Romain Francoise @ 2008-10-02 20:07 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 1066

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Can you please test this patch:

> --- faces.el.~1.425.~	2008-09-24 12:55:17.000000000 -0700
> +++ faces.el	2008-10-02 12:39:46.000000000 -0700
> @@ -2001,7 +2001,6 @@ Value is the new frame created."
>  	  ;; Make sure the tool-bar is ready to be enabled.  The
>  	  ;; `tool-bar-lines' frame parameter will not take effect
>  	  ;; without this call.
> -	  (tool-bar-setup frame)
>  	  (if (null visibility-spec)
>  	      (make-frame-visible frame)
>  	    (modify-frame-parameters frame (list visibility-spec)))

Works for me, thanks.

While I'm at it: the user who reported this bug to me also has the
problem with `set-default-font', it seems to have no effect with
--daemon.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-02 20:07   ` Romain Francoise
@ 2008-10-02 20:52     ` Dan Nicolaescu
  2008-10-02 21:14     ` Dan Nicolaescu
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2008-10-02 20:52 UTC (permalink / raw)
  To: Romain Francoise; +Cc: 1066

Romain Francoise <romain@orebokech.com> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > Can you please test this patch:
  > 
  > > --- faces.el.~1.425.~	2008-09-24 12:55:17.000000000 -0700
  > > +++ faces.el	2008-10-02 12:39:46.000000000 -0700
  > > @@ -2001,7 +2001,6 @@ Value is the new frame created."
  > >  	  ;; Make sure the tool-bar is ready to be enabled.  The
  > >  	  ;; `tool-bar-lines' frame parameter will not take effect
  > >  	  ;; without this call.
  > > -	  (tool-bar-setup frame)
  > >  	  (if (null visibility-spec)
  > >  	      (make-frame-visible frame)
  > >  	    (modify-frame-parameters frame (list visibility-spec)))
  > 
  > Works for me, thanks.

Thanks, I am not completely convinced it's the right fix, given the
comment that precedes this code.  Not sure what to do...

  > While I'm at it: the user who reported this bug to me also has the
  > problem with `set-default-font', it seems to have no effect with
  > --daemon.

Unfortunately I don't know much about the font stuff, and I don't have
time at the moment to deal with it, so someone else will have to deal
with that.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-02 20:07   ` Romain Francoise
  2008-10-02 20:52     ` Dan Nicolaescu
@ 2008-10-02 21:14     ` Dan Nicolaescu
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2008-10-02 21:14 UTC (permalink / raw)
  To: Romain Francoise; +Cc: 1066

Romain Francoise <romain@orebokech.com> writes:

  > While I'm at it: the user who reported this bug to me also has the
  > problem with `set-default-font', it seems to have no effect with
  > --daemon.

Another thing:

set-default-font is an alias for `set-frame-font' in `frame.el'.

(set-default-font font-name &optional keep-size)

Set the font of the selected frame to font-name.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
when .emacs is run, the selected frame is not an X11 frame, so this
function does not seem to be the right one to use.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
@ 2008-10-09 19:49 Chong Yidong
  2008-10-10  1:17 ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2008-10-09 19:49 UTC (permalink / raw)
  To: Romain Francoise, Dan Nicolaescu; +Cc: 1066

I've reorganized the semantics of tool-bar-mode slightly to deal with
the multi-tty situation.

Now, tool-bar-mode is always turned on unless the user explicitly
disables it in X resources or .emacs --- even if the initial frame is on
a tty.  Even though tool-bar-mode doesn't display a tool-bar on a tty,
its value is meaningful: it says whether or not any graphical frame we
create will have a tool-bar.

This should resolve the current bug.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-09 19:49 bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon Chong Yidong
@ 2008-10-10  1:17 ` Dan Nicolaescu
  2008-10-10  8:58   ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2008-10-10  1:17 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Romain Francoise, 1066

Chong Yidong <cyd@stupidchicken.com> writes:

  > I've reorganized the semantics of tool-bar-mode slightly to deal with
  > the multi-tty situation.
  > 
  > Now, tool-bar-mode is always turned on unless the user explicitly
  > disables it in X resources or .emacs --- even if the initial frame is on
  > a tty.  Even though tool-bar-mode doesn't display a tool-bar on a tty,
  > its value is meaningful: it says whether or not any graphical frame we
  > create will have a tool-bar.
  > 
  > This should resolve the current bug.

Thanks for doing this!  There's still a missing part: it needs to work
when using --without-x.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon
  2008-10-10  1:17 ` Dan Nicolaescu
@ 2008-10-10  8:58   ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2008-10-10  8:58 UTC (permalink / raw)
  To: Dan Nicolaescu, 1066; +Cc: cyd, romain, bug-gnu-emacs

> Date: Thu, 9 Oct 2008 18:17:04 -0700 (PDT)
> From: Dan Nicolaescu <dann@ics.uci.edu>
> Cc: Romain Francoise <romain@orebokech.com>, 1066@emacsbugs.donarmstrong.com
> 
> Chong Yidong <cyd@stupidchicken.com> writes:
> 
>   > I've reorganized the semantics of tool-bar-mode slightly to deal with
>   > the multi-tty situation.
>   > 
>   > Now, tool-bar-mode is always turned on unless the user explicitly
>   > disables it in X resources or .emacs --- even if the initial frame is on
>   > a tty.  Even though tool-bar-mode doesn't display a tool-bar on a tty,
>   > its value is meaningful: it says whether or not any graphical frame we
>   > create will have a tool-bar.
>   > 
>   > This should resolve the current bug.
> 
> Thanks for doing this!  There's still a missing part: it needs to work
> when using --without-x.

I think I fixed that part, please try again.







^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-10-10  8:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 19:49 bug#1066: 23.0.60; (tool-bar-mode -1) in ~/.emacs has no effect with --daemon Chong Yidong
2008-10-10  1:17 ` Dan Nicolaescu
2008-10-10  8:58   ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2008-10-02 18:13 Romain Francoise
2008-10-02 19:47 ` Dan Nicolaescu
2008-10-02 20:07   ` Romain Francoise
2008-10-02 20:52     ` Dan Nicolaescu
2008-10-02 21:14     ` Dan Nicolaescu

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).