home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / emacs / help / 3739 < prev    next >
Encoding:
Text File  |  1992-08-14  |  2.4 KB  |  69 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!cis.ohio-state.edu!e.kth.SE!levitte
  3. From: levitte@e.kth.SE (Richard Levitte)
  4. Subject: Re: trying to change load-path before dumping...
  5. Message-ID: <LEVITTE.92Aug14163330@elixir.e.kth.se>
  6. Followup-To: gnu.emacs.bug
  7. Sender: gnulists@ai.mit.edu
  8. Organization: Royal Institute of Technology, Stockholm
  9. References: levitte@e.kth.SE (Richard Levitte)
  10. Date: Fri, 14 Aug 1992 15:33:30 GMT
  11. Lines: 56
  12.  
  13. I finally made it! But, boy, is it a kludge...
  14.  
  15. When you can dump emacs, there are two phases:
  16.  
  17.     - dump-creating phase    when the dump file is created
  18.     - session phase        this is the usual "phase", when Emacs is used
  19.                 for normal editing.
  20.  
  21. Now, this is what happens with load-path (it is really in C in lread.c,
  22. but I will express some parts in e-lisp, for simplicity):
  23.  
  24. In dump-creating phase:
  25.  
  26.     /* PATH_LOADSEARCH is found in paths.h, and in this case, it is
  27.        set to "EMACS_LIBRARY:[LISP];EMACS_LIBRARY:[LOCAL]" */
  28.     load-path = PATH_LOADSEARCH;
  29.  
  30.     (setq load-path (cons "../lisp" load-path))
  31.  
  32.     ;; some time after this, my site-init.el was loaded, and
  33.     ;; did the following:
  34.  
  35.     (setq load-path (nconc load-path '("EMACS_LIBRARY:[LOCAL.GNUS]")))
  36.  
  37.     ;; The result which is saved in the dump-file is that load-path
  38.     ;; is set to ("../lisp" "EMACS_LIBRARY:[LISP]" "EMACS_LIBRARY:[LOCAL]"
  39.     ;; "EMACS_LIBRARY:[LOCAL.GNUS]")
  40.  
  41. Now, in the session phase:
  42.  
  43.     (if (string= (car load-path) "../lisp")    ;;;;; !!!!!!!!!!
  44.         (setq load-path PATH_LOADSEARCH))    ;;;;; !!!!!!!!!!
  45.  
  46. Now, I would like to know, WHY THE HELL IS IT DONE THIS WAY??????
  47.  
  48. Well, anyway, to circumvent this bug (yes, IMHO it is a bug!), I put
  49. the following in site-init.el:
  50.  
  51.     (setq load-path 
  52.           (nconc (if (string= (car load-path) "../lisp")
  53.              (cdr load-path)
  54.             load-path)
  55.              "EMACS_LIBRARY:[LOCAL.GNUS]"))
  56.  
  57. Somewhat a kludge, but it was the only way....
  58.  
  59. Couldn't this be fixed? Just by taking away the stupid part mentioned above?
  60.  
  61. --
  62. !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
  63. ! Richard Levitte, System manager       ! tel: int+46-8-790 64 23           !
  64. ! Royal Institute of Technology         ! fax: int+46-8-791 76 54           !
  65. ! Department of Teletransmition Theory  ! Internet: richard@ttt.kth.se      !
  66. ! S-100 44 Stockholm, Sweden            !                                   !
  67. !---------------------------------------------------------------------------!
  68.  
  69.