From: Suhail Singh <suhailsingh247@gmail.com>
To: "R. Clayton" <factotum@rclayton.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: A small use-package puzzle
Date: Fri, 30 Aug 2024 10:59:31 -0400 [thread overview]
Message-ID: <87frqmgip8.fsf@gmail.com> (raw)
In-Reply-To: <87cylq8cvh.fsf@rclayton.org> (R. Clayton's message of "Fri, 30 Aug 2024 07:32:34 -0400")
"R. Clayton" <factotum@rclayton.org> writes:
> I'm wondering how this can happen:
When it comes to understanding macro expansion, I find macrostep-expand
(from the package macrostep) quite invaluable.
If the value of `use-package-always-ensure' is t , use-package is
behaving as expected. Keywords such as `:if' are meant to _load_
packages conditionally. As noted in the [manual]:
#+begin_quote
If you need to make a use-package form conditional so that the condition
occurs before even ‘:ensure’ (*note Install package::) or ‘:preface’
(*note Preface keyword::), use ‘when’ around the ‘use-package’ form
itself. For example:
(when (memq window-system '(mac ns))
(use-package foo
:ensure t))
#+end_quote
[manual]: [[info:use-package#Conditional loading]]
--
Suhail
next prev parent reply other threads:[~2024-08-30 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 11:32 A small use-package puzzle R. Clayton
2024-08-30 14:59 ` Suhail Singh [this message]
2024-08-31 9:53 ` R. Clayton
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frqmgip8.fsf@gmail.com \
--to=suhailsingh247@gmail.com \
--cc=factotum@rclayton.org \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.