Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!rbr4 From: rbr4@uhura.cc.rochester.edu (Roland Roberts) Newsgroups: gnu.emacs.vms Subject: Re: Can't use (enable-arrow-keys) in .emacs Message-ID: <4815@ur-cc.UUCP> Date: 18 Jan 90 19:04:58 GMT References: <5960*kenw@noah.arc.cdn> Reply-To: rbr4@uhura.cc.rochester.edu (Roland Roberts) Distribution: gnu Organization: University of Rochester Lines: 41 In article <5960*kenw@noah.arc.cdn> kenw%noah.arc.cdn@RELAY.CDNNET.CA (Ken Wallewein) writes: > > Whenever I try to use (enable-arrow-keys) in my .emacs file, I get >error message "Error in init file" when emacs starts up. The problem is that your terminal has not been initialized until after your .emacs is executed. Files are loaded in this order: (1) .emacs, (2) default.el, (3) term/.el. Thus the function enable-arrow-keys is not yet defined when you attempt to execute it in your .emacs (see section 28 in the GNU Emacs Manual). Instead do the following: (setq term-setup-hook '(lambda () (enable-arrow-keys))) I have a more complicated definition I can send out (if you want it) that makes sure your terminal is a vt200 series before running enable-arrow-keys. I'm guessing the problem with edt-emulation-on is the same, but don't know for sure. > On the positive, I've been hacking KEPTEDITOR.COM. I've figured out >how to keep it from doing a double-spawn when invoked as a sub-process >of another program (like NEWS OR MAIL). Unfortunately, the method >tends to leave orphan subprocesses lying around.... We don't run NEWS on our VMS system, but I do use emacs as my editor from within MAIL (e.g. reply/edit). To get around the double spawn problem, don't define kepteditor.com as your mail routine. I have a DCL routine called mailemacs.com that does essentially the same thing as kepteditor.com without the spawn (it also loads an emacs-lisp file to set up the buffer and some key bindings). I then do a $ DEFINE MAIL$EDIT "@DISK:[DIR]MAILEMACS.COM" Good luck! roland -- Roland Roberts, University of Rochester BITNET: roberts@uornsrl Nuclear Structure Research Lab INTERNET: rbr4@uhura.cc.rochester.edu 271 East River Road UUCP: rochester!uhura!rbr4 Rochester, NY 14267 AT&T: (716) 275-8962