From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Idea: Be able to use text properties as face attributes Date: Mon, 27 Mar 2017 14:56:17 +0700 Message-ID: References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1490601412 15220 195.159.176.226 (27 Mar 2017 07:56:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Mar 2017 07:56:52 +0000 (UTC) Cc: Emacs developers To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 27 09:56:48 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 1csPW4-00031o-A6 for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 09:56:40 +0200 Original-Received: from localhost ([::1]:44930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csPWA-0006as-5r for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 03:56:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csPW4-0006aa-3Q for emacs-devel@gnu.org; Mon, 27 Mar 2017 03:56:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csPW3-0005GX-6h for emacs-devel@gnu.org; Mon, 27 Mar 2017 03:56:40 -0400 Original-Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:35455) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csPW2-0005Fh-Vh for emacs-devel@gnu.org; Mon, 27 Mar 2017 03:56:39 -0400 Original-Received: by mail-wr0-x22e.google.com with SMTP id u1so43277749wra.2 for ; Mon, 27 Mar 2017 00:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uogYV0/bKjOEZHshaVQM/cavLpr+42U9pcr7BO8PVLk=; b=SYiladMbgUleyuygeLHGaJLmcejrKKGqKbfVBFeWUr7uYe7QqBcMsp5r7wz+CCS3me W5VDLbXIKXMUfSYIkBowh4DHBeRuJIcoLrZNwYrVEfwDxbd3vb18DHRPZF0aKxgcKlcS pz0TLAsjG/4lxmAi0xr7VBxZKwKXLA8UEdwQTjd1OU5IXFh1L+lSffZeDnAkW3sb1ihN pjeneh9Mx32vVuNry0n1V8RG65XsTy2U3aJU92qnn+VHwxuu1/TcTf6ubTdYiI9oPEou lz4+bXzWWGqN/cWxgqe0I99BszlfdcjGf7aQgUGeWOYdR3DovN5+L5PJBXvPTP3Wc50q h2tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uogYV0/bKjOEZHshaVQM/cavLpr+42U9pcr7BO8PVLk=; b=XUv5bDe4wDSIozlYBKRPS50R3XFviwl1dLdNOGWiomzLN3mM5oTnfFW5nELF/TbTNm EqPcPCLGreSUgNYMcM4aqGmyWKpS7PTdBiVTTmYhpcy8+Nb4AxC4IYS4sZSKmWs5MxHn +2n3RS1D1m+mAnw5FEKChkTEBOLux2txhFPIPlvM27eyU0CpyJ8Lx504zH2mkDz5XKs1 Yo5RtKZV/3k/WJwmJXbpeIKJuBfW0e/C618T04KUtpjdlTea4xJVnbizeOEZaDeFb4kx v+aczChrs9+Xx3MyaZBaOwJJ3OUDmXN+MHCMJYX/m7vkdphoi7KYX25NYFzY0TCn7sh9 wAVA== X-Gm-Message-State: AFeK/H1y8TXGli+kSuanYc3ml9VGyXhlsJ6qFDjlo3eQnBt/vd7XcwAaTOSBTbucm/AYR89NqrnsW42mRpaU2g== X-Received: by 10.223.152.237 with SMTP id w100mr9703552wrb.72.1490601397553; Mon, 27 Mar 2017 00:56:37 -0700 (PDT) Original-Received: by 10.223.130.71 with HTTP; Mon, 27 Mar 2017 00:56:17 -0700 (PDT) In-Reply-To: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> X-Google-Sender-Auth: O1pAUtvpwHlNy0fQzZlvkCpbPvQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22e 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:213403 Archived-At: On Mon, Mar 27, 2017 at 2:14 AM, Drew Adams wrote: > The idea is to allow the use of text properties as > attributes for the text (and overlay) properties `face', > `font-lock-face', and `mouse-face'. This would apply to > faces used in strings (e.g., `propertize') as well as in > buffers. > > It would let you, for example, use a property such as > `invisible', `keymap', or `read-only' (even `display'?) as > part of a face definition. I can see a direct parallel between this proposal and the spirit of CSS. Basically, an Emacs face is analogous to a CSS class, in that it is a collection of properties affecting display, which can be added to and removed from a run of text atomically as a whole. Text properties, on the other hand, are analogous to applying styling properties directly to text. Which makes them difficult to control. > One open question would be whether to allow the text > properties `face', `font-lock-face', and `mouse-face' as > properties for themselves and each other. E.g., be able > to do this: > > (set-face-attribute 'face-1 nil 'face 'face-2) :inherit already does something similar.