From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Why is custom--inhibit-theme-enable not t by default? Date: Thu, 14 Jun 2018 07:21:21 -0700 (PDT) Message-ID: References: <10b7bd657091b074d8da1bf1ae35b1f4.squirrel@dancol.org> <83h8m8owp2.fsf@gnu.org> <48a7bd1277a18dd0a68d06cd8b022062.squirrel@dancol.org>> <83vaao3qrn.fsf@gnu.org>> <874li63iit.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1528986063 2033 195.159.176.226 (14 Jun 2018 14:21:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2018 14:21:03 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 14 16:20:59 2018 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 1fTT7S-0000Mc-Tp for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2018 16:20:59 +0200 Original-Received: from localhost ([::1]:40971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTT9a-0005mP-1O for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2018 10:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTT83-0004kv-0a for emacs-devel@gnu.org; Thu, 14 Jun 2018 10:21:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTT7y-0001Vc-2h for emacs-devel@gnu.org; Thu, 14 Jun 2018 10:21:35 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:56340) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTT7x-0001Uy-PG for emacs-devel@gnu.org; Thu, 14 Jun 2018 10:21:29 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5EEJBDm119196; Thu, 14 Jun 2018 14:21:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=Sa+wsOMLTRQE3Mr441dKvkH+FpKB4uqyBEOYABjOCL4=; b=oj9kk3H8uqSfpPyNa8eShJO+1ZT8D0fjyM56Vp7q62TshoihLrBs5PX/Oq5cXgsvqrzk whG0apOv+a2dafsCJqXpU3fXPoeAY3DER4ZAjpo7oUnUv/cFdhveEPBzM7+0lmYTsdNw xoyer043vheS4FTNFwK1HeZzluQCH9uEBXnlmIKJ4O0cWNtQ64IAZp1AGVEJfOOuEs0x FvuPO1JE4VxU7M1kWfRNma4C/KuT9t49WZ8z5PVDW4xN62N5caOYuXClASS9bVPNnXG8 8EeN8w7vZWjVfsX3/30RowzS9j9hx2TKitzHQcbNFW8Eup7PaMXoHBleRGmDKCm/2NDM nQ== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2jk0xrdanw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jun 2018 14:21:27 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5EELQTw006960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jun 2018 14:21:26 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5EELPaN006351; Thu, 14 Jun 2018 14:21:26 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=703 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806140159 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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:226314 Archived-At: > > > > Doesn't the command disable-theme undo the application of a > > > > custom theme? > > > > > No. Summary: There is no function that takes a snapshot > > > of the Emacs state (even, e.g., as a custom theme) before > > > applying any custom theme - which snapshot can then be used > > > to restore that pre-theme state. > > > > Perhaps we should redesign the way themes work > > so that a theme is represented by data that says what it does, > > and we could turn it on and off. >=20 > I don't think we need to redesign them, really: we simply need to say > that loading the file won't enable the theme any more. Also loading > such a file should not have any "visible" side effect (same rule as for > Elisp packages). >=20 > If a theme needs to run arbitrary code, it simply needs to define its > own global minor mode `my-foo-mode` and then within its custom settings, > it needs to set `my-foo-mode` to t. >=20 > Themes which follow these rules should work just fine in current > Emacsen, so we can simply introduce this new rule, just like we did > (a long time ago) when we decided that loading an Elisp file > should be harmless. >=20 > AFAICT the themes bundled with Emacs already obey the rule. AFAICS, you addressed the question of whether loading a theme should activate it, but you did not address the point to which you replied: disabling a custom theme does not undo it. Maybe that point should be in a separate thread; dunno. But it is a separate point from the point that loading should not enable/activate.