From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.help Subject: Re: Emacs Themes Date: Fri, 20 Nov 2020 11:57:59 +0530 Organization: Code Is Great Foundation Message-ID: References: <87h7pkzp9s.fsf@jamzattack.xyz> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6993"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: help-gnu-emacs@gnu.org, Jamie Beardslee To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 20 07:28:43 2020 Return-path: Envelope-to: geh-help-gnu-emacs@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 1kfzuV-0001iu-He for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 20 Nov 2020 07:28:43 +0100 Original-Received: from localhost ([::1]:37292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfzuU-0004Nk-K6 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 20 Nov 2020 01:28:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfztt-0004NN-S4 for help-gnu-emacs@gnu.org; Fri, 20 Nov 2020 01:28:06 -0500 Original-Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:42462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfzts-0001yy-HJ for help-gnu-emacs@gnu.org; Fri, 20 Nov 2020 01:28:05 -0500 Original-Received: by mail-pl1-x632.google.com with SMTP id s2so4343427plr.9 for ; Thu, 19 Nov 2020 22:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:mail-followup-to:date :in-reply-to:message-id:user-agent:mime-version; bh=HHCTOWN/QA7VpCxA5Oy9CaLhVjqLi+0/DdvCk6ZPzkM=; b=Nmi96g3Eug2WO27kh4sqE91JklmBBVwmfzF3AnaNkt3dsVQhpeZY1H65xgtB8qZ8p8 KC8V4LkPQBA7Kiya0SmWrVHRG1ynem4DladcU7G+q81E2Avai1NuVUqGr9AXmjuD8gpP lRDsO21MYyW0Rz7OvjEC/7zDbEyD0dHqj/pVryIW0n0xcju6/T2+rPNoiPv4XJjUfAca 8nrW6fJPpYE/lfm2hkHXbGQ/Gtw3Y9ZaxRgOiF9GW1bK/6zqKjiddMEdj4TEOBTKBdML w1MbKfMp3ISze8/GMUCMbdM6OUmOBYjZbvXeB2jVQ2pl2d4w+DJmks7NEIola8tOshcO jFTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-followup-to:date:in-reply-to:message-id:user-agent :mime-version; bh=HHCTOWN/QA7VpCxA5Oy9CaLhVjqLi+0/DdvCk6ZPzkM=; b=AAUtvNCvmeqRl/ZldmSW5ayUQv3qtQhBH1D6E7ctBRX3ia2OoMHRdhuY4ROzl7CM+j 899N2dKglOkVFRBv2IO/QqE4WCONcpiTsMl9u/pZAjGEzjYdWvaALzdxFFJdQes/aZLY 6S/KiVCYn5JNAqk/0EQYcrPuHRnX4pqJynxzOVXGS3KHEM5zjbI36sw8qmzTxwJCzsqY yKId9rq18VbTNz5EwN5roy7b0Ra9QZS4/GkrN2xIf/MXT/ZzxVpGVmeKNO88ZToxq/hQ E558GdY/g3RqRw9NlDGC1IrfOxMxXm8atZ7ihG1tpbD8rXqrlbNp1WPH8shoSr/J1x27 N3AA== X-Gm-Message-State: AOAM531EtaRE9jwCoI+t8sR6qX+/7U/xXTW3nzyJarr9eg5LspwQ8oeJ wulRs18hKWYVAG37/nD/HbfPoVSOxNhMVQ== X-Google-Smtp-Source: ABdhPJw7ODzJJTFFzE+JuMFNzkHvKzT5ki2X23xQmVPK6ChEopT17H1ocLjqfvRARZe8HskOeZDusw== X-Received: by 2002:a17:902:9341:b029:d9:e385:bca2 with SMTP id g1-20020a1709029341b02900d9e385bca2mr3900804plp.64.1605853683025; Thu, 19 Nov 2020 22:28:03 -0800 (PST) Original-Received: from mb2.local ([2405:201:5c06:7812:c0bc:708:e4bd:9195]) by smtp.gmail.com with ESMTPSA id s5sm2002530pfh.164.2020.11.19.22.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 22:28:02 -0800 (PST) Mail-Followup-To: Jean Louis , Jamie Beardslee , help-gnu-emacs@gnu.org In-Reply-To: (Jean Louis's message of "Fri, 20 Nov 2020 07:20:49 +0300") Received-SPF: none client-ip=2607:f8b0:4864:20::632; envelope-from=pankaj.jangid@codeisgreat.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125418 Archived-At: Jean Louis writes: > * Jamie Beardslee [2020-11-20 06:23]: >> Christopher Dimech writes: >> > Have two themes and would like to cycle between the two using >> > a keybinding. How can I do it? >> >> Here's how I'd do it: >> >> (defun toggle-light-or-dark-theme () >> (interactive) >> (if (member 'modus-operandi custom-enabled-themes) >> (progn >> (disable-theme 'modus-operandi) >> (load-theme 'modus-vivendi t)) >> (disable-theme 'modus-vivendi) >> (load-theme 'modus-operandi t))) >> >> And then of course you can bind it to a key with `global-set-key'. > > Nice and simple, I will use it for my favorite themes. This snippet is from the documentation of modus themes. Nice documentation as well. There are other useful snippets as well.