unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to print from/debug startup.el (normal-top-level)
@ 2022-03-08 15:37 dalanicolai
  2022-03-08 15:52 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: dalanicolai @ 2022-03-08 15:37 UTC (permalink / raw)
  To: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

As, other than looking at the source code of `package-activate-1`, I am
unable to find what it
means to 'activate a package', and similarly I am unable to find what
`package-enable-at-startup`
does exactly at startup (well, its docstring says that it should make
installed packages available
Emacs starts, but despite not being sure what 'available' means here, it
looks like at least it does
not 'activate' all installed packages).

So I was trying to inspect what happens in the `normal-top-level` function
but, when jumping to
its definition and changing it, it seems to have no effect (I have also
deleted the startup.elc file. And, as I don't know exactly if native
compiled files get priority over byte-compiled files, I have also tried
with an Emacs without native compilation, I am hoping to understand such
things at some point).

Anyway, my question is if you have some advice on how to 'inspect' the
`normal-top-level` function.

[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

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

* Re: How to print from/debug startup.el (normal-top-level)
  2022-03-08 15:37 How to print from/debug startup.el (normal-top-level) dalanicolai
@ 2022-03-08 15:52 ` Stefan Monnier
  2022-03-08 16:03   ` dalanicolai
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2022-03-08 15:52 UTC (permalink / raw)
  To: dalanicolai; +Cc: Emacs Devel

> As, other than looking at the source code of `package-activate-1`, I am
> unable to find what it
> means to 'activate a package',

Activate means to setup autoloads and add the package's directory to `load-path`.

> So I was trying to inspect what happens in the `normal-top-level` function
> but, when jumping to
> its definition and changing it, it seems to have no effect (I have also
> deleted the startup.elc file. And, as I don't know exactly if native
> compiled files get priority over byte-compiled files, I have also tried
> with an Emacs without native compilation, I am hoping to understand such
> things at some point).

Those files are preloaded into the "pdump" file (a file with name <foo>.pdmp)
(you can see in `lisp/loadup.el` which are those files that are preloaded).


        Stefan




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

* Re: How to print from/debug startup.el (normal-top-level)
  2022-03-08 15:52 ` Stefan Monnier
@ 2022-03-08 16:03   ` dalanicolai
  2022-03-08 16:36     ` Stefan Monnier
  2022-03-09  8:39     ` Phil Sainty
  0 siblings, 2 replies; 6+ messages in thread
From: dalanicolai @ 2022-03-08 16:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

>
> Activate means to setup autoloads and add the package's directory to
> `load-path`.


That was more or less what I understood from reading the `package-activate-1`
code.

Those files are preloaded into the "pdump" file (a file with name
> <foo>.pdmp)
> (you can see in `lisp/loadup.el` which are those files that are preloaded).
>

Ah, yes, I suspected something like that already, but could not really find
more info about it.

So finally then, does `make available` mean `activate the package`?

Thanks! Very helpful...

On Tue, 8 Mar 2022 at 16:52, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > As, other than looking at the source code of `package-activate-1`, I am
> > unable to find what it
> > means to 'activate a package',
>
> Activate means to setup autoloads and add the package's directory to
> `load-path`.
>
> > So I was trying to inspect what happens in the `normal-top-level`
> function
> > but, when jumping to
> > its definition and changing it, it seems to have no effect (I have also
> > deleted the startup.elc file. And, as I don't know exactly if native
> > compiled files get priority over byte-compiled files, I have also tried
> > with an Emacs without native compilation, I am hoping to understand such
> > things at some point).
>
> Those files are preloaded into the "pdump" file (a file with name
> <foo>.pdmp)
> (you can see in `lisp/loadup.el` which are those files that are preloaded).
>
>
>         Stefan
>
>

[-- Attachment #2: Type: text/html, Size: 2358 bytes --]

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

* Re: How to print from/debug startup.el (normal-top-level)
  2022-03-08 16:03   ` dalanicolai
@ 2022-03-08 16:36     ` Stefan Monnier
  2022-03-09  8:39     ` Phil Sainty
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2022-03-08 16:36 UTC (permalink / raw)
  To: dalanicolai; +Cc: Emacs Devel

> So finally then, does `make available` mean `activate the package`?

Yes.


        Stefan




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

* Re: How to print from/debug startup.el (normal-top-level)
  2022-03-08 16:03   ` dalanicolai
  2022-03-08 16:36     ` Stefan Monnier
@ 2022-03-09  8:39     ` Phil Sainty
  2022-03-09 11:54       ` dalanicolai
  1 sibling, 1 reply; 6+ messages in thread
From: Phil Sainty @ 2022-03-09  8:39 UTC (permalink / raw)
  To: dalanicolai; +Cc: Stefan Monnier, Emacs Devel

On 2022-03-09 05:03, dalanicolai wrote:
>> Those files are preloaded into the "pdump" file (a file with name
>> <foo>.pdmp)
>> (you can see in `lisp/loadup.el` which are those files that are
>> preloaded).
> 
> Ah, yes, I suspected something like that already, but could not
> really find more info about it.

If you build Emacs yourself then you can run the compiled src/temacs
executable which will then load loadup.el at run time.  That should
let you see the effects of modifying those files without recompiling
each time.

You can also configure and build Emacs using:

./configure --with-dumping=none

in which case the final 'emacs' executable will be identical to temacs
and behave that way always; but that's probably not really what you
want.


-Phil




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

* Re: How to print from/debug startup.el (normal-top-level)
  2022-03-09  8:39     ` Phil Sainty
@ 2022-03-09 11:54       ` dalanicolai
  0 siblings, 0 replies; 6+ messages in thread
From: dalanicolai @ 2022-03-09 11:54 UTC (permalink / raw)
  To: Phil Sainty; +Cc: Stefan Monnier, Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

Thanks for these very informative suggestions also

Although, when trying to run temacs this morning, it reported some keymap
issue;
and trying it again now, I get a: Symbol's function definition is void:
file-name-sans-extension

I do know where to poke around now, and probably will enjoy the fruits of
these suggestions soon

On Wed, 9 Mar 2022 at 09:39, Phil Sainty <psainty@orcon.net.nz> wrote:

> On 2022-03-09 05:03, dalanicolai wrote:
> >> Those files are preloaded into the "pdump" file (a file with name
> >> <foo>.pdmp)
> >> (you can see in `lisp/loadup.el` which are those files that are
> >> preloaded).
> >
> > Ah, yes, I suspected something like that already, but could not
> > really find more info about it.
>
> If you build Emacs yourself then you can run the compiled src/temacs
> executable which will then load loadup.el at run time.  That should
> let you see the effects of modifying those files without recompiling
> each time.
>
> You can also configure and build Emacs using:
>
> ./configure --with-dumping=none
>
> in which case the final 'emacs' executable will be identical to temacs
> and behave that way always; but that's probably not really what you
> want.
>
>
> -Phil
>
>

[-- Attachment #2: Type: text/html, Size: 1711 bytes --]

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

end of thread, other threads:[~2022-03-09 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 15:37 How to print from/debug startup.el (normal-top-level) dalanicolai
2022-03-08 15:52 ` Stefan Monnier
2022-03-08 16:03   ` dalanicolai
2022-03-08 16:36     ` Stefan Monnier
2022-03-09  8:39     ` Phil Sainty
2022-03-09 11:54       ` dalanicolai

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