From: Drew Adams <drew.adams@oracle.com>
To: Jean-Christophe Helary <brandelune@gmail.com>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: RE: tutorial on faces ?
Date: Thu, 7 Feb 2019 09:54:49 -0800 (PST) [thread overview]
Message-ID: <fca8b07b-1d4d-47ab-8a85-117a80fa03c6@default> (raw)
In-Reply-To: <406711A6-E62E-4F43-B891-51724243CA9A@gmail.com>
> > I probably should have mentioned this: To highlight
> > parts of a string is one thing - use `propertize'
> > with property `face', for example.
> >
> > To highlight parts of a buffer is something else.
>
> How is that something else ?
See my previous mails. Read about font lock. Look
at some existing code that uses it.
Buffers are not strings. They don't behave the same
and they're not used the same. Buffers have a (major)
mode. Buffers are displayed and redisplayed.
A string is a string. A message displays a string,
typically ephemerally. The echo area and minibuffer
are not used like other buffers; in particular, you
typically do not try to use font lock there.
> > You typically use font lock for this. Font lock
> > periodically updates the highlighting, even as
> > you change buffer contents. It applies a set of
> > highlighting rules (regexp patterns, for example),
> > in sequence.
>
> Isn't it something you'd always want ?
See above. Read more about font lock, and maybe
read more about buffers and strings.
And look at existing code that (1) uses font lock
and (2) uses `message' with propertized strings.
prev parent reply other threads:[~2019-02-07 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 13:38 tutorial on faces ? Jean-Christophe Helary
2019-02-06 15:22 ` Drew Adams
2019-02-06 15:32 ` Jean-Christophe Helary
2019-02-06 16:45 ` Drew Adams
2019-02-07 5:47 ` Jean-Christophe Helary
2019-02-07 15:04 ` Drew Adams
2019-02-07 15:15 ` Jean-Christophe Helary
2019-02-07 15:44 ` Drew Adams
2019-02-07 15:58 ` Jean-Christophe Helary
2019-02-07 17:54 ` Drew Adams [this message]
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=fca8b07b-1d4d-47ab-8a85-117a80fa03c6@default \
--to=drew.adams@oracle.com \
--cc=brandelune@gmail.com \
--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.