Subject: Re: bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package

From: Eli Zaretskii <[email-masked]>
Date: Thu, 20 Apr 2023 12:12:29 +0300

> From: lin Sun <[email-masked]>
> Date: Wed, 19 Apr 2023 05:11:03 +0000
> Cc: Philip Kaludercic <[email-masked]>, Eli Zaretskii <[email-masked]>, [email-masked]
> 
> I had researched the `info.el', and found the variable
> `Info-default-directory-list' is a more proper variable than the
> original `Info-directory-list', which is an autoload customer
> variable.
> 
> Then the patch can be simpler than the previous one, I attached the
> new patch, it avoided to require 'info. I verified it on my local.

Thanks, but we cannot possibly change Info-default-directory-list
behind the user's back.  Info-default-directory-list is a user option,
so Emacs itself cannot modify its value.

Moreover, Info-default-directory-list is considered only once, when
info.el is loaded and initialized for the first time.  Whereas
package.el can be used for installing a package in the middle of a
running Emacs session, when info.el was already loaded, and so
modifying Info-default-directory-list will not have any effect until
the next restart of Emacs.  Do we require users to restart Emacs after
installing a package via package.el?

Going back to the original problem, AFAIU you wanted to avoid loading
info.el at startup, because that makes startup slower, is that right?
Then how about adding a new variable, Info-packages-directory-list,
say, to which package.el will add directories of the installed
packages, and info.el will use when it first loads?  Would that solve
the problem?