all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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: Wed, 6 Feb 2019 08:45:20 -0800 (PST)	[thread overview]
Message-ID: <a77d4a49-ecb9-4b49-a4ec-867ce5365878@default> (raw)
In-Reply-To: <2A2300D5-9929-4996-B507-FCBC72A778C9@gmail.com>

> Well, I'm tweaking poker.el at the moment and I'm looking for ways to
> apply style to some parts of the messages.
> 
> Honestly, the elisp manual gives me no idea how to do that...

OK, good.  But what do you mean by "style"?
Do you mean that you want to apply a face to some
parts of some messages?

If so:

1. Do you want to apply the face to the buffer
   _positions_ of those msg parts, as an _overlay_
   property, or do you want to apply it to the
   _characters_ of those msg parts, as a _text_
   property?

2. Are those message parts recognizable/definable
   in a regular way, i.e., as something that you
   can define using one or more regexps?  And do
   you want the face highlighting to be
   automatically reapplied to those parts when
   the same text is visited anew (in the same
   mode), e.g. in a new Emacs session or after
   reverting the buffer?

   If the answer is yes then look at using
   `font-lock-mode' to define and highlight those
   parts.  If the answer is no then maybe look
   at using ad hoc highlighting, such as you get
   with library `highlight.el':

   https://www.emacswiki.org/emacs/HighlightLibrary

Knowing the answers to these, and perhaps other,
questions might help you direct your search for
tutorials (e.g. whether to look for tutorials
that involve font-lock highlighting).

The more you can specify about what you're
interested in, the more helpful people and search
can be.



  reply	other threads:[~2019-02-06 16:45 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 [this message]
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

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=a77d4a49-ecb9-4b49-a4ec-867ce5365878@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.