emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature/package-vc has been merged


From: Rudolf Adamkovič
Subject: Re: feature/package-vc has been merged
Date: Mon, 07 Nov 2022 01:58:03 +0100

Philip Kaludercic <philipk@posteo.net> writes:

Thank you for reading my first-time user experience!

> What I had in mind was for `package-vc-selected-packages' to be used
> as is.  It is an autoloaded option with a custom setter that installs
> all "selected packages" as a side effect.
>
> As the manual says, all you need to do is write
>
>     (setopt package-vc-selected-packages '((modus-themes)))
>
> [...]

As both a developer and a user, I remain cautious about any "magic" that
makes it harder to tell memory access from arbitrary execution of some
instructions.  Many new and "modern" mainstream languages, such as
Swift, make that mistake.

I like the clear distinction between `foo' and `(foo)' in Lisp.  I even
like the `*' in C that clearly says "a pointer".  Brilliant ideas lost
to the history in most modern languages.  But I digress!

I would never expect `setopt' to do networking.  In fact, I use `setq'
everywhere, like almost everybody else, because I know exactly what it
does, at the call site.  With `setopt', I can only guess.

But anyway, I have a practical reason to say all this:

I have a literate Emacs configuration, mixed with notes.  In it, any
part can add *some* package to the selected packages but any part can
also rely on the availability of *all* installed packages.

To get this freedom, I install the selected packages early on the
after-init hook.  Then, all configuration blocks, evaluated in any
order, can count on all installed packages.

Any number of times, anywhere, and evaluated in any order:

  (with-eval-after load '...
     ...do anything, all packages already installed...)

  (add-hook 'after-init-hook
            ...do anything, all packages already installed...)

Once, does not matter where:

  (add-hook 'after-init-hook
            ...install selected packages...
            -99)

Rudy
-- 
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]