From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: tutorial on faces ? Date: Wed, 6 Feb 2019 08:45:20 -0800 (PST) Message-ID: References: <18CB97AD-A448-47CD-97C7-6B4E825D2061@gmail.com> <54912792-0816-47b2-9c24-1f9230c17a59@default> <2A2300D5-9929-4996-B507-FCBC72A778C9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="173951"; mail-complaints-to="usenet@blaine.gmane.org" To: Jean-Christophe Helary , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 06 17:47:05 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grQLp-000j7X-87 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2019 17:47:05 +0100 Original-Received: from localhost ([127.0.0.1]:53722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grQLo-000500-8o for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2019 11:47:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grQKS-0004Sc-CT for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 11:45:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grQKQ-0006SI-BS for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 11:45:40 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:44762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grQKP-0006IN-J5 for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 11:45:38 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x16GhsBU144697; Wed, 6 Feb 2019 16:45:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=fJprPvbSy6WUshHB8jKPbqp+Yd9AZfo9rwZ2Gi2n8EU=; b=C8YO9cTZ6CHm8tif12XwgupKAihexAREGel8Kk4jYshkWEwfn8pY0l5wrMYjzeGF8Guv b4LChzCiGHK/oMqm+1XBm0q2l7t49fNRuexV7S6f9kgfhEUc6eany/8MVOY3fEIykyIL +uSq4LJyWnlo2kHPrYUgXL4XLcnYhcWFnSMRXePafWGS19SCpWgYxkWgbxaG3K/7o4Wg NaqZYMx1xMFOL9O39ETuODUtn2tHZDG8MfVSHZRVQJ90YKWGu/6QWs161T/eYyi8NZKT 4xzMBdB5qOJ/yyJua1W7uwAM5hiaQWBYnH2oEXNZGiZZ8bRHUxAHLmy8KSkcQUMHW1h8 pg== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2qd97f25pp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 Feb 2019 16:45:25 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x16GjOkb025185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Feb 2019 16:45:25 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x16GjOAr017480; Wed, 6 Feb 2019 16:45:24 GMT In-Reply-To: <2A2300D5-9929-4996-B507-FCBC72A778C9@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4795.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9159 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=457 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902060129 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:119230 Archived-At: > Well, I'm tweaking poker.el at the moment and I'm looking for ways to > apply style to some parts of the messages. >=20 > 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.