all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* simple loaded during startup
@ 2007-02-24  0:59 Dan Nicolaescu
  2007-02-24 13:10 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2007-02-24  0:59 UTC (permalink / raw)
  To: emacs-devel


Doing 
strace -o emacs.strace emacs -Q --no-site-file -nw
and then
grep simple emacs.strace

shows that "simple" is being loaded during startup. This seems strange
given that "simple" should be in the dumped image... 
If one deletes all traces of simple.el simple.elc simple.el.gz etc
then emacs gives a "Wrong type argument: nil" error when starting up. 

Does anyone know if loading "simple" at startup is intentional?

Thanks

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

* Re: simple loaded during startup
  2007-02-24  0:59 Dan Nicolaescu
@ 2007-02-24 13:10 ` Eli Zaretskii
  2007-02-24 18:57   ` Dan Nicolaescu
  2007-02-25  4:05   ` Richard Stallman
  0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2007-02-24 13:10 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> From: Dan Nicolaescu <dann@ics.uci.edu>
> Date: Fri, 23 Feb 2007 16:59:22 -0800
> 
> Doing 
> strace -o emacs.strace emacs -Q --no-site-file -nw
> and then
> grep simple emacs.strace
> 
> shows that "simple" is being loaded during startup. This seems strange
> given that "simple" should be in the dumped image... 
> If one deletes all traces of simple.el simple.elc simple.el.gz etc
> then emacs gives a "Wrong type argument: nil" error when starting up. 
> 
> Does anyone know if loading "simple" at startup is intentional?

Actually, Emacs doesn't _load_ simple.elc (put a breakpoint in Fload,
and you'll never see "simple" being loaded), it only locates it.  This
is because startup.el:command-line does this:

  ;; Convert preloaded file names to absolute.
  (let ((lisp-dir
	 (file-truename
	  (file-name-directory
	   (locate-file "simple" load-path
			(get-load-suffixes))))))

(Armed with lisp-dir, it then proceeds to convert relative file names
in load-history into absolute file names.)

IOW, we use simple.elc as an indicator where the Lisp files reside on
the file system, which is the value of lisp-dir computed in the above
snippet.

I don't see anything wrong with that.  Do you?

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

* Re: simple loaded during startup
  2007-02-24 13:10 ` Eli Zaretskii
@ 2007-02-24 18:57   ` Dan Nicolaescu
  2007-02-25  4:05   ` Richard Stallman
  1 sibling, 0 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2007-02-24 18:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

  > > From: Dan Nicolaescu <dann@ics.uci.edu>
  > (Armed with lisp-dir, it then proceeds to convert relative file names
  > in load-history into absolute file names.)
  > 
  > IOW, we use simple.elc as an indicator where the Lisp files reside on
  > the file system, which is the value of lisp-dir computed in the above
  > snippet.
  > 
  > I don't see anything wrong with that.  Do you?

No, that seems fine. And your fix certainly clarifies what is going
on. 

Thanks

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

* Re: simple loaded during startup
@ 2007-02-24 22:00 A Soare
  2007-02-25  6:26 ` Stuart D. Herring
  2007-02-25 18:39 ` Richard Stallman
  0 siblings, 2 replies; 10+ messages in thread
From: A Soare @ 2007-02-24 22:00 UTC (permalink / raw)
  To: Emacs   Dev  [emacs-devel]

De par ma volonte que je me fasse bien compris, je me permet de vous repondre en francais.

Je pense que simple.el doit se faire charger durant l'ammorcage, meme si vous utiliser -Q = ( -q + --no-site-file)

simple.el contient les plus elementaires fonctions , a savoir goto-line, mark-whole-buffer, etc (veillez lire * Emacs Lisp Introduction: (eintr). A simple introduction to Emacs Lisp programming.) en ELISP node. C'est mon avis.

Je donne egalement une traduction anglaise. 

----------------------------------

I think that simple.el must be loaded during the start up, even if you use -Q, because it contains the most elementary editing funcions, indispensable in every major mode.

Alin Soare

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

