From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15687: 24.3.50; custom themes: disabling does not restore initial configuration Date: Tue, 22 Oct 2013 13:55:03 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1382475384 25697 80.91.229.3 (22 Oct 2013 20:56:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Oct 2013 20:56:24 +0000 (UTC) To: 15687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 22 22:56:26 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VYj06-0004zi-Iz for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 22:56:26 +0200 Original-Received: from localhost ([::1]:46639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYj06-00009v-2J for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 16:56:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYizs-00009b-SV for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:56:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYizi-0006Ea-O8 for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:56:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYizi-0006EW-L2 for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VYizh-0001v8-Tt for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2013 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13824753607373 (code B ref -1); Tue, 22 Oct 2013 20:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2013 20:56:00 +0000 Original-Received: from localhost ([127.0.0.1]:35987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYizf-0001uq-I3 for submit@debbugs.gnu.org; Tue, 22 Oct 2013 16:56:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37277) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYizc-0001uZ-0K for submit@debbugs.gnu.org; Tue, 22 Oct 2013 16:55:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYizM-0006CG-Eu for submit@debbugs.gnu.org; Tue, 22 Oct 2013 16:55:50 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYizM-0006CB-Al for submit@debbugs.gnu.org; Tue, 22 Oct 2013 16:55:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYizD-00008F-Jb for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:55:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYiz4-0005v3-4h for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:55:31 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYiz3-0005th-T7 for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2013 16:55:22 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9MKtKC7022640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Oct 2013 20:55:21 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9MKtJDM006094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Oct 2013 20:55:20 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9MKtJQf018536 for ; Tue, 22 Oct 2013 20:55:19 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79517 Archived-At: Dunno whether this is a bug or a missing feature (enhancement request). Custom themes were presumably inspired from the color themes of library `color-theme.el'. However, I do not see, for custom themes, what is an important feature of `color-theme.el': the ability to take a snapshot of the current settings (independent of how they were set, whether via themes or not) as something that can function as a (pseudo)theme. Here is a use case. You tell me whether custom themes offer something in this regard. You start out with Emacs in your preferred customized state, a result perhaps of multiple option settings, frame parameter settings, face settings, etc. For example, you have used `default-frame-alist' and customized some particular faces. No custom theme (except `user') has been applied. You enable a custom theme. Then you disable it. The settings remain those of the "disabled" custom theme. Your initial state is not restored. It seems that disabling a theme is only relative to other custom themes. Disabling does not undo the effect upon Emacs of enabling (in which case it is a misnomer). Enabling not only makes a theme current but also changes variable values, face settings, frame parameters etc., but none of that is part of disabling, except in so far as it affects or is affected by other custom themes. The ex-theme state of Emacs is ignored wrt both enabling and disabling. There is no record of anything to restore. A more precise use case: As above, but you cycle among a set of custom themes. You want C-g during the cycling to cancel (i.e., undo) all effects, restoring the initial state because you decided not to use any theme. With `color-theme.el' this was trivial to do: just take a (pseudotheme) snapshot before cycling, and then restore the snapshot upon C-g. AFAICT, there is no equivalent of such a snapshot with custom themes, and it's not clear how to create one. But please prove me wrong. In particular, all of the custom-theme code requires a theme argument, which must be defined fully, including actually having been written to a theme file. Hardly something that facilitates dynamic state recording and reverting. Please let me know if I'm missing something. If not already available, please provide such a useful feature: the ability to record settings as a (pseudo)theme that is not full-blown, e.g., is not associated with a theme file etc. If necessary, it would be OK if the function to create such a snapshot pseudotheme specified the particular settings to record. Another possibility would be to record not the current dynamic Emacs state but the user's initial state as defined by the `custom-set-variables' and `custom-set-faces' sexps in `(or custom-file user-init-file)'. In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-10-19 on LEG570 Bzr revision: 114715 rgm@gnu.org-20131019023520-s8mwtib7xcx9e05w Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1'