From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rodrigo Morales Newsgroups: gmane.emacs.help Subject: [Question] use-package's :init or :config for enabling modes Date: Sun, 19 May 2024 12:38:02 -0500 Message-ID: <87zfslya6d.fsf@rodrigomorales.site> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6269"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 19 19:39:04 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 1s8kUs-0001HC-EU for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 19 May 2024 19:38:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8kUJ-0006Mv-40; Sun, 19 May 2024 13:38:23 -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 1s8kUG-0006Mg-Lj for help-gnu-emacs@gnu.org; Sun, 19 May 2024 13:38:20 -0400 Original-Received: from smtpout1.mo12.mail-out.ovh.ca ([51.161.45.254]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8kUF-00081x-4A for help-gnu-emacs@gnu.org; Sun, 19 May 2024 13:38:20 -0400 Original-Received: from mxplan1.mail.ovh.ca (unknown [10.111.58.129]) by mo12.mail-out.ovh.ca (Postfix) with ESMTPS id 4Vj7Fr50xkzHpv5 for ; Sun, 19 May 2024 14:38:08 -0300 (ADT) Original-Received: from rodrigomorales.site (54.39.251.56) by DAG2EX1.mxpca1.local (172.16.2.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sun, 19 May 2024 13:38:07 -0400 Authentication-Results: garm.ovh; auth=pass (GARM-94B0010cc06029-34b0-44e8-963e-cbd58355234a, 503B310311D6CA1672093134A5BB07C67CBF70FE) smtp.auth=me@rodrigomorales.site X-OVh-ClientIp: 190.234.175.154 X-Originating-IP: [54.39.251.56] X-ClientProxiedBy: DAG1EX1.mxpca1.local (172.16.2.1) To DAG2EX1.mxpca1.local (172.16.2.11) X-Ovh-Tracer-GUID: 7abe27e4-83bf-4412-8b00-3450bdd4a230 X-Ovh-Tracer-Id: 4107282862820630039 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdehkedguddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkfggtghisehttdertddttddtnecuhfhrohhmpeftohgurhhighhoucfoohhrrghlvghsuceomhgvsehrohgurhhighhomhhorhgrlhgvshdrshhithgvqeenucggtffrrghtthgvrhhnpeehueefjefghfelfeehffduhffhteejveegtdejudehlefhffefvedtfeefveeiveenucfkphepuddvjedrtddrtddruddpheegrdefledrvdehuddrheeipdduledtrddvfeegrddujeehrdduheegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehmvgesrhhoughrihhgohhmohhrrghlvghsrdhsihhtvgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehhvghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrghdpoffvtefjohhsthepmhhouddvpdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=51.161.45.254; envelope-from=me@rodrigomorales.site; helo=smtpout1.mo12.mail-out.ovh.ca X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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:146782 Archived-At: 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. * System information GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)