unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Explicit call to package-initialize does not trigger a warn.
@ 2019-06-18 23:48 Ergus
  2019-06-19 12:45 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Ergus @ 2019-06-18 23:48 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

Hi:

I have observed that doing an explicit call to package-initialize in the
init file is not triggering a warning as the documentation says it
should do in emacs 27.

The warning is showed (looking in packages.el) when package--initialize
is non-nil.

So I was checking the environment and package--initialize is nil at the end
of the startup if (package-initialize) is not explicitly in my init
file; but the packages are actually initialized.

Calling package-initialize (interactively or in the init file) properly
sets the variable. 

Maybe the issue is related with the fact that startup.el calls
(package-activate-all) instead of (package-initialize)

(and user-init-file
     package-enable-at-startup
     (...)
     (package-activate-all))

and (package-activate-all) doesn't touch the variable package--initialize.

Any idea?


On Tue, Jun 18, 2019 at 08:14:59AM -0400, Stefan Monnier wrote:
>> When it was originally introduced, I remember byte-compile-dynamic made
>> a significant difference when loading large modules from which one
>> initially used only a few functions, it enabled lazy-loading.
>
>That was the idea, yes.
>
>> Would that still matter in today's emacs, or have things moved along far
>> enough that it wont matter?
>
>My impression is that the gain is negligible on today's hardware (and
>I consider my 2007-era Thinkpad to be part of "today's hardware).
>
>Maybe I could be convinced otherwise by actual benchmarks, of course.
>
>
>        Stefan
>
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Explicit call to package-initialize does not trigger a warn.
  2019-06-18 23:48 Explicit call to package-initialize does not trigger a warn Ergus
@ 2019-06-19 12:45 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2019-06-19 12:45 UTC (permalink / raw)
  To: Ergus; +Cc: emacs-devel

> I have observed that doing an explicit call to package-initialize in the
> init file is not triggering a warning as the documentation says it
> should do in emacs 27.

That would be a bug in the docs.
Could you point out the actual place where we say that?

In current Emacs-27, normal startup automatically activates all
installed packages, but it doesn't do what (package-initialize t) does
(i.e. setup the list of packages available in repositories, based on
the already downloaded `archive-contents` files).

IOW, in Emacs-27, we have tried to separate the handling of "locally
installed packages" and the handling of "packages that we could
download".

This is akin to Debian's separation between `dpkg` and `apt`.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-19 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 23:48 Explicit call to package-initialize does not trigger a warn Ergus
2019-06-19 12:45 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).