Re: How to make Emacs use ELPA version of `compat'?

[email protected] Tue, 12 May 2026 15:39:10 -0400
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Stefan Monnier via Users list for the GNU Emacs text editor
<[email protected]> writes:

>>    1. emacs -Q
>>    2. C-h v load-path RET
>>       Confirm that ‘load-path’ contains only the Emacs
>>       predefined directories.
>>    3. M-x package-initialize RET
>
> Side note: you should never need to call `package-initialize` nowadays.
> Call `package-activate-all` instead (which should be faster).
>

Will usage instructions be updated in the next version of
Emacs?  In Emacs 30, (info "(elisp) Packaging Basics"):

 -- Function: package-activate-all
     This function makes the packages available to the current session.
     The user option ‘package-load-list’ specifies which packages to
     make available; by default, all installed packages are made
     available.  *Note (emacs)Package Installation::.

     In most cases, you should not need to call ‘package-activate-all’,
     as this is done automatically during startup.
     [...]

 -- Command: package-initialize &optional no-activate
     This function initializes Emacs's internal record of which packages
     are installed, and then calls ‘package-activate-all’.

Since there are no details provided about "...initializes
Emacs’s internal record...", it is opaque to users about
which function/command to use when.

The rules appear (to me) to be:

   1. Except when debugging, do not call either
      function. ‘package-activate-all’ will be called
      automatically.

   2. When debugging, call ‘package-activate-all’ somewhere
      in your initialization file, depending on where you
      think the problem might be.

   3. Call ‘package-initialize’ when...? 

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.