From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Mazzoli Newsgroups: gmane.emacs.help Subject: Re: Font in mode line Date: Tue, 26 Nov 2013 22:22:59 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1385501002 8375 80.91.229.3 (26 Nov 2013 21:23:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Nov 2013 21:23:22 +0000 (UTC) To: eliz@gnu.org, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 26 22:23:27 2013 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 1VlQ6Q-0001HK-Pp for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Nov 2013 22:23:26 +0100 Original-Received: from localhost ([::1]:32833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlQ6Q-00038e-Bx for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Nov 2013 16:23:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlQ68-00033J-F7 for help-gnu-emacs@gnu.org; Tue, 26 Nov 2013 16:23:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlQ61-0003iT-6j for help-gnu-emacs@gnu.org; Tue, 26 Nov 2013 16:23:08 -0500 Original-Received: from mail-lb0-f172.google.com ([209.85.217.172]:54044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlQ60-0003i6-Vb for help-gnu-emacs@gnu.org; Tue, 26 Nov 2013 16:23:01 -0500 Original-Received: by mail-lb0-f172.google.com with SMTP id z5so4933972lbh.3 for ; Tue, 26 Nov 2013 13:22:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=5nfDi6Q+joZP3NDRnojR30kA2Z4JJFPH/Vb5eenO4H0=; b=Ly3+ZLf2ADhWXoHdEPA9nSCrKpuZEkILd+BH0grxgKDpSiLo5mY+MtFhWHjm93Y/rF zx/B1j3ipcz3C4JUT5uchgKAvqzrd/kUkUDXS81VXnV3eEqWo2J7E1PW++cPeH3QQ553 hkBPP2kIdDxAGCX6IDFpuEYNyxbl2rpXNjHHJOtXgZfgXm3TSzl+5Y4M5k9Ja3mp+Amb uWEtlWVBQxKAxXz14SKw1Qdq3I1lJZfU5+lGTnJRD7hEjzmVt6NPTRUGT0WYOyX1Zfvl Jo8BSlGc/GAI5gQYr8+gqc1bEYXgz3xIthhmoVkw8GX/YWDM+ESKNZAUNahpYUzAy424 HgFA== X-Gm-Message-State: ALoCoQnipEE+k1seJ0WmzsfsbKQJV3AEj3wR+vB234W7dWttHIc8AvEgtf0/ylI/tbedTzICa0by X-Received: by 10.112.210.136 with SMTP id mu8mr10272347lbc.25.1385500979070; Tue, 26 Nov 2013 13:22:59 -0800 (PST) Original-Received: by 10.112.108.69 with HTTP; Tue, 26 Nov 2013 13:22:59 -0800 (PST) X-Originating-IP: [188.155.179.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.172 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:94664 Archived-At: > > I'm not sure how to use `format-mode-line' the way you described. > > Like this: > > C-x b *scratch* RET > M-x font-lock-mode RET > Now type this: > > (insert (format-mode-line mode-line-format)) > > and press C-j at the rightmost closing parenthesis. > > > If I format `mode- line-format' there doesn't seem to be an obvious > > way to infer the faces that are used to render the various elements. > > Go to one of the problematic characters and type "C-u C-x =". Emacs > will then show the font it used to display that character. Thanks, the part I was missing is `insert'. However, this doen't seem to work. Whatever my mode line looks like, the inserted text always look plain (font lock is on). For example if I set (set-face-attribute 'mode-line-buffer-id nil :font "8x13" :foreground nil) The buffer id in the mode line displays red, but when I execute (insert (format-mode-line mode-line-format)) In *scratch* I get the contents of the mode line rendered with normal font. Francesco