home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / emacs / 3056 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  2.2 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!hri.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!peta
  2. From: peta@thunder.mcrcim.mcgill.edu (Peter Whaite)
  3. Newsgroups: comp.emacs
  4. Subject: Re: shell command and macro completion
  5. Message-ID: <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>
  6. Date: 9 Sep 92 16:38:27 GMT
  7. References: <1992Sep3.171417.21110@TorreyPinesCA.ncr.com> <JCT.92Sep8091931@se33.wg2.waii.com>
  8. Organization: McGill Research Centre for Intelligent Machines
  9. Lines: 38
  10.  
  11. In article <JCT.92Sep8091931@se33.wg2.waii.com> thompson@wg2.waii.com writes:
  12. >
  13. >I think the best solution is to determine why your .cshrc takes so
  14. >long and do something to make it quicker.  I once had this problem,
  15. >because I was setting my PATH and MANPATH inside of .cshrc; I had
  16. >about twenty directories to search, and I added them to PATH one at a
  17. >time.  It took forever.
  18. >
  19. >Finally it occurred to me that PATH and all environment variables are
  20. >inherited, so they can go in .login.  I moved ALL my environment setup
  21. >to .login and kept in .cshrc only the few aliases and sets I use.
  22. >This sped things up tremendously.
  23.  
  24. I used to do this but I dont recommend it anymore.  The reason is that 'rsh'
  25. doesnt run your .login. Its a real pain starting up X clients -- you have to
  26. explicitly source your .login in the command given to the rsh. (Yes you could
  27. write your own rsh script)
  28.  
  29. Also dont forget that everytime path (or PATH) is set it is rehashed -- this
  30. is what takes the time.  I do it all in one shot, and it doesnt appreciably
  31. slow things down, e.g.
  32.  
  33. set gnu_path = ( /local/gnu/expt/bin /local/gnu/bin )
  34. set X11_path = ( /local/X11/bin )
  35. set cap_path = ( /local/cap/bin )
  36. set app_path = ( /local/TeX/bin /local/matlab/bin /local/maple/bin)
  37. set news_path = ( /local/usenet/bin )
  38. set my_path  = ( . ~/bin )
  39. set loc_path = ( /local/3d/bin /local/mouse/bin /local/bin)
  40. set loc_sys_path = ($gnu_path /local/std/bin )
  41. set std_sys_path = ( /usr/ucb /usr/bin /bin /sbin /usr/hosts )
  42. set sys_path = ( $loc_sys_path $std_sys_path)
  43. set adm_path = ( /usr/etc /etc /local/etc)
  44. set path =  (    $my_path $cap_path $sys_path  $adm_path\
  45.         $X11_path $app_path $loc_path\
  46.          $news_path $demo_path $tw_path )
  47. unset *_path
  48.