From ce3098752cfb8cbb57c4f643088a2e6b16919ea7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 May 2026 10:34:03 -0400 Subject: [PATCH] doc: Remove long obsolete references to `package-initialize` Since Emacs-27, `package-initialize` is for internal use only, and callers should either call `package-activate-all` instead (cheaper and faster) or do nothing at all (because the other functions should trigger the needed initialization automatically as needed). * doc/lispref/package.texi (Packaging Basics): Delete `package-initialize`. * doc/misc/eglot.texi (Reporting bugs): Don't recommend using `package-initialize`. * doc/misc/org.org (Using Emacs packaging system): Simplify the command line since both `(require 'package)` and `(package-initialize)` are redundant here. --- doc/lispref/package.texi | 9 --------- doc/misc/eglot.texi | 2 +- doc/misc/org.org | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 8f3f5fe79b0..3097ed02345 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -133,15 +133,6 @@ init file, and any code that should run after it in the primary init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). @end defun -@deffn Command package-initialize &optional no-activate -This function initializes Emacs's internal record of which packages are -installed, and then calls @code{package-activate-all}. - -The optional argument @var{no-activate}, if non-@code{nil}, causes -Emacs to update its record of installed packages without actually -making them available. -@end deffn - @node Simple Packages @section Simple Packages @cindex single file package diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 0b6be34c41f..3deabb894c0 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -1969,7 +1969,7 @@ directory is a way to tell the maintainers about ELPA package versions. @item Include a recipe to replicate the problem with @emph{a clean Emacs run}. -The invocation @code{emacs -Q -f package-initialize} starts Emacs with +The invocation @code{emacs -Q -f package-activate-all} starts Emacs with no configuration and initializes the ELPA packages. A very minimal @file{.emacs} initialization file (10 lines or less) is also acceptable and good means to describe changes to variables. diff --git a/doc/misc/org.org b/doc/misc/org.org index ab0f8a9c1a6..8644109a6a1 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -125,7 +125,7 @@ To avoid interference with the built-in Org mode, you can use the command line (you need Emacs 30 or later): #+begin_src sh -emacs -Q -batch -eval "(progn (require 'package) (package-initialize) (package-refresh-contents) (package-upgrade 'org))" +emacs -Q -batch -eval "(progn (package-refresh-contents) (package-upgrade 'org))" #+end_src This approach has the advantage of isolating the upgrade process from