fivemack: (Default)
Tom Womack ([personal profile] fivemack) wrote2006-12-20 01:15 pm
Entry tags:

emacs question

My .emacs file contains the line

(set-default-font "7x13")

and indeed whenever I load a file into emacs, it comes up in 7x13.

But if I do C-x 5 2 to get another emacs window, the file in that window appears in a much larger and uglier font with inelegant serifs. How do I really set the default font?

[note: I don't run emacs-client, I edit files with 'emacs foo' on the command-line, so often I have lots of separate emacs processes; also, by 'window' I mean a window-system window rather than whatever emacs's internal jargon 'window' means]
ext_8103: (Default)

[identity profile] ewx.livejournal.com 2006-12-20 01:20 pm (UTC)(link)

I use X resources to configure mine.

Emacs*menubar*font:     -adobe-helvetica-medium-r-normal--12-*-75-75-p-*-iso8859-1
Emacs*popup*font:       -adobe-helvetica-medium-r-normal--12-*-75-75-p-*-iso8859-1
Emacs.font:             -misc-fixed-medium-r-semicondensed--13-*-*-*-c-*-iso8859-1
Emacs.iconName:         emacs
Emacs21.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1

You'll have to brave the X font naming nightmare to figure out what name to put instead of the ones I have...

emperor: (Default)

[personal profile] emperor 2006-12-20 01:27 pm (UTC)(link)
xfontsel isn't too dreadful in helping with that, IME.

[identity profile] jojomojo.livejournal.com 2006-12-20 03:02 pm (UTC)(link)
I have a feeling 7x13 is usually in X-land an alias to the appropriate font, anyway...

[identity profile] aardvark179.livejournal.com 2006-12-20 02:05 pm (UTC)(link)
Setting emacs default fonts seems to be a battle of wills. I've not found a satisfactory cross platform way that is respected by the new frames, font-lock stuff, and doesn't involve setting the same thing in multiple places.

I'd love to know what you're supposed to do.

[identity profile] arnhem.livejournal.com 2006-12-20 03:58 pm (UTC)(link)
"emacs -fn 7x13" ?

(Anonymous) 2006-12-20 06:19 pm (UTC)(link)
Yeah, that's a tolerable crude solution for people like me, who try to keep one long-running emacs and use emacsclient to load things into it. Which is not what Tom says he does, and I could certainly see finding it a pain to remember to type each time.

Hence
alias e="emacs -fn 7x13"
or suitable equivalent for the shell in use. Having your various setup files keep e defined suitably (to run the editor directly, run emacsclient, or whatever) in the right contexts makes a lot of things simpler to remember. Also shorter to type.

[identity profile] dd-b.livejournal.com 2006-12-20 06:21 pm (UTC)(link)
Oops, that was me. I didn't think I'd logged this out.

I suppose I'd better go back and reread my friends list for the locked posts, then.