rbp@investor.UUCP (Bob Peirce) (08/19/86)
I just discovered that given a .emacsrc file in /usr/lib/emacs and another in $HOME only the latter is read. I think this is a bug. One should use the emacs file to set system wide factors and the home file to set personal factors. I am going on vacation and will not have time to look at this until September. If somebody else has a fix before then, please post it or mail it to me. -- Bob Peirce, Pittsburgh, PA uucp: ...!{allegra, bellcore, cadre, idis} !pitt!darth!investor!rbp 412-471-5320 NOTE: Mail must be < 30K bytes/message
context@uw-june (Ronald Blanford) (09/01/86)
In article <12800011@duncan>, lawrence@duncan.UUCP writes: > > The Idea here is that sometimes you want your personal > .emacsrc file to OVERRIDE the system one. It would not be possible to > do that if I had coded it the way you asked. On the other hand, a > single line like: > > execute-file "/usr/local/.emacsrc" > > or something similar will allow your .emacsrc file to execute > the system file. > You can override the system file simply by having the home file execute last with the appropriate resetting commands. The way it now stands, unless the user knows to insert the "execute-file" command, as soon as he creates his own .emacsrc to customize some aspect of emacs, the behavior may change drastically due to system defaults no longer being present. It would be better just to execute the system file, and have that one contain a line like: execute-file "~/.emacsrc", although this may not work so well on non-Unix systems. -- Ron
rlk@mit-trillian.MIT.EDU (Robert L Krawitz) (09/02/86)
In article <1182@uw-june> context@uw-june (Ronald Blanford) writes: >In article <12800011@duncan>, lawrence@duncan.UUCP writes: >> >> The Idea here is that sometimes you want your personal >> .emacsrc file to OVERRIDE the system one. It would not be possible to >> do that if I had coded it the way you asked. On the other hand, a >> single line like: >> >> execute-file "/usr/local/.emacsrc" >> >> or something similar will allow your .emacsrc file to execute >> the system file. >> > >You can override the system file simply by having the home file execute >last with the appropriate resetting commands. The way it now stands, >unless the user knows to insert the "execute-file" command, as soon as >he creates his own .emacsrc to customize some aspect of emacs, the >behavior may change drastically due to system defaults no longer being >present. > >It would be better just to execute the system file, and have that one >contain a line like: execute-file "~/.emacsrc", although this may not >work so well on non-Unix systems. > >-- Ron This sort of thing is risky, particularly in editors like gnuemacs (yeah, I know the discussion so far isn't about that, but the same principle applies), since some code can permanently clobber parts of the system. Another hack that can be done is to have the system-wide startup file check for the appropriate personal file, and if it doesn't exist, create one that loads a default startup file. I. e. (if (not (file-attributes "~/.emacs")) (progn (set-buffer (find-file-noselect (substitute-in-file-name "~/.emacs"))) (insert "(load \"/usr/mit/lib/gnuemacs/lisp/default.el\"\n")) (save-buffer))) (load "/usr/mit/lib/gnuemacs/lisp/default.el")) or whatever is needed in any other flavor of emacs. -- Robert^Z
rbp@investor.UUCP (Bob Peirce) (09/05/86)
> The Idea here is that sometimes you want your personal > ..emacsrc file to OVERRIDE the system one. It would not be possible to > do that if I had coded it the way you asked. On the other hand, a > single line like: > > execute-file "/usr/local/.emacsrc" > > or something similar will allow your .emacsrc file to execute > the system file. Afraid not. If I put that line in my personal .emacsrc I get a bus error and core dump. The backtrace indicates this happens in dobuf, called by dofile, called by startup, called by main. However, your point is well taken. My solution is to append the global file to my personal file. Another solution might be to use alias emacs '/usr/local/emacs @/usr/lib/emacs/.emacsrc' I haven't tried it, but "@" does work inconjunction with .emacsrc. -- Bob Peirce, Pittsburgh, PA uucp: ...!{allegra, bellcore, cadre, idis} !pitt!darth!investor!rbp 412-471-5320 NOTE: Mail must be < 30K bytes/message