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: Wed, 29 Mar 2017 10:08:17 -0700 (PDT) Message-ID: <747af9f9-78a9-4ecd-8072-487fd13187db@default> References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> <83h92e93ip.fsf@gnu.org> <8080a162-700f-42cc-aec9-5fdd7c646297@default> <8360iu8sdm.fsf@gnu.org> <19e94d18-656f-4a8f-8843-4d46ffdd037b@default> <83shlx782i.fsf@gnu.org> <403a3ff2-464f-4eb5-9843-60592e786955@default> <83a8846srr.fsf@gnu.org> <807bb748-55c5-57ab-3442-b60fc31859a8@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 1490807322 25255 195.159.176.226 (29 Mar 2017 17:08:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2017 17:08:42 +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 Wed Mar 29 19:08:37 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 1ctH5E-0005fV-CP for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2017 19:08:32 +0200 Original-Received: from localhost ([::1]:60110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctH5K-0000FY-3h for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2017 13:08:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctH58-0000BH-2R for emacs-devel@gnu.org; Wed, 29 Mar 2017 13:08:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctH53-0000Q2-W1 for emacs-devel@gnu.org; Wed, 29 Mar 2017 13:08:26 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44205) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctH53-0000PM-Lo for emacs-devel@gnu.org; Wed, 29 Mar 2017 13:08:21 -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 v2TH8JTp018029 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Mar 2017 17:08:19 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v2TH8IGA008417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Mar 2017 17:08:19 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v2TH8I9n020847; Wed, 29 Mar 2017 17:08:18 GMT In-Reply-To: <807bb748-55c5-57ab-3442-b60fc31859a8@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:213507 Archived-At: > > (defprop my-prop '(:read-only t :invisible nil :font "futura")) > > (set-text-prop (point-min) (+ (point-min) 4) my-prop) > > (set-text-prop (+ (point-min) 10) (+ (point-min) 20) my-prop) >=20 > I think that's what I proposed in response to Drew's original message, an= d > what Stefan suggests (it's a natural extension of overlay categories). > But I'm not sure it's what Drew had in mind. >=20 > Specifically, Drew (IIUC) would like *faces* to behave as these > hypothetical 'defprop's. This way, all the existing machinery > on faces could be reused. Yup. Reuse all of the "existing machinery" provided for faces. _And_ (as in Lars's example above), manipulate named bundles of props. Those two things combined: (1) use _faces_ (2) as the objects that _encapsulate a bundle of properties_.