* Changing foreground/background colors in all frames
@ 2006-06-21 15:33 Swidan, Firas
2006-06-21 17:24 ` Gilbert Harman
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Swidan, Firas @ 2006-06-21 15:33 UTC (permalink / raw)
Hi,
I am unable to set the default foreground and background colors in all emacs
frames. I have added
(set-background-color "black")
(set-foreground-color "white")
To my .emacs. This changes the setting in the first emacs frame. However,
if I use
C-x 5 f
To open a new file in a new frame, the foreground/background settings in the
.emacs file do not seem to affect the look of the new frame.
Any ideas how to tackle this issue?
Many thanks and all the best,
Firas.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
2006-06-21 15:33 Swidan, Firas
@ 2006-06-21 17:24 ` Gilbert Harman
2006-06-21 18:45 ` Swidan, Firas
2006-06-21 17:38 ` Ehud Karni
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Gilbert Harman @ 2006-06-21 17:24 UTC (permalink / raw)
> I am unable to set the default foreground and background colors in all emacs
> frames. I have added
>
> (set-background-color "black")
> (set-foreground-color "white")
>
> To my .emacs. This changes the setting in the first emacs frame. However,
> if I use
>
> C-x 5 f
>
> To open a new file in a new frame, the foreground/background settings in the
> .emacs file do not seem to affect the look of the new frame.
>
> Any ideas how to tackle this issue?
(add-to-list 'default-frame-alist '(foreground-color . "white"))
(add-to-list 'default-frame-alist '(background-color . "black"))
Gil
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
2006-06-21 15:33 Swidan, Firas
2006-06-21 17:24 ` Gilbert Harman
@ 2006-06-21 17:38 ` Ehud Karni
2006-06-21 19:21 ` Peter Dyballa
[not found] ` <mailman.3128.1150911529.9609.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 8+ messages in thread
From: Ehud Karni @ 2006-06-21 17:38 UTC (permalink / raw)
Cc: help-gnu-emacs, emacs-devel
On Wed, 21 Jun 2006 11:33:51 -0400, Swidan, Firas wrote:
>
> I am unable to set the default foreground and background colors in all emacs
> frames. I have added
>
> (set-background-color "black")
> (set-foreground-color "white")
>
> To my .emacs. This changes the setting in the first emacs frame. However,
> if I use
>
> C-x 5 f
>
> To open a new file in a new frame, the foreground/background settings in the
> .emacs file do not seem to affect the look of the new frame.
The docs for these functions state clearly they change colors only for
the selected frame.
Below is a little function that changes values on all frames (current
and future ones), use it.
Ehud.
(defun set-frame-value-all (key val) ;; change frame attribute
(aput 'initial-frame-alist key val) ;; for ALL frames
(aput 'default-frame-alist key val)
(modify-frame-parameters (selected-frame) (list (cons key val))))
;; instead of (set-background-color "black") use:
(set-frame-value-all 'background-color "black")
;; instead of (set-foreground-color "black") use:
(set-frame-value-all 'foreground-color "black")
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
2006-06-21 17:24 ` Gilbert Harman
@ 2006-06-21 18:45 ` Swidan, Firas
0 siblings, 0 replies; 8+ messages in thread
From: Swidan, Firas @ 2006-06-21 18:45 UTC (permalink / raw)
Thanks for the help. I have tried Gil's suggestion and it seems that it did
the trick.
Firas.
On 6/21/06 1:24 PM, "Gilbert Harman" <harman@Princeton.EDU> wrote:
>> I am unable to set the default foreground and background colors in all emacs
>> frames. I have added
>>
>> (set-background-color "black")
>> (set-foreground-color "white")
>>
>> To my .emacs. This changes the setting in the first emacs frame. However,
>> if I use
>>
>> C-x 5 f
>>
>> To open a new file in a new frame, the foreground/background settings in the
>> .emacs file do not seem to affect the look of the new frame.
>>
>> Any ideas how to tackle this issue?
>
> (add-to-list 'default-frame-alist '(foreground-color . "white"))
> (add-to-list 'default-frame-alist '(background-color . "black"))
>
>
> Gil
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
2006-06-21 15:33 Swidan, Firas
2006-06-21 17:24 ` Gilbert Harman
2006-06-21 17:38 ` Ehud Karni
@ 2006-06-21 19:21 ` Peter Dyballa
[not found] ` <mailman.3128.1150911529.9609.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2006-06-21 19:21 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 21.06.2006 um 17:33 schrieb Swidan, Firas:
> To open a new file in a new frame, the foreground/background
> settings in the
> .emacs file do not seem to affect the look of the new frame.
>
> Any ideas how to tackle this issue?
Give these a chance:
(setq initial-frame-alist '(
(mouse-color . "midnightblue")
(foreground-color . "grey20")
(background-color . "alice blue")
(internal-border-width . 2)
(line-spacing . 1)
(top . 20) (left . 650) (width . 91) (height . 60)))
(setq default-frame-alist '(
(border-color . "#4e3832")
(foreground-color . "grey10")
(background-color . "ghost white")
(vertical-scroll-bars . left)
(cursor-color . "purple")
(cursor-type . box)
(top . 30) (left . 150) (width . 89) (height . 56)))
--
Greetings
Pete
A morning without coffee is like something without something else.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
[not found] ` <mailman.3128.1150911529.9609.help-gnu-emacs@gnu.org>
@ 2006-06-21 19:21 ` Norbert Melzer
2006-06-21 20:15 ` Drew Adams
0 siblings, 1 reply; 8+ messages in thread
From: Norbert Melzer @ 2006-06-21 19:21 UTC (permalink / raw)
Ehud Karni schrieb:
> (defun set-frame-value-all (key val) ;; change frame attribute
> (aput 'initial-frame-alist key val) ;; for ALL frames
> (aput 'default-frame-alist key val)
> (modify-frame-parameters (selected-frame) (list (cons key val))))
>
>
> ;; instead of (set-background-color "black") use:
> (set-frame-value-all 'background-color "black")
>
> ;; instead of (set-foreground-color "black") use:
> (set-frame-value-all 'foreground-color "black")
Doesn't help here:
Symbol's function definition is void: aput
Thats what I get when inserting in ~/.emacs and starting :-(
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Changing foreground/background colors in all frames
2006-06-21 19:21 ` Norbert Melzer
@ 2006-06-21 20:15 ` Drew Adams
0 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2006-06-21 20:15 UTC (permalink / raw)
> (defun set-frame-value-all (key val) ;; change frame attribute
> (aput 'initial-frame-alist key val) ;; for ALL frames
> (aput 'default-frame-alist key val)
> (modify-frame-parameters (selected-frame) (list (cons key val))))
Doesn't help here: Symbol's function definition is void: aput
See my message today replying to subject "Save the font setting" - it applies to all frame parameters, not just the font. Just get some frame to be the way you want all frames to be, then use `set-frame-alist-parameter-from-frame' or 'set-all-frame-alist-parameters-from-frame'. After that, use Customize to save the alists you updated (e.g. `default-frame-alist' and `initial-frame-alist').
If you don't want to do that, just customize those variables directly. What's good about the `set*' commands is that you need not know anything about how frame parameters are represented. See this doc: http://www.emacswiki.org/cgi-bin/wiki/CustomizingAndSaving#SavingFrameParameters.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing foreground/background colors in all frames
[not found] <mailman.3123.1150909180.9609.help-gnu-emacs@gnu.org>
@ 2006-06-21 22:36 ` Tim X
0 siblings, 0 replies; 8+ messages in thread
From: Tim X @ 2006-06-21 22:36 UTC (permalink / raw)
"Swidan, Firas" <swidanf@hhmi.org> writes:
> Hi,
>
> I am unable to set the default foreground and background colors in all emacs
> frames. I have added
>
> (set-background-color "black")
> (set-foreground-color "white")
>
> To my .emacs. This changes the setting in the first emacs frame. However,
> if I use
>
> C-x 5 f
>
> To open a new file in a new frame, the foreground/background settings in the
> .emacs file do not seem to affect the look of the new frame.
>
> Any ideas how to tackle this issue?
>
> Many thanks and all the best,
> Firas.
>
>
>
Either set the values in default-frame-alist AND initial-fram-alist or
far easier, use M-x customize-face <ret> default <ret>
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-06-21 22:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3123.1150909180.9609.help-gnu-emacs@gnu.org>
2006-06-21 22:36 ` Changing foreground/background colors in all frames Tim X
2006-06-21 15:33 Swidan, Firas
2006-06-21 17:24 ` Gilbert Harman
2006-06-21 18:45 ` Swidan, Firas
2006-06-21 17:38 ` Ehud Karni
2006-06-21 19:21 ` Peter Dyballa
[not found] ` <mailman.3128.1150911529.9609.help-gnu-emacs@gnu.org>
2006-06-21 19:21 ` Norbert Melzer
2006-06-21 20:15 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.