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: Thu, 7 Feb 2019 09:54:49 -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> <29567580-B9BC-4942-AA7A-2183C28304E4@gmail.com> <2105bb15-c923-4887-935d-c3fc8bc4b290@default> <79C3F1E3-45E2-4A59-8AFF-1134F66EB66C@gmail.com> <406711A6-E62E-4F43-B891-51724243CA9A@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="22212"; 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 Thu Feb 07 18:56:00 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 1grnu2-0005YT-1Y for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2019 18:55:58 +0100 Original-Received: from localhost ([127.0.0.1]:44421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grnu0-0000xI-Kb for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Feb 2019 12:55:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grnt9-0000nW-2h for help-gnu-emacs@gnu.org; Thu, 07 Feb 2019 12:55:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grnt7-0000YH-QT for help-gnu-emacs@gnu.org; Thu, 07 Feb 2019 12:55:03 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:38966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grnt7-0000TA-Gm for help-gnu-emacs@gnu.org; Thu, 07 Feb 2019 12:55:01 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x17HsllY174268; Thu, 7 Feb 2019 17:54:52 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=go782DWGL+nBEbO7dR6Hsc6gZlvbwn4YN81tFzdZqZ4=; b=JP20X15K7zdaRGZ73VVOAXj7Bsv+IUOSZPBXJfEbAszDAAyuPWhdLscjte3aC1e9ShDo vf9/cDU7k9VOtIgBOCC1bOF8wz7cTLHab/AR0Oblt+eaYkRtcRFaoTqLx1t4w4ymfBe4 0hz9CnF16xP40P8CtkrBwg5/pSd8ZzhU/PhblzyvbL0bUWeSRxhcdN0GhrLOCVrWPs4C Z0C6JihTdIZgKfvSMPJeW2Y/xHG28/mxLci01fRyyCtspGpbiviHVHclxKKfWUdTXdu8 9b9BiATuqIiC4d8ta61QGgZ+HHa6KgbseCMRFwjIG5mMw4opKTZnL6rccFkH7jSjHAk7 uQ== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2qd9arrfcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Feb 2019 17:54:52 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x17HspDd012709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Feb 2019 17:54:51 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x17HspmV020093; Thu, 7 Feb 2019 17:54:51 GMT In-Reply-To: <406711A6-E62E-4F43-B891-51724243CA9A@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=9160 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=706 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902070135 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 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:119253 Archived-At: > > 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. >=20 > 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. >=20 > 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.