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: Sun, 26 Mar 2017 16:26:55 -0700 (PDT) Message-ID: References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> <8800c317-f4c1-d1b2-a9cf-c871d6190c53@gmail.com> <2c5fce4c-c79a-41f7-9162-e99148665be5@default> <3b32260c-8ad1-2cd2-f387-bf3df3322354@gmail.com> 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 1490570868 13933 195.159.176.226 (26 Mar 2017 23:27:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Mar 2017 23:27:48 +0000 (UTC) To: =?utf-8?B?Q2zDqW1lbnQgUGl0LUNsYXVkZWw=?= , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 27 01:27:45 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 1csHZY-0003Ca-FB for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 01:27:44 +0200 Original-Received: from localhost ([::1]:43202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csHZe-0007mm-4e for ged-emacs-devel@m.gmane.org; Sun, 26 Mar 2017 19:27:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csHYv-0007mg-UG for emacs-devel@gnu.org; Sun, 26 Mar 2017 19:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csHYs-0007zT-Rc for emacs-devel@gnu.org; Sun, 26 Mar 2017 19:27:05 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:47487) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1csHYs-0007z8-IW for emacs-devel@gnu.org; Sun, 26 Mar 2017 19:27:02 -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 v2QNQwVo002518 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 26 Mar 2017 23:26:59 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v2QNQvCn009725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 26 Mar 2017 23:26:57 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v2QNQuCZ010712; Sun, 26 Mar 2017 23:26:57 GMT In-Reply-To: <3b32260c-8ad1-2cd2-f387-bf3df3322354@gmail.com> 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:213396 Archived-At: > > That might be another possible enhancement. But I think > > that is already possible using an anonymous face (see > > (elisp) `Special Properties'): > > (put-text-property 30 42 'face '(:family "Palatino")) > > Is there something else you were thinking of here? >=20 > Not much: it's just an idea I had while reading your post. it seems > somewhat arbitrary to add a level of indirection for certain properties (= if > I want to make some text bold, I need to append to its 'face property =E2= =80=94 > whereas if I want to make it invisible, I can just apply 'invisible to it= . > Maybe the two concepts would gain from being unified ? OK. As I said, that is really a separate enhancement. I have no problem with it. But for now we already have a way to set properties, including such face-attribute properties, at individual text locations. What we do not have is a way to set properties at all locations of a given face. > > Maybe you could elaborate, e.g., with a (fictitious) example? > > Maybe show what else you think is needed for that, beyond > > what I suggested. >=20 > I think your proposal would make what I described possible :) I don't see how. It seems like another code change would be needed to support it. Not that both could not be done at the same time, but I don't see that what I suggested, by itself, would also realize what you suggest.=20 > I was describing a possible generalization of it ((1) suppressing > the distinction between text properties and face properties, and > (2) generalizing faces to be collections of arbitrary text properties =E2= =80=94 > your proposal is essentially (2), and I think it enables the conceptual > cleanup (1)). Like my suggestion, the conceptual change would require both a code change (to support it) and a doc change (to express it). If both enhancements were made at the same time then yes, the doc change for my suggestion would be different. Again, a priori I have nothing against (someone) making both changes. Thanks for thinking about this.