From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22091 invoked from network); 28 Oct 2023 14:40:39 -0000 Received: from lists.gnu.org (209.51.188.17) by inbox.vuxu.org with ESMTPUTF8; 28 Oct 2023 14:40:39 -0000 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwkUE-0006EJ-Ry; Sat, 28 Oct 2023 10:40:26 -0400 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 1qwkUD-0006EB-In for info-gnus-english@gnu.org; Sat, 28 Oct 2023 10:40:25 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwkUC-0005jd-2Z for info-gnus-english@gnu.org; Sat, 28 Oct 2023 10:40:25 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qwkU9-0009UN-LJ for info-gnus-english@gnu.org; Sat, 28 Oct 2023 16:40:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: info-gnus-english@gnu.org From: Juan =?utf-8?Q?Jos=C3=A9_Garc=C3=ADa-Ripoll?= Subject: Re: use-package :custom causes gnus to load Date: Sat, 28 Oct 2023 16:40:15 +0200 Message-ID: <864jiaize8.fsf@csic.es> References: <86cywzhy38.fsf@csic.es> <87a5s3ugee.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:rk67BaHqX0q531s3z4g45pgD2DU= Received-SPF: pass client-ip=116.202.254.214; envelope-from=gegu-info-gnus-english@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Sender: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Your below example shows using :config and an explicit setq statement to change the value of that variable. I found that this approach *does not* trigger loading gnus, but using the :custom field of use-package does. I cannot really fathom why. Bartosz Kaczyński writes: > Juan José García-Ripoll writes: > >> Hi, > > Hi, > >> >> I have a stupid peeve with my current configuration, which relies on >> `use-package` to defer loading of `gnus`, but still configuring relevant >> parameters. >> >> I have found that all of the :custom statements are fine, except for >> >> :custom >> (gnus-select-method '(nnnil "")) >> >> It seems this custom statement triggers loading of gnus. I found this >> can be used by replacing this statement with >> >> :config >> (setq gnus-select-method '(nnnil "")) >> >> However, it is less than satisfactory. > > Why is that? > > (use-package gnus > :init > (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) > > :config > (setq gnus-select-method '(nnnil "")) > (setq gnus-secondary-select-methods > '((nntp "news.gmane.io") > --snip-- > > I don't have any issues with this configuration. > >> >> Any clue about this? > > -- Juan José García Ripoll http://juanjose.garciaripoll.com http://quinfog.hbar.es