From: <tomas@tuxteam.de>
To: Rodrigo Morales <me@rodrigomorales.site>
Cc: help-gnu-emacs@gnu.org
Subject: Re: [Question] use-package's :init or :config for enabling modes
Date: Sun, 19 May 2024 20:11:37 +0200 [thread overview]
Message-ID: <ZkpA2XpcRCnVvdOS@tuxteam.de> (raw)
In-Reply-To: <87zfslya6d.fsf@rodrigomorales.site>
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
On Sun, May 19, 2024 at 12:38:02PM -0500, Rodrigo Morales wrote:
>
> I emptied =~/.config/emacs/init.el= file and I inserted the following sexp and launched Emacs. =vertico-mode= was enabled.
>
> #+BEGIN_SRC elisp
> (use-package vertico
>
> :config (vertico-mode))
> #+END_SRC
>
> I emptied =~/.config/emacs/init.el= again and I inserted the following sexp and launched Emacs. =vertico-mode= was enabled.
>
> #+BEGIN_SRC elisp
> (use-package vertico
>
> :init (vertico-mode))
> #+END_SRC
>
> As shown above, whether we use =:init= or =:config= both can be used for enabling a mode. So my question is: What's the difference between using =:config= and =:init= for enabling a mode that is defined by a package.
The doc says :init is run before the package is loaded, and :config
after. So the right thing would seem to be :config.
Why :init works for you is anybody's guess -- perhaps vertico is
autoloaded?
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2024-05-19 18:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 17:38 [Question] use-package's :init or :config for enabling modes Rodrigo Morales
2024-05-19 18:11 ` tomas [this message]
2024-05-20 3:56 ` Rodrigo Morales
2024-05-20 5:34 ` tomas
2024-05-19 19:15 ` Ergus
2024-05-20 4:03 ` Rodrigo Morales
2024-05-20 5:37 ` tomas
2024-05-22 21:15 ` Ergus
2024-05-23 4:32 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZkpA2XpcRCnVvdOS@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
--cc=me@rodrigomorales.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).