all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Haines Brown <haines@histomat.net>
To: help-gnu-emacs@gnu.org
Subject: Re: setting default font name
Date: Mon, 19 May 2014 14:56:04 -0400	[thread overview]
Message-ID: <87ppj9d2d7.fsf@bach.histomat.net> (raw)
In-Reply-To: mailman.1615.1400514331.1147.help-gnu-emacs@gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> > Do you have that bitstream font installed?
>> 
>> Good question. I assumed I did because in emacs menu, I can go to
>> Options, Set Default font, and choose the bitstream font for a
>> document. That document keeps that font when reopened.
>
> So you see Emacs change to use that font, as you wanted.  It does
> not change to some other font.  Right?

Yes and no. I create a test initialization file, named .emacs-test, that is
empty. I start emacs with it ($ emacs -q -l .emacs-test). The session
opens with Welcom pagee. I then create a file (C-x f), and find that
it displays in monospace. In Options, Set Default Font, I choose the
Courier 10 point. I try Save Options, and get "setting savings from
"emacs -q" would overwrite existing customizations, which I assume means
that in this case the default font would overwrite any default font
definitions in .emacs-test. So I can't save the default font option. But
if I save the file (C-x s), and then try to Save the Options, there is
no warning message. But nothing is written to .emacs-test either. And
next time a file is opened with this test init file, it is back to its
old default monospace.

>> If I open emacs -Q the font used for the scratch buffer header is Deju
>> Sans. I can go to Options, Set Default Font, and change the header to
>> bitstream Courier 10 pitch.
>
> And does that change visibly to the font you want? 

Yes, but only temporarily. If I repeat, next time the scratch is back to
default mono.

>> If I then click "Save Options", I get the
>> warning: "Saving options from 'emacs -q' would overwrite existing
>> configutations". I don't understand. 
>
> When you use `emacs -q' you are not using your init file, which is
> where Emacs would normally save any changes.  Ignore this warning,
> and do not try to save such changes if you started without your
> init file.

? I thought to specify an init file you had to use the syntax: emacs -q
-l <initfile>. 

But as I demonstrated above, I get this warning when I am using an init
file (emacs -q -l .emacs-test). I can set the test file to display the
bitstream Courier font. I find I cannot try to Save Options until after
I've saved the file itself. While then I can Save Options without
warning message, nothing is written to the init file.

> If the tests you mention above actually show a change to the font
> you want, then, in a window that shows that font is used, do this:
>
> M-: (face-font 'default)

This shows the courier bitstream font. "-bitstream-Courier 10
Pitch-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1" (line break only
here). I can't Save Options until after I've resaved the test file
itself. 

> That will show you the string that is the font name for face
> `default', which is the same thing as the default font name.
>
> If this string is not the same as the string you were trying earlier,
> try this one instead.  IOW, this is a font name that works - perhaps
> the name you were trying before is not correct.

In .emacs-test I write the two lines:

(set-face-attribute
'(default ((t (:family "Courier 10 Pitch" :foundry "bitstream" :slant
normal :weight normal :height 113 :width normal))))) [line break only in
this message]

The produces an error. A lot of hex/? garbage (204V^@...), but including
"[args frame foundary family spec where purecopy 0 nil (0t) ..)"

> If this does not help, perhaps someone else can help.

Thanks for putting up with my inefficiency ;-(

Haines


  parent reply	other threads:[~2014-05-19 18:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 11:36 setting default font name Haines Brown
2014-05-18 13:35 ` Drew Adams
     [not found] ` <mailman.1565.1400420140.1147.help-gnu-emacs@gnu.org>
2014-05-18 21:11   ` Haines Brown
2014-05-18 21:57     ` Michael Heerdegen
2014-05-18 22:03     ` Drew Adams
     [not found]     ` <mailman.1582.1400450623.1147.help-gnu-emacs@gnu.org>
2014-05-19 11:09       ` Haines Brown
2014-05-19 13:47         ` Drew Adams
     [not found]         ` <mailman.1604.1400507269.1147.help-gnu-emacs@gnu.org>
2014-05-19 15:05           ` Haines Brown
2014-05-19 15:45             ` Drew Adams
     [not found]             ` <mailman.1615.1400514331.1147.help-gnu-emacs@gnu.org>
2014-05-19 18:56               ` Haines Brown [this message]
2014-05-19 20:51                 ` Drew Adams
     [not found]                 ` <mailman.1639.1400532700.1147.help-gnu-emacs@gnu.org>
2014-05-20 10:14                   ` Jacob Gerlach
2014-05-20 10:58                     ` Haines Brown
2014-05-19 19:30 ` Hans BKK
2014-05-20 13:32 ` Hans BKK

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppj9d2d7.fsf@bach.histomat.net \
    --to=haines@histomat.net \
    --cc=help-gnu-emacs@gnu.org \
    /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 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.