unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Masterson <dsmasterson@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: use-package :after ??
Date: Sun, 14 May 2023 23:16:52 -0700	[thread overview]
Message-ID: <SJ0PR03MB5455F7EAC389977E04DF8B64A2789@SJ0PR03MB5455.namprd03.prod.outlook.com> (raw)
In-Reply-To: <87pm72m8rc.fsf@penguin> (David Masterson's message of "Sun, 14 May 2023 23:03:19 -0700")

David Masterson <dsmasterson@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: David Masterson <dsmasterson@gmail.com>
>>> Cc: help-gnu-emacs@gnu.org
>>> Date: Thu, 11 May 2023 23:54:06 -0700
>>> 
>>> > In any case, if there's something unclear here, the problem might be
>>> > with the description of :demand, not with :after -- the node "Forcing
>>> > loading" says :demand is overridden by :defer, but says nothing about
>>> > :after.
>>> 
>>> Possibly, but the above (made up) example was an attempt to determine if
>>> :after might effect when the loads occur due to a side effect. Perhaps
>>> this side effect might be important in certain cases.
>>> 
>>> Oh, that Info node says :demand is overridden by :defer, but docstring
>>> for use-package-always-defer says assume :defer unless :demand is used.
>>
>> Are we still talking about :after?  My questions were meant to figure
>> out whether :after's documentation needs some improvements.
>>
>> If everything is clear with :after, and we are talking about :demand
>> and :defer, let's talk about those two.  The text you quote is about
>> use-package-always-defer, not about :defer, so how is that a
>> contradiction to whether :defer overrides :demand?
>
> Question: why would anyone include both :defer and :demand in one
> use-package?  Syntactically, it's appropriate to answer the question of
> which takes precedence.  Semantically, though, most users wouldn't do
> that.
>
> My question goes to the effect of :after in connecting a tree of
> packages that may have been setup with some :demand and some :defer.
> This can occur by direct usage of :demand and :defer *or* by setting
> use-package-always-defer and overriding it with :demand in some
> packages.  Example:
>
> (use-package a :defer t :after b)
> (use-package b :demand t :after c)
> (use-package c :defer t)
>
> Does b force the loading of a and/or c because of :after and the mixed
> :demand/:defer? Or is b forced to defer?
>
> The potential (lack of?) side-effects here should be mentioned as it
> might effect on :config for a, b, or c.

Minor addition:

If a, b, and c were all ':defer t' and a had ':bind ("C-." . b-mode)'
and I later hit that key, that would load c, then b, then a -- right?

-- 
David Masterson



  parent reply	other threads:[~2023-05-15  6:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  0:05 use-package :after ?? David Masterson
2023-05-08  2:44 ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-05-08  4:05   ` David Masterson
2023-05-08  4:25     ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-05-08  5:20       ` David Masterson
2023-05-08 12:19 ` Eli Zaretskii
2023-05-10 23:56   ` David Masterson
2023-05-11  3:24     ` David Masterson
2023-05-11  6:14       ` Eli Zaretskii
2023-05-11 21:24         ` David Masterson
2023-05-12  1:18           ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-05-12  6:33             ` Eli Zaretskii
2023-05-12  6:38               ` Emanuel Berg
2023-05-12  5:59           ` Eli Zaretskii
2023-05-12  6:54             ` David Masterson
2023-05-12  7:22               ` Eli Zaretskii
2023-05-15  6:03                 ` David Masterson
2023-05-15 11:36                   ` Eli Zaretskii
2023-05-15 22:19                     ` David Masterson
2023-05-16 16:16                       ` Eli Zaretskii
     [not found]                 ` <87pm72m8rc.fsf@penguin>
2023-05-15  6:16                   ` David Masterson [this message]
2023-05-15 11:42                     ` Eli Zaretskii
2023-05-15 22:27                       ` David Masterson
2023-05-16 16:19                         ` Eli Zaretskii
2023-05-16 20:44                           ` David Masterson
2023-05-17  1:40                             ` David Masterson
2023-05-17 11:42                             ` Eli Zaretskii
2023-05-17 20:30                               ` David Masterson
2023-05-18 10:36                                 ` Eli Zaretskii
2023-05-18 12:41                                   ` Lynn Winebarger
2023-05-19  2:40                                     ` David Masterson
2023-05-19  3:03                                   ` David Masterson
2023-05-11  5:54     ` Eli Zaretskii
2023-05-11 22:04       ` David Masterson
2023-05-12  6:14         ` Eli Zaretskii
2023-05-12  6:31           ` Emanuel Berg
2023-05-12  6:56           ` David Masterson

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=SJ0PR03MB5455F7EAC389977E04DF8B64A2789@SJ0PR03MB5455.namprd03.prod.outlook.com \
    --to=dsmasterson@gmail.com \
    --cc=eliz@gnu.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.
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).