From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Supporting stylistic sets Date: Sat, 24 Sep 2022 09:33:24 +0300 Message-ID: <83sfkhnux7.fsf@gnu.org> References: <83wn9up0es.fsf@gnu.org> <83illeou0j.fsf@gnu.org> <87sfkij6a5.fsf@gmail.com> <83edw1q5tl.fsf@gnu.org> <87o7v5jrkv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20442"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lumarzeli30@gmail.com, emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 08:36:09 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obylk-0005Aq-SG for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 08:36:09 +0200 Original-Received: from localhost ([::1]:55674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obylg-0000rK-UL for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 02:36:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obyjK-0007dZ-UC for emacs-devel@gnu.org; Sat, 24 Sep 2022 02:33:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obyjK-0007NE-MD; Sat, 24 Sep 2022 02:33:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=K0o8moBiW2u+a3K64AFgH+7MiMBgIWZTeV4j+P36Sc0=; b=F5lHMo3KiV333cB5SDzs cCFWCJz77HVhMTj45XqT7/vianDrqKvayHhLP8WUM4UqZHsX2dBY6GDzNL9vTxTYjmJD4PiPIQLAR FDjfDm8CT0sYZiE15ntyruD4EgxwjLd0QyS/OWzmB9HirYb8+hd+A4gvvzDvMlTA+EFje6J7GmWFJ jgsL4246K/KhSmHOYxOgdDKZl3/1J82NRagRFFkcuLW9ghGkOwc8xGzsz8W/RHemskuQ2waFIJ9yZ /42pVRg3IW1Bp70X0mmcFlttSuD7cyrtcS7zlUSHEApLEXCThev1Rn9Kue0fl7ggH1Ggad1PLElQd D/CCQRT1TW6OVA==; Original-Received: from [87.69.77.57] (port=3748 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obyjK-0000q9-2G; Sat, 24 Sep 2022 02:33:38 -0400 In-Reply-To: <87o7v5jrkv.fsf@gmail.com> (message from Visuwesh on Sat, 24 Sep 2022 10:29:12 +0530) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296115 Archived-At: > From: Visuwesh > Cc: lumarzeli30@gmail.com, emacs-devel@gnu.org > Date: Sat, 24 Sep 2022 10:29:12 +0530 > > [வெள்ளி செப்டம்பர் 23, 2022] Eli Zaretskii wrote: > > >> Unless there are performance implications, I don't see why using an > >> anonymous face won't work i.e., > >> > >> (propertize "text" '(face (:stylistic-set ("cv01" ..))) > > > > How is this different or better than having a special text property? > > It has the added advantage of being able to easily alter existing code > to use stylistic sets. E.g., if I want outline headings to use the > small caps set, then I can change the relevant faces which is much > simpler than writing new code to put the special text property. I'm not talking about changing the existing faces, I'm talking about the above proposal to use propertize. That is exactly equivalent to putting a named text property on the text, isn't it? IOW, the text property you use to request stylistic variants doesn't have to be 'face', it can be some other property specifically designed for this purpose. Using faces for this introduces complications and performance aspects that we had better avoided, unless we really must have this as part of a face.