unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* running ./temacs
@ 2010-11-17  6:57 Dan Nicolaescu
  2010-11-17  7:43 ` Óscar Fuentes
  2010-11-18  4:44 ` Dan Nicolaescu
  0 siblings, 2 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2010-11-17  6:57 UTC (permalink / raw)
  To: emacs-devel


Running just ./temacs is currently not very useful.
The first think it does when starting up is complain that /.emacs.d/ cannot be found.

M-: (getenv "HOME")
return nil

This is because `process-environment' is nil.

emacs.c contains this code:

  /* Initialize and GC-protect Vinitial_environment and
     Vprocess_environment before set_initial_environment fills them
     in.  */
  if (!initialized)
    syms_of_callproc ();
  /* egetenv is a pretty low-level facility, which may get called in
     many circumstances; it seems flimsy to put off initializing it
     until calling init_callproc.  */
  set_initial_environment ();

The first comment above seems to be contradicted by the code in
set_initial_environment that only initializes Vprocess_environment if
`initialized' is true (which is not when running just ./temacs):


void
set_initial_environment (void)
{
  register char **envp;
#ifdef CANNOT_DUMP
  Vprocess_environment = Qnil;
#else
  if (initialized)
#endif
    {
      for (envp = environ; *envp; envp++)
      Vprocess_environment = Fcons (build_string (*envp),
                                         Vprocess_environment);
      /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
       to use `delete' and friends on process-environment.  */
      Vinitial_environment = Fcopy_sequence (Vprocess_environment);
    }
}

What is the intention here?

[Hacking around this so that Vprocess_environment is initialized when
not dumping makes ./temacs work correctly]




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

end of thread, other threads:[~2011-05-31 14:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17  6:57 running ./temacs Dan Nicolaescu
2010-11-17  7:43 ` Óscar Fuentes
2010-11-18  4:44 ` Dan Nicolaescu
2010-11-18 14:26   ` Stefan Monnier
2010-11-18 21:20     ` Dan Nicolaescu
2010-11-18 22:17       ` Stefan Monnier
2010-11-18 22:19         ` Dan Nicolaescu
2010-11-19  7:51           ` Eli Zaretskii
2010-11-20  7:28             ` Dan Nicolaescu
2010-11-21  5:48             ` Stefan Monnier
2011-05-31  5:19               ` Dan Nicolaescu
2011-05-31  6:36                 ` Dan Nicolaescu
2011-05-31  6:47                   ` Eli Zaretskii
2011-05-31  6:55                     ` Dan Nicolaescu
2011-05-31  8:44                       ` Eli Zaretskii
2011-05-31 14:53                         ` Dan Nicolaescu
2011-05-31  6:40                 ` Eli Zaretskii

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