From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : Re: Defaulting faces to inherit deemed harmful [was: Stealing a default face from a non-ELPA package] Date: Sun, 6 Mar 2022 02:35:39 +0000 Message-ID: References: <87r17gkxvg.fsf@gmail.com> <83h78cgpbw.fsf@gnu.org> <87tuccdn1q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31087"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Tim Cross , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 06 03:36:35 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 1nQgl8-0007t4-KV for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Mar 2022 03:36:34 +0100 Original-Received: from localhost ([::1]:53764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQgl7-0002tZ-CL for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Mar 2022 21:36:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQgkR-0001iL-Cr for emacs-devel@gnu.org; Sat, 05 Mar 2022 21:35:51 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:57670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQgkO-0006S3-L1; Sat, 05 Mar 2022 21:35:50 -0500 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 225N8CX2019187; Sun, 6 Mar 2022 02:35:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=/5DVzbfr8zwuGUpDPTkjMD2qopaY3lwJKFBnBFrK4QU=; b=gPCVQh31VXWs5qq7fjZPSlCN+Ad8hqZd/0XkqCeGJ7nms+w4ebLBlg2UwC7zXmJHxwhc No3fnoAvj5XWHncYuC3BPI5UYoFYHaRCDwKgUBmd1/VJUJVWB7IvlqeIFf25TUeXJ0eE F1c4/yGYgE1qkooKzu1fHoL+FPHry9P2oAJTPYBTc/3GDnUqxFUSYyfHDX4SndtcBFRy W8lXEPAEZT1HHjBgfvyYJC1u/wrY7a5sMxw20s5Zayg1zHn+B0l3XbQBDW6yZMc+RDHT 83AlkbZjWes2dZWbmwgcNDH22OmH/av5gsJlV09bE6vtYBsgWSIo/S4csCyUQfB4mrk9 Pg== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3em0dts6jv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Mar 2022 02:35:42 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 2262KxKp098138; Sun, 6 Mar 2022 02:35:41 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2176.outbound.protection.outlook.com [104.47.55.176]) by userp3030.oracle.com with ESMTP id 3ekvys01vj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Mar 2022 02:35:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aCP0EwSt98L5e1Qf3Xg03VvT0Tlgwe3PTWHqebSNnUy8cyKTHlTava3g7DPae7IarrApuDU6IHSms7Bffic5pQJM2Sg27mqYv3qe54NJvyKmhxAw/Aj0DIhYpV3zaKAVXeqLfxjNKMYpDhfZhFYCaPU7coZpA9WNLVTck8RNQglkYvEn9yE45R8mybjjVZzieomC5jFQwV3QFN9dygb0IzvDHZmdWJcZ+Jdh4uV8X9m7w2vgrth2fgu6BvX+C2Tzepmf0FpCnCOVs8/xADKo6INGZ7UPkBjUPs1gYc+o3NJbY62TZNB/7Nzg2FVl4i43EiJ+Pi70fTV0eYT6rNHFRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/5DVzbfr8zwuGUpDPTkjMD2qopaY3lwJKFBnBFrK4QU=; b=buTTmyVMPTtZDOkyWAU3W2biONhlizibj7LsUSGvW/zXnotWXJAku5EuLusTdhnnfd/S8ZgBoK3BZCso45G5aLXFrifHUtv7dPNtn7Hwv/MPnTC/+6NrUbOZwOWX1CFYxehKElUNkhIrA60Z2O+G1Xkd68TV/4GsdTjVZ/ARbPn0QoRywvRq22sIPewCoqOoZOGpx4uSvJTaxOidc7oiq634OE0c3udvT8hn5XQhu1rz646LU6NLlKOj73Lv4ICxWTxX6Vx19i/v9p9GmV1glu87wGd5+R34IFN/AzXw/xfLhuea+cQWot2GW2cxjCunLVdPEeAZZKjHV3LQeV8j9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/5DVzbfr8zwuGUpDPTkjMD2qopaY3lwJKFBnBFrK4QU=; b=JcKn6Nxepq4yRuP5jE/DySnrOkpIw8zcOhasDAwEFJzSg/INT33c+x7rmjpPyIH7NT9qcjnhejxW59j7FP9kpxxH49MOJFfP86VbN/ey8hlY2WLw/S8gvucefjC3fYVGhCNzohSETrFOJ8oV7RY5RN6w28yyLOOqlA2lkZBwsUk= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SN6PR10MB2720.namprd10.prod.outlook.com (2603:10b6:805:3f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Sun, 6 Mar 2022 02:35:39 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::f811:66c9:41ab:df79]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::f811:66c9:41ab:df79%9]) with mapi id 15.20.5038.026; Sun, 6 Mar 2022 02:35:39 +0000 Thread-Topic: [External] : Re: Defaulting faces to inherit deemed harmful [was: Stealing a default face from a non-ELPA package] Thread-Index: AQHYMOSNQFgmR/ZOPUq72+5w77lsMKyxmdUw In-Reply-To: <87tuccdn1q.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a51f5f8f-c5ac-4839-d68a-08d9ff1a0074 x-ms-traffictypediagnostic: SN6PR10MB2720:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BxKglwFoyIYjuh3cMjL7d9kFBG0HEIbmd7OMvoCCUcTq+t4M0lqdu6KTKCFzgGtGFblUAekppgZ1JzyF2eLWum0DKx/EpCjYb/Kgkr91LL0UkVoNyy48iTFTYYKzZFYNRI/sdgIFm7o40u1COAPaBSs/scdjCFWs1gF2YWnwbkbJMedYGOpMklM4bEYDQNk1hwYXZHJlSbdHT+QdCpkXa0vkLIMxUDbEI90HgQ6c8RfjETTvowfz7DtGRaiMLEA+6HE94ujC1LlC3uTWX3tO1tjnqDK2aLMgqeFo8NpWRFMhR7nn7LUMn8dOzHnW8cB8Pw9v81OfEr6+Gws//SueKDd3Mp0TW8PLIvFwMzSHjD7EDmSGRqpXF1q1JvjKutoIasxo3dBFV6PSAuzdH2+3sgRvSnrviuZ78dOnnrOcIQFW1SMXxvf1+kRYdRtJx6KOFKp5XDjBqLS3OM7bbZg8NVIQ6T0ucXvFpViODAc5bfZUSvX1aKkQP9UAw4CAG2IRPw1TYePuQkYgssej9+hYTEr7f7hjLIznAA3YPfMGME3pANtTlkHVXc9c6yOBZR6AvuLD1Guqo6pgX9ji7fW5IxR7/3RmSu5FQEsKCSUfISUzyytNf83HhQnmxl758g9Mpsa1KAZs6Ko1fJa8HdyEZ6bC01l/L0ohI1ZLzQw7MrpuBudUZXksuPHt2Cq8idnb6NOv+DqTAg81y0KIt8rVCg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(2906002)(33656002)(9686003)(316002)(52536014)(71200400001)(83380400001)(508600001)(55016003)(186003)(86362001)(38100700002)(38070700005)(66556008)(8676002)(4326008)(8936002)(64756008)(66446008)(66476007)(66946007)(76116006)(122000001)(6506007)(7696005)(44832011)(110136005)(5660300002)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7TAUNul1kFXU74fCO37JY3Tvz8kuGPjclDAkWh+N1z0LQ7ZY6+WD00s9Yr5G?= =?us-ascii?Q?pVvV3LbMCq4qpM/ABq8QPTcSdpmL4OqVN/rlSKoJp5/TUY+qEekD5oqdrkF6?= =?us-ascii?Q?PaFMXEzcyEeCpMu+8ROfjmxQmlANOPg+f00k3qSessLbr9qutxgwxY4Qt09r?= =?us-ascii?Q?Wn7ouzIFjHYdkCxzsY3u227e8Eh/AvKMkumMdUuZbqqAiqM4QO4x+jqzkSN9?= =?us-ascii?Q?B60An+QVC4mdvTooIzzkfjcZvMEPRyIaYWMuOfuATuHViF1QMCUWSiGrn05v?= =?us-ascii?Q?WmW3//X7yDdCNd58Ibp0TQghNswK11NkiwqSL7cqb/nyxQROzhGjJWGbaHLs?= =?us-ascii?Q?mv6M9r/4eH4shBRtOc9UdcBXqcNTnKtRRzJCqWKjNnQ1aj7ILUX5ZJ0l5glE?= =?us-ascii?Q?Ee7kebCouD5a47RGD7FeElwD9Cv/NZ6w4FwLpBq0UL4Ql6TgzvL1Ea3XNlmi?= =?us-ascii?Q?xiAuw+/oMR75hUyNLSDaTAW6AHjZYlzziiiVSFEUyJRosh0P5d516TxxxUi2?= =?us-ascii?Q?ffpnoUMOgqPZB64VVQGaSvC+es5d3pl9INc0kVP/qppqBq2Vb3MJbaY5xdKe?= =?us-ascii?Q?7oHptpwWoN+rPx4AmmDWliGHhoaMFOcG3g3Jn8PE+SdCvPyR44lGxd2Qa6u1?= =?us-ascii?Q?i6 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a51f5f8f-c5ac-4839-d68a-08d9ff1a0074 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2022 02:35:39.0588 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: txVP7kHzb6+R8/7JqSqQjXqSNZVOtMVkdMBWSsPrRkGF1Lu+usQUr5pO+LRN3YLzV8UX15caTh6bjFqzcTKugQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2720 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10277 signatures=690470 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=964 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203060012 X-Proofpoint-ORIG-GUID: X6nH5qmrA0kLlhkjO8IVwbQIZgcagMoN X-Proofpoint-GUID: X6nH5qmrA0kLlhkjO8IVwbQIZgcagMoN Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:286847 Archived-At: > Well I don't have a problem per se. I was mainly responding to Drew's > claim that defining faces to use inheritance was harmful. To be fair (in spite of the abbreviated and tongue-in-cheek Subject line) what I really suggested was _less predefining_ of faces with inheritance. I responded to your post saying you would prefer that "_more_ packages would define their faces in terms of inheritance from standard/built-in faces." Where you would like more to do that, I'd like fewer to. > The issue is many packages only do an extremely simplistic > default face definition. If "simplistic" means not imposing inheritance by default, then good for them. In general, it's better not to couple a face's default definition to another face's definition (for the reasons I gave). > For example, just setting the foreground to a colour which looks good for > the theme they are using and not using the facilities available to set > the default based on whether the user is running in a GUI frame, inside > a terminal, on the GNU Linux console or whether they are using a dark > or light theme. That's something entirely different from=20 whether to inject inheritance into a face's default definition. I happen to agree with everything in your last paragraph. It's just unrelated to whether it's good or bad to define face X as inheriting from face Y by default. Except that of course any decision to inherit from another face by default should involve attention to the things you mention. The same attention should be paid when considering all face attributes. > I suspect this is because doing a proper default face > setting which works across different environments and light or dark > themes can be complex. Yes, I think so. The same problem exists for defining the types of defcustoms. Many, many (most?) could stand to be refined a bit, to be more useful. > If on the other hand, their default just > inherits from one of the built-in faces which typically do take=20 > these factors into account, it would provide increased consistency I suppose that's true. But that's another lazy way out - like what you decry - even if it's more likely not to be flaky. > So basically, my argument is EITHER define the face so that the default > works well regardless of whether the user is running in GUI, terminal, > console or a light/dark theme Just leave it at that. The message should be to just take face attributes seriously when defining defaults. Including :inherit. > don't just make the default a simple :foreground "xxxx", which will only = work > well if the user happens to use a similar environment and light or dark > theme as the author. It's really not that hard to choose a default color for dark if you only use light, or vice versa. It's best of course to test/try both. But even just using a color complement for the opposite `background-mode' can be pretty good. (And it's simple to obtain: `color-complement-hex'.)