From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: YUE Daian Newsgroups: gmane.emacs.help Subject: Re: Enable/disable theme while using desktop-save-mode Date: Wed, 06 Nov 2019 16:03:40 +0800 Message-ID: <87zhh9a0tf.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="70394"; mail-complaints-to="usenet@blaine.gmane.org" To: Pankaj Jangid , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 06 09:04:04 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSGIN-000IDD-Uh for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 09:04:04 +0100 Original-Received: from localhost ([::1]:53556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSGIM-0006Ts-71 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 03:04:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37658) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSGI8-0006Rx-Es for help-gnu-emacs@gnu.org; Wed, 06 Nov 2019 03:03:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSGI7-00053O-Ct for help-gnu-emacs@gnu.org; Wed, 06 Nov 2019 03:03:48 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:37636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSGI7-00051U-7B for help-gnu-emacs@gnu.org; Wed, 06 Nov 2019 03:03:47 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id p24so11742314pfn.4 for ; Wed, 06 Nov 2019 00:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=tBXmyIL/0TUDjnxJLOOYkEETbJ+Fin3mpIQbj0WMlEc=; b=EtFPF384XG1aVdHFNSmPWtXGSQFUTtGJo/UwqItZrlnWRd4Dr9iTvtw8W6/M7bZdW0 SYe2r2J23MZ8VNfAyPvbDOrPwhgo3kuxEzzR2H9GTzBEEmw1tV4lZzHjk7wAPwtAV5k7 OQq/3eErLJFoWXQyJ6qBp0fRPwLL7rOcXfHeXsECH5eGx5USq6+VCfCy1dfmPFDxCNvI lAPKCCtjVZfZJSDmzQfqFz6mg9DnH7JzQcxDJk3dzfmsE5A3+ktUjaHemybzEhznwEpe 09ihncsqbC6nBgUQ/tzuMqC6nyDbZMNS6UELpJTJzclU4c3Gm1xOGqWmh48OOxzTJR1U XJfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=tBXmyIL/0TUDjnxJLOOYkEETbJ+Fin3mpIQbj0WMlEc=; b=IVheS1MzEaFTw9ZWluGDhKlWgWA6qhuBuvkohmPcVDJhRZrE8sPcRG8+4/X9rgss0v SFwtm+clIXJ0ZnQxOm9FtD97wuw3OMFvnNM0LccYvdORgNEeO5K4SiuuwV8Jmm5rWzxk 6OHPkmF4PDyuce7jmBvQsC1daHj7D7NVbgoaojt07kNyEIUvWDbhZz0aBUmzNmDk+30t rgRGz7Peo+f9mjeabrr1OkTfExN7pONUXteXfMxzIQV6RfkbIXfN+jErcOan7BUYG/GW CV38CeOWxec6Ryf7Ddm/ZNxJLeA52UxfoG3/S0DoIPUPJg55VD9jC/TAB8cpnyDh/xm1 uhJQ== X-Gm-Message-State: APjAAAW9FCVlvFWzU3ZABFJzcxvT0gQCW1o+63n7/TGBTzRWmx06NZbI vthzS4NjJYvT7rxnelvpku0= X-Google-Smtp-Source: APXvYqwh3gddKtUg7GSM+JWzVFRioF3V1ZNykkcYUzUzbgJhjDJZlYrK29Qj84mVXyUL72ZSRf26+g== X-Received: by 2002:a63:920b:: with SMTP id o11mr1410172pgd.271.1573027424241; Wed, 06 Nov 2019 00:03:44 -0800 (PST) Original-Received: from localhost ([118.201.58.126]) by smtp.gmail.com with ESMTPSA id y12sm1816597pjy.0.2019.11.06.00.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 00:03:43 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::430 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121806 Archived-At: On 2019-11-06 10:38, Pankaj Jangid wrote: >> I'd recommend you give more details. Such as *how* you "disable" your >> themes and what settings you have noticed are still affected by the >> (now disabled) themes. > > Okay. Here is my configuration, > > #+BEGIN_SRC emacs-lisp > (setq-default custom-enabled-themes '(sanityinc-tomorrow-bright)) > > ;; Ensure that themes will be applied even if they have not been customized > (defun reapply-themes () > "Forcibly load the themes listed in `custom-enabled-themes'." > (dolist (theme custom-enabled-themes) > (unless (custom-theme-p theme) > (load-theme theme)))) > > (add-hook 'after-init-hook 'reapply-themes) > #+END_SRC > > Now, to disable the theme I just commented these lines and restarted > Emacs. This should start Emacs with default theme with white > background. But the application starts with dark background although > some of the settings are gone. The font colours etc are different. > > I am suspecting that this is because I have desktop-save-mode > enabled. If I start with '-Q' option then everything is ok. Because then > it doesn't read the desktop file. > > I want to understand how to completely wipe out theme settings even from > saved-desktop. (If that is the reason). > > Regards, > -- > Pankaj Jangid I came across this problem before. I do not know ~sanityinc-tomorrow-bright~, but some themes will modify some settings once loaded. Could you please try to load ~whiteboard~ theme (the default one) after package initialization? Loading it should really "initializing" the theme.