all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Francesco Mazzoli <f@mazzo.li>
To: eliz@gnu.org, help-gnu-emacs@gnu.org
Subject: Re: Font in mode line
Date: Tue, 26 Nov 2013 22:22:59 +0100	[thread overview]
Message-ID: <CAPB=P5w4-Cz+OkOv=bMOXiUaj55qcKOn5u8K-VRHWua8T+F3kA@mail.gmail.com> (raw)

> > 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



             reply	other threads:[~2013-11-26 21:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 21:22 Francesco Mazzoli [this message]
2013-11-27  3:45 ` Font in mode line Eli Zaretskii
2013-11-27 18:47   ` Francesco Mazzoli
2013-11-27 23:10     ` Peter Dyballa
2013-11-28  0:30       ` Francesco Mazzoli
     [not found]       ` <mailman.7301.1385598665.10748.help-gnu-emacs@gnu.org>
2013-12-03 14:32         ` Jason Rumney
2013-12-03 20:48           ` Francesco Mazzoli
  -- strict thread matches above, loose matches on Subject: below --
2013-11-24 16:15 Francesco Mazzoli
2013-11-24 16:57 ` Eli Zaretskii
2013-11-26 17:26   ` Francesco Mazzoli
2013-11-26 18:11     ` Eli Zaretskii

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='CAPB=P5w4-Cz+OkOv=bMOXiUaj55qcKOn5u8K-VRHWua8T+F3kA@mail.gmail.com' \
    --to=f@mazzo.li \
    --cc=eliz@gnu.org \
    --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.