Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!csn!boulder!gore!jacob From: jacob@gore.com (Jacob Gore) Newsgroups: comp.sys.next Subject: Re: emacs shell Message-ID: <130162@gore.com> Date: 13 Feb 91 03:05:30 GMT References: <2341@mas1.UUCP> Reply-To: jacob@gore.com (Jacob Gore) Organization: Gore Enterprises Lines: 48 / comp.sys.next / charlie@cville.umd.edu (Charles William Fletcher) / Feb 12 / > Say you spawn the shell > (and get the termcap problem); You don't get the termcap problem with 'bash', a shell written by the same organization that wrote this version of Emacs... > and (say) you compile a TeX file > with an error. By typing an 'e' at this point (and assuming the > proper shell set up), you are then inserted into emacs at the line > where the error occured. Emacs running within an Emacs shell buffer? That'd be cute :-) > In reality, I don't want it to work Good :-) (It can be done, though, using terminal mode instead of shell mode.) > *What I would like* is to be placed > back in the *existing* emacs buffer at the correct line (where the > error exists.) Certainly. There is a program called 'emacsclient' in /usr/lib/emacs/etc that was written for just this kind of stuff. It connects with a server function in Emacs. To tell tex to use emacsclient, set the environment variable TEXEDIT to "/usr/lib/emacs/etc/emacsclient +%d %s". To tell Emacs to start the server for emacsclient, put "(server-start)" into your .emacs file. > I assume the same type of behavior occurs > when compiling C code, but I haven't done that yet. Actually, the common way to compile C code is with "M-x compile" in C mode, then use M-` to step through the errors. TeX mode has similar commands: C-c C-b TeX-buffer C-c C-r TeX-region Do "C-h m" in TeX (or LaTeX) mode. Jacob -- Jacob Gore Jacob@Gore.Com boulder!gore!jacob