From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Idea: Be able to use text properties as face attributes Date: Tue, 28 Mar 2017 16:10:45 -0700 (PDT) Message-ID: <976ce1bf-b7a1-4cf5-8206-ae81b35ce29d@default> References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> <30d920b0-e1de-497d-98de-8b69e835e855@default>>> <30eb5a49-2d98-4f37-8f8c-32a88cd76827@default>>> <83bmsm938f.fsf@gnu.org>>> <7f98847c-9b5e-47cf-85f2-247c2045d0af@default>> <834lye8s1k.fsf@gnu.org>> <93aa220a-35c8-4be1-bfb5-299c46c9eba9@default> <83tw6d785i.fsf@gnu.org> <4f28c64b-400a-4902-8d8d-84bab71a7c2a@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490742671 5126 195.159.176.226 (28 Mar 2017 23:11:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Mar 2017 23:11:11 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 29 01:11:06 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ct0GV-00009O-Fa for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2017 01:11:03 +0200 Original-Received: from localhost ([::1]:55617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ct0GY-0004FP-2o for ged-emacs-devel@m.gmane.org; Tue, 28 Mar 2017 19:11:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ct0GR-0004FH-VE for emacs-devel@gnu.org; Tue, 28 Mar 2017 19:11:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ct0GM-0006Rv-Pl for emacs-devel@gnu.org; Tue, 28 Mar 2017 19:10:59 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:29677) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ct0GM-0006Ov-DU for emacs-devel@gnu.org; Tue, 28 Mar 2017 19:10:54 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v2SNAmnA010301 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Mar 2017 23:10:50 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v2SNAmQ7029012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Mar 2017 23:10:48 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v2SNAlvd010091; Tue, 28 Mar 2017 23:10:47 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213469 Archived-At: > >> This said, I think using face attributes is a bad idea. > > Reason? I can be convinced, but only by reasons. >=20 > Faces (and face attributes) are handled by the display engine, which is > a delicate and performance sensitive piece of code. Messing with that > is tricky and can easily impose serious performance problems. OK. But if I understand correctly (no indication of that, I realize ;-)), the only thing the display engine would need to do differently wrt faces and face attributes would be to tolerate (ignore) any that it does not recognize (dunno what it does now - perhaps it raises an error?). Yes, there is also Customize, which recognizes only the current face attributes. Customize could be left as is, which would mean that you could not use it to assign text-properties as (pseudo) attributes. Or we could decide to support unknown face attributes in Customize in some way (i.e., let you enter them). I'm not including that as part of the feature proposal. Customization of a face is not where I see this feature. I see it in Lisp code or interactive use of `set-face-*'. > > locations. But my proposal is purposely aimed at > > FACES and where they are applied, for the reasons > > given above. It's not _only_ about packaging text > > props together to act on them in an abstract way. >=20 > I'd rather use another property, and then make > font-lock use that new property instead. The devil may be in the details - please elaborate. But a priori I don't see how that would provide the feature I described, which needs to work, out-of-the-box, with faces you apply (e.g., by highlighting, and _not_ just by font-lock highlighting), as well as with `set-face-*' commands etc.