From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: "Themes" shipping configuration - an unusual convention Date: Thu, 30 Apr 2020 09:49:19 +0200 Message-ID: References: <863691n4xl.wl-me@enzu.ru> <87imhw431x.fsf@yahoo.com> <87mu78huhx.fsf_-_@yahoo.com> <87k12bdgx7.fsf@yahoo.com> <83zhb6grtq.fsf@gnu.org> <83ftcwgb07.fsf@gnu.org> <291bb5b2-92d5-85f1-57d8-895eed14ffc2@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20372"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Emacs developers , =?UTF-8?Q?S=C3=A9bastien_Gendre?= , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 30 09:54:20 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 1jU41U-0005AI-58 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 09:54:20 +0200 Original-Received: from localhost ([::1]:34806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU41T-0003pG-7g for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 03:54:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU40Z-0002z6-22 for emacs-devel@gnu.org; Thu, 30 Apr 2020 03:53:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jU3zZ-0004M3-9O for emacs-devel@gnu.org; Thu, 30 Apr 2020 03:53:22 -0400 Original-Received: from mail-yb1-f182.google.com ([209.85.219.182]:43714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jU3wr-0000Fe-3F; Thu, 30 Apr 2020 03:49:33 -0400 Original-Received: by mail-yb1-f182.google.com with SMTP id o198so2693764ybg.10; Thu, 30 Apr 2020 00:49:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZJHc3RCEIFSMDKzpQU/K/0uDuhTbqZnWf5gHeNmFIQc=; b=ajFMAyMvtD1JQhBzyXAbsnfnGTIf5FA7jaFF3oqDztQF3PVsDoDL+iiS4HtzItFM4E BdTueWwQTKj4ObOKhyCj835zzMy/9MIFBjiMRLvwjBySQ9ZqqLbfums7TDRVpIfJN4ls kRC2SAI6EpbxplxM0ueP3shm727PnGLovXNktWp4PxJq1O9704VFyqKrTst05kpMc7zO 1YR17eHY/QiyWFw8gph/lsD2LhkAsx8ksZRcscHWwfsM3ADXhBrZl9Q7008AtNUOxLDl ZhLpnnrErpV2fCUO7zHiXSVa0SgmXmjkuwrMzahyh/Wfp8wt1AFkeojjgZKHL0b+I3ZR PuNA== X-Gm-Message-State: AGi0PubvBLHaF9hVmJWt4PUAEqUAuWBhCH1HVD2M3YHDTg2hhiXE8TWK uEWeu+MvG1UE8Pj7itljRfz2vm+9oar6x2YghRE= X-Google-Smtp-Source: APiQypKKUbN0qV+k0mbnIylUi+Bth6XdI0eunibaYBR0IPc/6R3aY60OPS9ydmWBee+IEQf7tEFfXP0icwowVjxtuU0= X-Received: by 2002:a25:c646:: with SMTP id k67mr3607200ybf.309.1588232971738; Thu, 30 Apr 2020 00:49:31 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.219.182; envelope-from=stefankangas@gmail.com; helo=mail-yb1-f182.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/30 03:49:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.219.182 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:248216 Archived-At: Stefan Monnier writes: > > The pre-configuration could contain just one line: > > > > (require 'shiny-settings) > > Nitpick: `require` is *really* not the right job since just loading > a file should not change Emacs's behavior substantially. > > Ideally, it should be a custom-theme, but second best could be > a minor-mode. So a theme can be used to change configuration, and indeed this is the recommended way to do it. Interesting, and news to me. But is this a good convention? I'm not so sure. AFAIK, all other applications I have used understand "theme" to mean a "package containing graphical appearance details". This definition from Wikipedia: https://en.wikipedia.org/wiki/Theme_(computing) I don't think users will expect a "theme" to modify the behavior of Emacs. There are usually things called "profiles" where one would save or load settings from. This means that if M-x load-theme changes the behavior of Emacs (significantly or otherwise), they are in for a surprise. I would propose to change the convention such that a "theme" is only meant to modify "graphical appearance details". Not behavior. (From what I can tell, all themes currently shipped with Emacs follow this convention.[1]) We could introduce a *separate* convention, called e.g. "custom profiles", which are understood to also change settings. They could have their own directory in our tree called "etc/profiles", and separate commands to load them (say, M-x load-profile). Of course, a "custom profile" could technically do anything a "theme" does and vice versa. Just as a 'require'd package can technically override any face, enable viper-mode or whatever. But we should discourage that. Best regards, Stefan Kangas PS. If anyone can point to an example of a "custom theme" that ships settings, it would be interesting to see it. Footnotes: 1. The exception is some variables related to graphical display, which is not unusual or surprising to my mind.