From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Allan Gottlieb Newsgroups: gmane.emacs.help Subject: Re: defining default face Date: Mon, 08 Sep 2008 14:53:04 -0400 Message-ID: References: <48C52051.8010307@tqtvd.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220900033 29315 80.91.229.12 (8 Sep 2008 18:53:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2008 18:53:53 +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 Sep 08 20:54:49 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kclse-0008Ri-W9 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Sep 2008 20:54:33 +0200 Original-Received: from localhost ([127.0.0.1]:52066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kclrf-0008F3-4D for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Sep 2008 14:53:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KclrM-0008De-FF for help-gnu-emacs@gnu.org; Mon, 08 Sep 2008 14:53:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KclrK-0008Ax-71 for help-gnu-emacs@gnu.org; Mon, 08 Sep 2008 14:53:11 -0400 Original-Received: from [199.232.76.173] (port=55253 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KclrK-0008Au-1Q for help-gnu-emacs@gnu.org; Mon, 08 Sep 2008 14:53:10 -0400 Original-Received: from smtp.cs.nyu.edu ([128.122.80.33]:61146) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KclrJ-0003pu-KZ for help-gnu-emacs@gnu.org; Mon, 08 Sep 2008 14:53:09 -0400 Original-Received: from ajglap.localdomain (ool-4578d291.dyn.optonline.net [69.120.210.145]) (authenticated bits=0) by smtp.cs.nyu.edu (8.14.3/8.13.8) with ESMTP id m88Ir8mZ004424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 8 Sep 2008 14:53:08 -0400 (EDT) Original-Received: by ajglap.localdomain (Postfix, from userid 1502) id 2289819D931; Mon, 8 Sep 2008 14:53:04 -0400 (EDT) In-Reply-To: <48C52051.8010307@tqtvd.com> (Rodrigo Canellas's message of "Mon\, 08 Sep 2008 09\:53\:37 -0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57340 Archived-At: At Mon, 08 Sep 2008 09:53:37 -0300 Rodrigo Canellas wrote: > I used 'set-default-font' to choose > "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1", but I > do not know how to edit '.emacs' to make it permanent... could anyone > help me? The simplest way is probably to use .Xresources (assuming you are using X). Mine is *Term*font2: 10x20 *Emacs*font: -bitstream-Bitstream Vera Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1 *Emacs*menuBar: off *Emacs*toolBar: 0 I also have an overblown method for changing the fonts and by experimenting have found the right sizes for 1-up, 2-up, 3-up, and 4-up (this depends on the screen res, mine is 2560x1600). The code below is from my .emacs. I run v23.0.60. allan ;; Common fonts ;; (defun ajg-set-font (f) "Set current and future frames to have font F" (interactive "sFont name (no quotes): ") (setq font-dotted-pair (cons 'font f)) (setq default-frame-alist (cons font-dotted-pair (assq-delete-all 'font default-frame-alist))) (set-default-font f)) (defun ajg-set-mono-font (size) "Set bitstream mono SIZE font for this and future frames" (interactive "sSize of bitstream mono font (no quotes): ") (ajg-set-font (concat "-bitstream-Bitstream Vera Sans Mono-normal-normal-normal-*-" size "-*-*-*-m-0-iso10646-1"))) (defun mono12-font () (interactive nil) (ajg-set-mono-font "12")) (defun mono14-font () (interactive nil) (ajg-set-mono-font "14")) (defun mono16-font () (interactive nil) (ajg-set-mono-font "16")) (defun mono18-font () (interactive nil) (ajg-set-mono-font "18")) (defun mono20-font () (interactive nil) (ajg-set-mono-font "20")) (defun mono25-font () (interactive nil) (ajg-set-mono-font "25")) (defun 4-up-font () (interactive nil) (mono12-font)) (defun 3-up-font () (interactive nil) (mono16-font)) (defun big-font () (interactive nil) (mono16-font)) (defun 2-up-font () (interactive nil) (mono25-font)) (defun huge-font () (interactive nil) (mono25-font)) (defun 1-up-font () (interactive nil) (mono52-font)) ; for a presentation