all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Default font when creating a new frame
@ 2012-06-22  7:57 Christian Kellermann
  2012-06-22  8:26 ` Peter Dyballa
       [not found] ` <mailman.3221.1340353637.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Kellermann @ 2012-06-22  7:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I am running an (older) emacs snapshot 24.0.90.1 with the GTK frontend
and I have set (set-default-font "Inconsolata-12") in my .emacs. When I
create a new frame with M-x new-frame, the fresh frame will show a
different font, namely Ubuntu Mono which seems to be some default. Why
is set-default-font not enough and what should I use instead?

Kind regards,

Christian


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

* Re: Default font when creating a new frame
  2012-06-22  7:57 Default font when creating a new frame Christian Kellermann
@ 2012-06-22  8:26 ` Peter Dyballa
       [not found] ` <mailman.3221.1340353637.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2012-06-22  8:26 UTC (permalink / raw)
  To: Christian Kellermann; +Cc: help-gnu-emacs


Am 22.06.2012 um 09:57 schrieb Christian Kellermann:

> Why is set-default-font not enough and what should I use instead?

Maybe because GNU Emacs is using initial-frame-alist and default-frame-alist. This can lead to different settings applied to the first, initial, frame and others applied to the other frames. I think

	(setq initial-frame-alist default-frame-alist)

can make all the same...

--
Mit friedvollen Grüßen

  Pete

Imbecility, n.:
	A kind of divine inspiration, or sacred fire affecting censorious critics of this dictionary.
				– Ambrose Bierce: _The Devil's Dictionary_




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

* Re: Default font when creating a new frame
       [not found] ` <mailman.3221.1340353637.855.help-gnu-emacs@gnu.org>
@ 2012-06-22 10:23   ` Christian Kellermann
  2012-06-22 15:08     ` XeCycle
       [not found]     ` <mailman.3246.1340377872.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Kellermann @ 2012-06-22 10:23 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>> Why is set-default-font not enough and what should I use instead?
>
> Maybe because GNU Emacs is using initial-frame-alist and
> default-frame-alist. This can lead to different settings applied to
> the first, initial, frame and others applied to the other frames. I
> think
>
> 	(setq initial-frame-alist default-frame-alist)

Hm, I have set this as the first statement in my .emacs but it has no
effect on the font when opening a new frame.



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

* Re: Default font when creating a new frame
  2012-06-22 10:23   ` Christian Kellermann
@ 2012-06-22 15:08     ` XeCycle
       [not found]     ` <mailman.3246.1340377872.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: XeCycle @ 2012-06-22 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

Christian Kellermann <ckeen@pestilenz.org> writes:

> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>>> Why is set-default-font not enough and what should I use instead?
>>
>> Maybe because GNU Emacs is using initial-frame-alist and
>> default-frame-alist. This can lead to different settings applied to
>> the first, initial, frame and others applied to the other frames. I
>> think
>>
>> 	(setq initial-frame-alist default-frame-alist)
>
> Hm, I have set this as the first statement in my .emacs but it has no
> effect on the font when opening a new frame.

Afraid you need to set it at last, after value of
default-frame-alist is settled.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: Default font when creating a new frame
       [not found]     ` <mailman.3246.1340377872.855.help-gnu-emacs@gnu.org>
@ 2012-07-12  9:45       ` Christian Kellermann
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Kellermann @ 2012-07-12  9:45 UTC (permalink / raw)
  To: help-gnu-emacs

XeCycle <XeCycle@Gmail.com> writes:

> Christian Kellermann <ckeen@pestilenz.org> writes:
>
>> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>>>> Why is set-default-font not enough and what should I use instead?
>>>
>>> Maybe because GNU Emacs is using initial-frame-alist and
>>> default-frame-alist. This can lead to different settings applied to
>>> the first, initial, frame and others applied to the other frames. I
>>> think
>>>
>>> 	(setq initial-frame-alist default-frame-alist)
>>
>> Hm, I have set this as the first statement in my .emacs but it has no
>> effect on the font when opening a new frame.
>
> Afraid you need to set it at last, after value of
> default-frame-alist is settled.

To close this open thread, what I have done to get it work is:

(set-frame-font "Inconsolata-12")
(add-to-list 'default-frame-alist '(font . "Inconsolata-12"))

I guess a variation like

(add-to-list 'default-frame-alist '(font . "Inconsolata-12"))
(setq initial-frame-alist default-frame-alist)

might work also.

Thanks for all your hints!

Christian


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

end of thread, other threads:[~2012-07-12  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22  7:57 Default font when creating a new frame Christian Kellermann
2012-06-22  8:26 ` Peter Dyballa
     [not found] ` <mailman.3221.1340353637.855.help-gnu-emacs@gnu.org>
2012-06-22 10:23   ` Christian Kellermann
2012-06-22 15:08     ` XeCycle
     [not found]     ` <mailman.3246.1340377872.855.help-gnu-emacs@gnu.org>
2012-07-12  9:45       ` Christian Kellermann

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.