* Re: simple loaded during startup
@ 2007-02-24 23:07 A Soare
  2007-02-25  6:23 ` Stuart D. Herring
  0 siblings, 1 reply; 10+ messages in thread
From: A Soare @ 2007-02-24 23:07 UTC (permalink / raw)
  To: Emacs   Dev  [emacs-devel]

I have one misunderstanding on this subject: When Emacs starts it parse some standard files (including simple.el) to load their symbols in load-history, in order to know where to find their definitions... It creates in the same time the main obarray to keep the symbols, and in load-histoy keeps the place of their definitions. Is it true? Sure, it is true.


My problem is:
How can I check during startup (at every step when Emacs starts) what LISP symbols are loaded and their semantict (id est value).

Thanks for teaching me a method.

I am very interested about.


Merci d'avance,


Alin Soare.

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

* Re: simple loaded during startup
  2007-02-24 13:10 ` Eli Zaretskii
  2007-02-24 18:57   ` Dan Nicolaescu
@ 2007-02-25  4:05   ` Richard Stallman
  2007-02-25 21:16     ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2007-02-25  4:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dann, emacs-devel

    Actually, Emacs doesn't _load_ simple.elc (put a breakpoint in Fload,
    and you'll never see "simple" being loaded), it only locates it.  This
    is because startup.el:command-line does this:

Could you add this explanation as a comment?

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

* Re: simple loaded during startup
  2007-02-24 23:07 A Soare
@ 2007-02-25  6:23 ` Stuart D. Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Stuart D. Herring @ 2007-02-25  6:23 UTC (permalink / raw)
  To: alinsoar; +Cc: emacs-devel

> I have one misunderstanding on this subject: When Emacs starts it parse
> some standard files (including simple.el) to load their symbols in
> load-history, in order to know where to find their definitions... It
> creates in the same time the main obarray to keep the symbols, and in
> load-histoy keeps the place of their definitions. Is it true? Sure, it is
> true.

Almost true -- some files are "preloaded", which means that a preliminary
version of Emacs ("temacs") loads them when Emacs is built and then a new
Emacs executable is created which -has already loaded them-, which is a
slightly odd concept.  The important bit is that at each normal Emacs
start, it doesn't load as many files.

> My problem is:
> How can I check during startup (at every step when Emacs starts) what LISP
> symbols are loaded and their semantict (id est value).
>
> Thanks for teaching me a method.

Perhaps you could use `load-read-function', and call `mapatoms' from your
wrapper for `read'?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: simple loaded during startup
  2007-02-24 22:00 simple loaded during startup A Soare
@ 2007-02-25  6:26 ` Stuart D. Herring
  2007-02-25 18:39 ` Richard Stallman
  1 sibling, 0 replies; 10+ messages in thread
From: Stuart D. Herring @ 2007-02-25  6:26 UTC (permalink / raw)
  To: alinsoar; +Cc: emacs-devel

> I think that simple.el must be loaded during the start up, even if you use
> -Q, because it contains the most elementary editing funcions,
> indispensable in every major mode.

[Your translation, though of course partial, is fine!]

As per my previous message, Emacs preloads many files, and one of them is
simple.el[c].  The concern was that simple.elc was being loaded -again- at
the normal Emacs startup; it turns out that it was being -used-, but not
-loaded-, at that time.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: simple loaded during startup
  2007-02-24 22:00 simple loaded during startup A Soare
  2007-02-25  6:26 ` Stuart D. Herring
@ 2007-02-25 18:39 ` Richard Stallman
  1 sibling, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2007-02-25 18:39 UTC (permalink / raw)
  To: alinsoar; +Cc: emacs-devel

simple.elc est chargé dans la phase de production de l'executable.

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

* Re: simple loaded during startup
  2007-02-25  4:05   ` Richard Stallman
@ 2007-02-25 21:16     ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2007-02-25 21:16 UTC (permalink / raw)
  To: rms; +Cc: dann, emacs-devel

> From: Richard Stallman <rms@gnu.org>
> CC: dann@ics.uci.edu, emacs-devel@gnu.org
> Date: Sat, 24 Feb 2007 23:05:56 -0500
> 
>     Actually, Emacs doesn't _load_ simple.elc (put a breakpoint in Fload,
>     and you'll never see "simple" being loaded), it only locates it.  This
>     is because startup.el:command-line does this:
> 
> Could you add this explanation as a comment?

Done.

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

end of thread, other threads:[~2007-02-25 21:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-24 22:00 simple loaded during startup A Soare
2007-02-25  6:26 ` Stuart D. Herring
2007-02-25 18:39 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2007-02-24 23:07 A Soare
2007-02-25  6:23 ` Stuart D. Herring
2007-02-24  0:59 Dan Nicolaescu
2007-02-24 13:10 ` Eli Zaretskii
2007-02-24 18:57   ` Dan Nicolaescu
2007-02-25  4:05   ` Richard Stallman
2007-02-25 21:16     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.