From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Theme generator Date: Thu, 17 Sep 2020 16:25:53 +0200 Message-ID: References: <87mu1ra1ej.fsf@protesilaos.com> <87imcf9wfp.fsf@protesilaos.com> <986EE32C-55D8-4A39-B556-872A5F49448E@thornhill.no> <31d12210-1b36-4306-8f79-43f6b4549a9d@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22249"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Gerry Agbobada , Tim Cross , Stefan Monnier , "Gregory Heytings via Emacs development discussions." To: chad Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 17 16:43:58 2020 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 1kIv8f-0005dZ-V0 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 16:43:58 +0200 Original-Received: from localhost ([::1]:45472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIv8f-0007ik-12 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 10:43:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIurI-0002F0-OG for emacs-devel@gnu.org; Thu, 17 Sep 2020 10:26:00 -0400 Original-Received: from mail-am7eur06olkn2079.outbound.protection.outlook.com ([40.92.16.79]:50784 helo=EUR06-AM7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIurF-00046j-Vb for emacs-devel@gnu.org; Thu, 17 Sep 2020 10:26:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yojp1Glvtlj751yIdOVQVPfxhYPcFBR2pbcvp20NxAB4d68sZSAXVRKz9lC7SpOCvJDiehYkzim19bmzaLZrC4Kqqb4oA1wGj5zaC4C8uOLlxVaU+Cea1ByBWf4oUhlqxh7LHUxPJ7q/AGDayfp3Ui/RoVnLYx3N/1132emULu64MDhT73OW7qaeNS2hGYApfk4GOXeeBig3LALdUjYo52es63yOmwH2R0Bz/fc4RKLul9ihr0w8dKW0jUmAEKAXx7qaVC4mdnG7tVfo1mz/RtBS+1QSFpRdEelB/8WkbUjPFF9RJYl9eXbYtwo32XaVym3M40x09EzHkjrtNUHuQw== 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-SenderADCheck; bh=DomxlLLFJXryPJ1tp63zzpnJHNqxg8p86utWEDxiD7U=; b=MLN53nWAEQ3JNYOr1oFPjjoce0d7GMjUMYb86xMqv+T4oJ5uxIjXlVl/tH5ymgppRKx6+E3whDei3kVbpqb5isE//cGSwdIZQ/7BpRdxXfwzZx36Y6iEEzdgNYv/eUD5qRrAn47iX5PcFWeHzca3pXwxTwTnuTePFKYHLLh5a5rSTKSWPMgGYDxVTn8n7Bzoyuf6b07/69ue+/srQnEXfOoJIEoO6HLyKc1UFGOtZ7GtGz4CgOctPO201l2BzsGmRXv2di+25xg8sVaZwc9UUUeXSqSDPM8T1BQgPh4YR1NGKoGHHzYwSoqIlCOLkCZx0m59HXaf4w1FdziUJDEmVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DomxlLLFJXryPJ1tp63zzpnJHNqxg8p86utWEDxiD7U=; b=LX8YHAmpoGqSK6gPLpobHyJfAGqczwyBnpSfnYwdj/pDAn0hv/74elLOwCE89dDD4o1lvwwbVxF4g4v2hLrk9qgSRrbS5h+SldGWcOeY0yPxTRI7cndZos7LZPnB2tZsPq+livKX8kVWgSumUvUwgEkv/P6LkXg2JH6abeZBhdTscg1sydCX4loocVh6Gg8OR5g7lGSbGyGxT9iHJ5YpzsjD+aMwL5FjesX9itNL6nCvzRq7X8uuuKndcP2sdRQLqLygyCjxcjFjug8s9zPnclfB4sBE7nVx02U9Ma5IrV6djPoLp3d/+dPY8W3piPiAyNT4YPQ+zfVQxGJ41gfl9A== Original-Received: from VI1EUR06FT007.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc37::43) by VI1EUR06HT109.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc37::449) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Thu, 17 Sep 2020 14:25:55 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:fc37::45) by VI1EUR06FT007.mail.protection.outlook.com (2a01:111:e400:fc37::219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Thu, 17 Sep 2020 14:25:55 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F7CCA75CC8A26C3AB2D25F922CFA8B64CE071E5C7A2BDA7002CB9783A53D1E1B; UpperCasedChecksum:2F05B9348CF10D81B3AC31ED861692D656C5486757C4F5745504DAF46AE69857; SizeAsReceived:8066; Count:47 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487%7]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020 14:25:55 +0000 In-Reply-To: (chad's message of "Wed, 16 Sep 2020 17:25:15 -0700") X-ClientProxiedBy: AM5PR0402CA0009.eurprd04.prod.outlook.com (2603:10a6:203:90::19) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87pn6kiioe.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM5PR0402CA0009.eurprd04.prod.outlook.com (2603:10a6:203:90::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Thu, 17 Sep 2020 14:25:54 +0000 X-Microsoft-Original-Message-ID: <87pn6kiioe.fsf@live.com> X-TMN: [xwpJc2yBJttloa0EpKqDotUGvG7atf6n] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e30b0355-da09-4570-b84e-08d85b15963e X-MS-TrafficTypeDiagnostic: VI1EUR06HT109: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q70de861TZECsgHuENbzZWq5XwHqWytMUwdTacPHtHbpfcolrVbn+X374pfaA1BnnG3G7tRYfwqdhpejRGh0qPXFZK4pjUpl8WAFJ2GOifrhzIVi0qHDslUQkVEwq9kMIaG2YH0oExjOTFTcuqTjIz64CMK3cy6jEGC2D+aoe8KsYyzfjl7UPTPwrleYUcO4tM7caVwWo4KaO0MPZ+RW768ChavWSrtW4lquB46tyO1KlFe+RzP1Nx3+BFuUm+x+ X-MS-Exchange-AntiSpam-MessageData: pJd+38cIOWhuZ4YDoFsGJQ18ewYRYBW0WFTNR+8XnAXUhvZe3wSj4Q+/BtgqcvBWSeQIsmPto0yqKZxEB8lLEz18yfLiiBKhZjvY7q5aLiWZ0iq/hCttHCu2AbbiTw+hjlrro3MZqTcRN8ORn61nPA== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: e30b0355-da09-4570-b84e-08d85b15963e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2020 14:25:54.9966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR06FT007.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR06HT109 Received-SPF: pass client-ip=40.92.16.79; envelope-from=arthur.miller@live.com; helo=EUR06-AM7-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/17 10:25:55 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:256005 Archived-At: chad writes: > On Tue, Sep 15, 2020 at 6:49 PM Tim Cross wrote: > > At present, while you have all the power to customize faces, it isn't necessary easy to get things consistent. [...] > > The spacemacs setup also has a pretty straight-forward way to tweak existing themes with their theming-modifications list, > which makes it easy to tweak specific settings for specific themes (and ensures they are applied when themes change or are > re-loaded etc). > > I recently tried to do a very similar task in a way that didn't feel hacky. I set myself a pretty short timeout, and didn't make it, so > this idea sounds interesting. Digging in, I found this example (link to github): > https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Bthemes/theming#example > > (defun dotspacemacs/user-init () > (setq theming-modifications > '((monokai > ;; Font locking > (font-lock-comment-face :slant italic) > (web-mode-html-attr-name-face :inherit font-lock-variable-name-face > :foreground nil) > ;; Modeline > (powerline-active1 :box (:color "#999999" > :line-width 1 > :style released-button) > :background "#5a5a5a"))))) > Here is visible what is a problem with current theme engine: > (powerline-active1 :box (:color "#999999" > :line-width 1 > :style released-button) > :background "#5a5a5a"))))) In order to syle an element 3rd party package will specify raw rgb values for an element. If theme-engine offered parametrized names like say, :color color-scheme-foreground instead of #999999, then when user sets a color for the color-scheme-foreground the element would pick it up from the theme and there would be no need for 4th party developer, theme modders, like base16 or Solarized devs, to look at the code, and re-style it in their own code to bring that package into their theme. See for example: ;;;; powerline `(powerline-active1 ((,class ,(if solarized-high-contrast-mode-line `(:background ,base00 :foreground ,base03) `(:background ,base03 :foreground ,base00))))) `(powerline-active2 ((,class ,(if solarized-high-contrast-mode-line `(:background ,base01 :foreground ,base03) `(:background ,base02 :foreground ,base00))))) `(powerline-inactive1 ((,class ,(if solarized-high-contrast-mode-line `(:background ,base03 :foreground ,base1) `(:background ,base02 :foreground ,base01))))) `(powerline-inactive2 ((,class ,(if solarized-high-contrast-mode-line `(:background ,base02 :foreground ,base1) `(:background ,base03 :foreground ,base01))))) as found in Solarized: https://github.com/bbatsov/solarized-emacs/blob/master/solarized-faces.el Thomas "linuxteam" suggested to use faces instead of colors, which probably is even better then using just colors, albeit it might be that color framework is needed at lower level to customize faces. I am not really sure, since I am not so acquainted with face-machinery and how it really works (yet).