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: Sat, 30 Nov 2013 09:10:16 -0800 (PST) Message-ID: References: <631ec576-1143-4ee0-a399-39a3bc5bc7da@default> 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 1385831483 11452 80.91.229.3 (30 Nov 2013 17:11:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 17:11:23 +0000 (UTC) To: Glenn Morris , 15687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 30 18:11:27 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 1Vmo4k-0000u2-Et for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Nov 2013 18:11:26 +0100 Original-Received: from localhost ([::1]:52720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmo4j-000223-VW for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Nov 2013 12:11:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmo4Y-0001ut-3h for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 12:11:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmo4N-0002Iv-4P for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 12:11:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmo4N-0002Ir-0R for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 12:11:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vmo4M-0000eM-An for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 12:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2013 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 15687-submit@debbugs.gnu.org id=B15687.13858314292453 (code B ref 15687); Sat, 30 Nov 2013 17:11:02 +0000 Original-Received: (at 15687) by debbugs.gnu.org; 30 Nov 2013 17:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:51937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vmo3o-0000dV-TR for submit@debbugs.gnu.org; Sat, 30 Nov 2013 12:10:29 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22509) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vmo3m-0000dH-Cb for 15687@debbugs.gnu.org; Sat, 30 Nov 2013 12:10:27 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAUHAJ0S019757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Nov 2013 17:10:20 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 rAUHAJrA020659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Nov 2013 17:10:19 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAUHAIsJ017840; Sat, 30 Nov 2013 17:10:18 GMT In-Reply-To: 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-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:81154 Archived-At: > That is not a minimal recipe, that's "debug my code for me". No one is asking anyone to debug my code. The code works fine, modulo Emacs bug #15687 and #15740. And as I mentioned, the code is for others, who use themes; I do not. It is not I who is hurt by this bug. It is Emacs and its custom-theme users. My aim is to help both. If the bug report helps, fine; if not, carry on. I gave a simple recipe to _show the problem_. I never claimed that it is a minimal recipe. I pointed to the specific code that applies a theme and then (via C-g) tries to restore the state. And that code is very short and simple. If you are not convinced that there is a problem restoring the state as it was before applying a theme, then that quick demonstration should convince you - without even looking at the code - but especially if you do look at it. After you downloaded the files "for laughs", did you even try the theme cycling? That's the point of downloading them, not just to be able to laugh, poke fun, and complain about how much you downloaded. And that check takes only a few seconds. Clearly, if your motivation in downloading the files was really to look for the bug, you would at least have tried the command - followed the recipe. Why does my crystal ball tell me that you didn't even try, that you just wanted to complain about how much there was to download? If you think that such restoration (theme undoing) is possible, please let us know how. (And no, `M-x customize*' is not the answer.) Let me put that to you positively and constructively: How can one, with Emacs Lisp, restore the state that was in effect before applying a custom theme? How to _undo_ a theme application? Disabling a theme does not cut the mustard. (If not convinced, please do try the code you so patiently downloaded. It clearly disables all custom themes you enabled, when you hit C-g.) The info of how to undo should be up front, in the manual. It is not, and AFAICT it is not an accident that it is missing altogether. But if you know the answer, please, out with it. In that case, this can be relegated to a doc bug, and you can simply add that missing info to the manual to fix it. The color-theme.el code and doc state clearly how to do that with color themes (it is a trivial operation). There is no explanation of how to do that with custom themes. Why is that? AFAICT, there is nothing foreseen for doing that, even though it is an obvious use case. Is there a simple way to do it? No answer. If you claim there is no bug here, please explain how that's done. That should be easy. Presumably Emacs provides a simple way to do it, no? Wrt the code to show the problem: I pointed to a simple cycling command, whose code is short. That should have been enough to show, for instance, that it already does what wgreenhouse later suggested: >> `disable-theme' should be called for every element in >> `custom-enabled-themes' before enabling a new one. I nevertheless pointed out that the code does that: (let ((orig-themes (delq nil (copy-sequence custom-enabled-themes))) ... (condition-case nil ; `C-g' (progn (mapc #'disable-theme custom-enabled-themes) (if orig-themes (mapc #'enable-theme orig-themes) (enable-theme snapshot))) (error nil))) This clearly disables all enabled themes, and then enables any themes that were enabled at the outset (i.e., were part of the initial state). Do you see something incorrect or missing here? You do not need to look at 3000 lines of code to understand the theme enabling and disabling being done. Mauvaise foi. And it takes only a few seconds of trying the command to see that the theme disabling is not enough to undo and restore the initial state. Keep your head in the sand and say you don't see anything. Still, there is a bug. Likewise, bug #15740. If you want to see it, raise your eyes. If you don't want to see it, carry on.