From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Haines Brown Newsgroups: gmane.emacs.help Subject: Re: setting default font name Date: Mon, 19 May 2014 14:56:04 -0400 Message-ID: <87ppj9d2d7.fsf@bach.histomat.net> References: <87egzrz5c2.fsf@bach.histomat.net> <87a9aezt9m.fsf@bach.histomat.net> <87y4xyc9ee.fsf@bach.histomat.net> <87tx8ldd20.fsf@bach.histomat.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1400526033 21663 80.91.229.3 (19 May 2014 19:00:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 May 2014 19:00:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 19 21:00:26 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WmSnK-0007tt-Rw for geh-help-gnu-emacs@m.gmane.org; Mon, 19 May 2014 21:00:18 +0200 Original-Received: from localhost ([::1]:49754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmSnK-00014t-6E for geh-help-gnu-emacs@m.gmane.org; Mon, 19 May 2014 15:00:18 -0400 X-Received: by 10.66.122.137 with SMTP id ls9mr15124409pab.17.1400525765898; Mon, 19 May 2014 11:56:05 -0700 (PDT) Original-Path: usenet.stanford.edu!c1no10739840igq.0!news-out.google.com!qf4ni5619igc.0!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 19 May 2014 13:56:05 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:y/4ta0KdA8v1ATzz3Qj7qS3bTko= Original-Lines: 83 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-FOnLaiIx2S3CKoI3fG8mqfwraCmbyzT3yV8dFkHk/vFCV5HCryb2PQ3IQ6mYXfVqRUCYR/BRHquVuuu!5/Im7UTGqQwLg7hIk/LWgbo98Q/9nWEaN4vjWjpo6lMRBTn4aAb3z9fLYtY= Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4924 Original-Xref: usenet.stanford.edu gnu.emacs.help:205491 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97760 Archived-At: Drew Adams 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 . 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