From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#65145: =?UTF-8?Q?=E2=80=98enable-theme=E2=80=99?= completion for themes loaded by =?UTF-8?Q?=E2=80=98require-theme=E2=80=99?= Date: Wed, 9 Aug 2023 06:50:47 -0300 Message-ID: <7a8aab36-f48b-d5f7-6f09-70abcc912e7b@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15532"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: "65145@debbugs.gnu.org" <65145@debbugs.gnu.org> To: Shynur Xie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 09 11:51:13 2023 Return-path: Envelope-to: geb-bug-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 1qTfqS-0003oQ-JP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Aug 2023 11:51:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTfqK-000821-OW; Wed, 09 Aug 2023 05:51:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTfqI-00081d-L4 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 05:51:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTfqI-00085y-D7 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 05:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTfqI-0002KQ-8B for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65145 X-GNU-PR-Package: emacs Original-Received: via spool by 65145-submit@debbugs.gnu.org id=B65145.16915746598941 (code B ref 65145); Wed, 09 Aug 2023 09:51:02 +0000 Original-Received: (at 65145) by debbugs.gnu.org; 9 Aug 2023 09:50:59 +0000 Original-Received: from localhost ([127.0.0.1]:38287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTfqF-0002K9-1R for submit@debbugs.gnu.org; Wed, 09 Aug 2023 05:50:59 -0400 Original-Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]:50433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTfqD-0002Jt-LL for 65145@debbugs.gnu.org; Wed, 09 Aug 2023 05:50:58 -0400 Original-Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-1bfce114ef9so2853476fac.1 for <65145@debbugs.gnu.org>; Wed, 09 Aug 2023 02:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691574651; x=1692179451; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BBEWkHLQI2FpPoApwSymVBTV0bQFPZXdKz2AhefuzmA=; b=UEZ6J6tAL3ZPkNDu19BWNhMHX8K2iyqzMYg9iwdlMnc0+nqJn2ltuUwQbM0tRr6Eif QfDL2JheZP9SNRL3jTegWKSYOpahRZxWeCFI28O6ET5b/jKIAWLlhXB/JB/Zvxm0I2Ms TXX5Kh1cMcKwR0b9H8YAfDVmAoV3F+ITCqLMUgg4jn6ZyWBi9Z5FGhYc/wVJKiR/yJWz HcUp/cJKUbJYPg2DyEfcAkQw+d0r2TIVcGUproSCwTZNfwynDhp0kOz++octzvgzXEeX B1hW5xRMYRgmOS5Iveoo1q7TXKGLVkxLOTqL4Bs2CYreE/vnP3Plq9snIlqDxn4S2SaM 0pSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691574651; x=1692179451; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BBEWkHLQI2FpPoApwSymVBTV0bQFPZXdKz2AhefuzmA=; b=HaS/ookuT9CvUzpkK4CeTGaKUDKdYVfm2C+XBN8BEP6yCThgfQNJVISLqFFGBiwjry oBYhdy/lv/6xgzMjg1oMm/i9D09ocld+bIjKjmrBUC9GzLbLI+2hwB19KsP1gEAs/MjW 3Mez19PSVbqVFq3Rsb9PP8zNjGZwLmJolbadD5sur4IWkI8OSX2/MVUpVfqwWlZpoVtd sVjKeiDjWrqDutfrIFQ0M84OCPA3B3YDtrCUF+ZfTit+Y6J2P3dXAgrydw4qKMuCQnTs OizTSWlls+Pe0uepdui9rAxX8Vc5CIKa/XmC9e+l65oeh7Rh2l3UgUcb3azSpHK3NfLv xUXA== X-Gm-Message-State: AOJu0YzlDjUx2UWYoHBH2KiHT5tg0VShrSoOV8aOR9wZoD4/P2hA5ykZ G3nZpykOwwRiGxiuNWve7Vo= X-Google-Smtp-Source: AGHT+IFPp8NkF2LqvqKS9YNS6/PZJ/FXjYs4TXwVwqj+eZ5Dyuz6eqHB7iLElUli9POp1ZZ9dDsfZw== X-Received: by 2002:a05:6871:520f:b0:1bb:509a:824f with SMTP id ht15-20020a056871520f00b001bb509a824fmr2743100oac.55.1691574651281; Wed, 09 Aug 2023 02:50:51 -0700 (PDT) Original-Received: from [192.168.0.234] ([186.127.128.249]) by smtp.gmail.com with ESMTPSA id x17-20020a4a4111000000b0056d2dde4cb7sm6787501ooa.0.2023.08.09.02.50.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Aug 2023 02:50:50 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267011 Archived-At: Shynur Xie writes: >> I can't reproduce it.  I did: >> emacs -Q >> (require-theme 'leuven-theme) >> M-x enable-theme > > Oh Oh, sorry, Mauro.  I forgot to say that, this occurs only when > using a third-party theme, e.g., you create a file named ‘X-theme.el’, > which is under ‘/tmp/’ and contains the following code: > >     (deftheme X) >     (provide 'X-theme) > > Then evaluate > >     (let ((custom-theme-load-path '("/tmp/"))) >       (require-theme 'X-theme)) > > Then call ‘enable-theme’ interactively. Thanks, I see it now.  Note that if you change the X-theme.el file to something like this: (deftheme X) (let ((class '((class color) (min-colors 89))))   (custom-theme-set-faces    'X    `(default ((,class (:background "#222222" :foreground "#f6f6f6")))))) (provide-theme 'X) Then there's completion for "X".  The reason is that, for completion, Custom looks for a non-nil theme-settings property.  Your empty theme recipe doesn't have settings, so theme-settings is nil, while if you change it to a non-empty theme, theme-settings will be non-nil. I don't really see a need to change the code here.