From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: [Question] use-package's :init or :config for enabling modes Date: Wed, 22 May 2024 23:15:31 +0200 Message-ID: <0413862E-6189-49C0-8A0A-B91274B9963A@aol.com> References: <87zfslya6d.fsf@rodrigomorales.site> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3724"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Rodrigo Morales , help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 22 23:16:55 2024 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 1s9tKP-0000go-J7 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 May 2024 23:16:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9tJX-0007p4-UK; Wed, 22 May 2024 17:15:59 -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 1s9tJT-0007if-Pj for help-gnu-emacs@gnu.org; Wed, 22 May 2024 17:15:56 -0400 Original-Received: from sonic316-12.consmr.mail.bf2.yahoo.com ([74.6.130.122]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9tJO-0000l6-Ar for help-gnu-emacs@gnu.org; Wed, 22 May 2024 17:15:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1716412546; bh=Jm66OU2mBkKkSXqBgBNhw2u3Ne3scvzd45pAwbnhqx8=; h=Date:From:To:CC:Subject:In-Reply-To:References:From:Subject:Reply-To; b=PgdkwaaYn+g0oTd63TFIEF/r0SCLzAztrCSXjZS23Evq8QbfCPRYnNR/jAA1FGzakYlGAYABz3dy2aFsaj2sDw7qTguk9drU1d0E6lra5BeLs6FNQMvrYPeWKZkCKdn2RKyOO8cVSWeSrvwW0hvwZDD9/rlFbh8tqtREIabSXMsjVuVb52JO9Cns5PZvq1ZdwW6fUd9wrAy0zTp/r4m5kt32sxGyIavmtRfoMWUGJA0LbZoQ63r69/4GTDc+StXqmQ4OIAh5icLt/NpJliBQ6I+Yqbwq8hhUYlwhadqAfPhrbgR7OwB8DRVdLUlQ/qX1a6JdDMSGtavopfRwhp0EZw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1716412546; bh=43WkxniqvXhhWDyX+Sz74eIGHcsiZ2osDkes4HoCcuk=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=PNxVrvd0pSqSgI2N2n38+zWDTw5Wp3k6eJ+OJhZFtkq94yHHZtwdpMEWXeZe84g46uaYsHvufBbo+N1LsQBY4XQVpkBxPTlHSw8xLchb2BkAte4bUOQ13rYm8jCeW9fJafMEQS1uMnUBoD5JupK/WfXBivaNGVP59XHBT/pbjB/S1rdhzbhm4LJqQtepvaUU9CCLcxSMPM62+lTBx7/LsOPmXe79SrkWQ7//e3QN5srjotiOWcGI0jqWL61QI1tq1FOCC2S8BjBt3zo5WjV5KCvTJwWbfNG+b7QY2nLOpEn9Vshy+3nwTcXLphIxAbUtID4HFs3aFY6z4g/KmZmclw== X-YMail-OSG: 6ITbrdEVM1kgZyjpvz5hRo0JJoy.Iq2OnwT5L2yyADniY8_E8HWuxIqv2YDDQ8t 2d4pz1vgeoTd4eoiv9VuhaiQ4DjO5z.NNxHbXBNRegNsV7iUYCi5DyxgaXtbY1g67wDIS_rs_ME5 7Ust7EzLFsizNBZ9_fqYOHHbmske9iZWqUpMAMR8_Zt7gxcdrYsEXDsBCo7P5eJFqHlfRmqoi6Z1 Bt7RL_Oit19juezxkm77E7rKM.6C7DwFJv4F8wLzWOezSt5uVcohVDoWkHKgVI3BRmN7rbT.LgFU yzNrf0rluZmlNSAJQxzmjniRuSkVKoYYR_Z.I1OTXW7DMbhG57G6v8Ox4pw9g0FsD_UkOi8zOrEO 2XghziVdi47ft6sx.qtplxZOE3tv6WWwyyi1bDYb0I_ybhcanUpclIX99JwG3flgwlZj9_ZVXTfM BzJfLhyDL.asEZybwewTpkMzBBHwLw8HONE_txWk8e1F0c8f7_1j887JlDlkoLE6o3UNdHu_AwNl HO5lZyTRRtTRZE78Ykd6pwMfJ3x1Oqcg1GEBPqzYSLr_mqKUnnkkcgyDRYey13heTH6V2HfT_wds bUw1egrEAzaoPWJPhSiLu8mrz94LFoSxm4bH7rZ1sWtBvgDo32gVx6p_46o5A3Dmo5xIqLVnOPmS rJi2_QPDKBo7EShPfBQD1paKerUurf14biHsGEzY1cGOVaisflUmmkdyn_HVv9Z8VnsOGDvd0Z7A Tm5NVAitgSEFGb0zQktVo5JTkIxw0sa73BzJrYel8SfUT75yoqci83Ko_Atof2rkZjMVmLULzV.b Hw9fme3nAxo27MvvpCwlgzejpFL9dkzoxKoR4QSKkV X-Sonic-MF: X-Sonic-ID: 92d7721c-da57-4391-bc29-010c8a2ab030 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Wed, 22 May 2024 21:15:46 +0000 Original-Received: by hermes--production-ir2-7b99fc9bb6-npkzn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3bd1726ef36f04069bed241f34ce8e2b; Wed, 22 May 2024 21:15:41 +0000 (UTC) In-Reply-To: X-Mailer: WebService/1.1.22356 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.130.122; envelope-from=spacibba@aol.com; helo=sonic316-12.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146797 Archived-At: On May 20, 2024 7:37:42 AM GMT+02:00, tomas@tuxteam=2Ede wrote: >On Sun, May 19, 2024 at 09:15:07PM +0200, Ergus wrote: >> Hi: >>=20 >> I am not specialist here, but they exist because the :init is ALWAYS >> executed while loading the init=2Eel, but the :config is executed AFTER >> loading the package (using eval-after-load)=2E > >If I understand correctly, :init happens (possibly) before the package >is loaded=2E So assuming it's already there seems risky=2E > Exactly=2E=20 >Unless "just invoking" the mode (as OP did in the :init) manages to >load the package, because, e=2Eg=2E it is autoloaded)=2E Then all is well= , >but the explicit load doesn't do anything, because the package was >(auto-) loaded in the :init already=2E > >But I may be wrong :-) > The package may be autoloaded unless there is a defer indication (command,= keymap, defer)=2E The :init may take place at any moment, but usually it is before loading t= he package=2E There is also a :preface keyword which happens even earlier, = for example to set things like the load-path or define functions that will = be used in the init=2E >Cheers --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E