From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Idea: Be able to use text properties as face attributes Date: Sun, 26 Mar 2017 18:14:09 -0400 Message-ID: <3b32260c-8ad1-2cd2-f387-bf3df3322354@gmail.com> References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> <8800c317-f4c1-d1b2-a9cf-c871d6190c53@gmail.com> <2c5fce4c-c79a-41f7-9162-e99148665be5@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1490566489 21665 195.159.176.226 (26 Mar 2017 22:14:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Mar 2017 22:14:49 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 27 00:14: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 1csGQs-00050P-ER for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 00:14:42 +0200 Original-Received: from localhost ([::1]:43054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csGQy-00010b-Gr for ged-emacs-devel@m.gmane.org; Sun, 26 Mar 2017 18:14:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csGQQ-00010V-LP for emacs-devel@gnu.org; Sun, 26 Mar 2017 18:14:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csGQN-0000nI-Fr for emacs-devel@gnu.org; Sun, 26 Mar 2017 18:14:14 -0400 Original-Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:34171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csGQN-0000n6-Bx for emacs-devel@gnu.org; Sun, 26 Mar 2017 18:14:11 -0400 Original-Received: by mail-qk0-x230.google.com with SMTP id d10so19296057qke.1 for ; Sun, 26 Mar 2017 15:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=nEHnhtVSkeYuPMnQ9ILT6jFXBOJ+psJkb7iKTYcbA0M=; b=Ft7xdHRaCQMLVUlQzr5xrjob9677440ObUfpzs1w0xJMxVUi4XF28VZooywVIZsjXL SZLGNvu0CuBua+fB6+h2Fl0eTWmXZnwrYEroZNRiJXk/2Bi7vG6KAjBW7okG3DPNZbNg TXN6XU5WR+U/C/4j8f6M0+D2dB+qscQuYgflAANFayy4387PS3SRhC+XmtZ4OuI7Oj0k geN4r6QHSD/FSMGYtfLKVg3LSO+dCgYoVYsvEaD8s5iIUkBxysFthRPDEVMyzqpOTvGt 2pECpd29cO/4jRrdbZPg4lr05HGf+r9XMc4iRIleFGXNdj6bAL5V7p4R6XThFf0cqCfS /GUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=nEHnhtVSkeYuPMnQ9ILT6jFXBOJ+psJkb7iKTYcbA0M=; b=lwkw98eyKSpiwxpwTImNL7UXx5UmhBM8WlCXmDCvif8gto7bu/igds5m7wfNYVkuo/ 8YUid8i8KMRcZHM+TEmWVARsQOU65RSrWUUDbYbbL51JXHXgR10FEVRMJzLM0f46qB0c 2IB4Y+CWv9iQqvV+pRic4PCYYqRyDK9kvD1g4i1X9eVD6vc1pLycdwEwkLSt0Fk19ZHq k/PmPsGAem4MItqdjCCFZhkVTm7fDaCLCsbxuRgZ8c1JYqSuJEREQFoNvtUxHICRiWHV voLSeEGaivLs3LxV3MykGrSuxPb11BE2OlpoSIsj4six0EKQImlhx12v09e8RBJVEzx5 qu3g== X-Gm-Message-State: AFeK/H3ku3lVj6jahcJ1GCPuCFqCJI+dXXrwA/z0jpoKXQGmCEHeHkugLqmkXGE1/gRlyg== X-Received: by 10.55.64.74 with SMTP id n71mr16622231qka.250.1490566450892; Sun, 26 Mar 2017 15:14:10 -0700 (PDT) Original-Received: from [18.189.26.125] (dhcp-18-189-26-125.dyn.mit.edu. [18.189.26.125]) by smtp.gmail.com with ESMTPSA id k51sm6612314qtf.31.2017.03.26.15.14.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Mar 2017 15:14:10 -0700 (PDT) In-Reply-To: <2c5fce4c-c79a-41f7-9162-e99148665be5@default> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::230 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:213395 Archived-At: On 2017-03-26 17:42, Drew Adams wrote: > 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? 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 — whereas if I want to make it invisible, I can just apply 'invisible to it. Maybe the two concepts would gain from being unified ? > Maybe you could elaborate, e.g., with a (fictitious) example? > Maybe show what else you think is needed for that, beyond > what I suggested. I think your proposal would make what I described possible :) 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 — your proposal is essentially (2), and I think it enables the conceptual cleanup (1)). Clément.