Xref: utzoo sci.math.symbolic:1299 comp.emacs:7964 gnu.emacs:2510 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!liuida!isy!reiner From: reiner@isy.liu.se (Reiner Lenz) Newsgroups: sci.math.symbolic,comp.emacs,gnu.emacs Subject: Re: Emacs as a front end for Mathematica? Message-ID: <1990Mar21.060928.18844@isy.liu.se> Date: 21 Mar 90 06:09:28 GMT References: <26509@ut-emx.UUCP> Sender: news@isy.liu.se (Lord of the News) Organization: Dept of EE, University of Linkoping Lines: 633 jmberkey@watnow.waterloo.edu (J. Michael Berkley) writes: >> On 20 Mar 90 20:16:43 GMT, dancon@ut-emx.UUCP (Dan Connolly) said: >DC> I use Mathematica remotely from a variety of hosts, and >DC> I'm getting tired of the command-line-interface front end. >I don't know about a Mathematica front end, but Bruno Salvy >(salvy@inria.inria.fr) wrote a nice Maple mode for emacs. > Mike Berkley, University of Waterloo > PAMI Lab > jmberkley@watnext.waterloo.edu > {utai,uunet}!watmath!watnext!jmberkley I use a program called fep = (front end processor). Here is the startup line for mathematica: exec /usr/local/bin/sun3/fep $mathdir/$machdir/mathexe \ -pwpath '{"'$mathdir/Install'"}' \ ..... Here is the README File from fep: Copyright (c) 1987,1988 by Software Research Associates, Inc. FEP is a general purpose front end for any line-oriented command on UNIX. This command was developed on Berkeley UNIX, but will probably run on most UNIX system which have pseudo tty and the select system call. Making FEP Just type 'make'. If your system is running ASCII UNIX or some compatible system, the -DKANJI flag makes fep handle kanji character input. Using FEP See man page fep.1 for detail. The help command (ESC-?) and show-bindings command (^X-^B) are very convenient when running fep. Distribution Distribution without fee is permitted as long as all copyright notices are included. Any comments will be greatly appreciated. Have fun. Kazumasa Utashiro Software Research Associates, Inc. 1-1-1 Hirakawa-cho, Chiyoda-ku, Tokyo 102, Japan UUCP: kddlab!srava.sra.junet!utashiro ARPA: utashiro%sra.junet@uunet.uu.net JUNET: utashiro@sra.junet Here is the man page: .\" Copyright (c) 1987, 1988 by Software Research Associates, Inc. .\" $Header: fep.1,v 4.0 88/08/05 20:22:31 utashiro Rel $ .TH FEP 1L "5 Aug 1988" "SRA Distribution" .SH NAME fep \(em general purpose front end processor .SH SYNOPSIS \fBfep\fR [\|-\fBemacs\fR\||\|-\fBvi\fR\|] \fI\s-1UNIX\s0-command\fR .SH DESCRIPTION .I Fep is a general purpose front end processor applicable to most UNIX commands that features \fIvi\fP\|(1)- or \fIemacs\fR\|(1)-like line editing and a command history mechanism like that of \fIcsh\fR\|(1). .PP Choice of editing style is made by selecting either the emacs mode or the vi mode (named for the editors they emulate), specified either by command line option or by setting a variable interactively or in the start-up file or environment EDITMODE (see editmode variable). .PP The default key bindings are shown below for both edit modes. These can be customized using the fep-bind command. .PP .B Emacs Bindings .PP Here follow the default key bindings for the emacs mode. Each function name should be self-explanatory. The function names are defined as similarly to Gosling's emacs as possible. .sp .RS .nf .ta 1.5i ^@ mark ^A beginning-of-line ^B backward-character ^D delete-next-character ^E end-of-line ^F forward-character ^I insert-tab ^J new-line ^K kill-to-end-of-line ^L clear-screen ^M new-line ^N next-history ^P previous-history ^T previous-history ^Y yank-from-kill-buffer ^^ toggle-transparency ^X-^B show-bindings ^X-^H show-history ^X-^C terminate ^X-^D send-eof ^X-^L repaint ^X-( start-script ^X-) end-script esc-b backward-word esc-B backward-word esc-d delete-next-word esc-D delete-next-word esc-f forward-word esc-F forward-word esc-h delete-previous-word esc-H delete-previous-word esc-l list-file-name esc-L list-file-name esc-esc expand-file-name esc-? help esc-_ invoke-shell esc-< search-reverse esc-> search-forward .if t .sp .3v /* Bindings inherited from the tty driver */ .if t .sp .3v erase delete-previous-character kill delete-line rprnt reprint werase delete-previous-word lnext literal-next .fi .RE .sp .B Vi bindings .PP The vi mode has two sub-modes, the command mode and the text insert mode. The commands of vi are emulated as correctly as possible. Here is a list of the default key bindings of the vi mode that differ from normal vi commands. The tty driver control characters are also inherited in this mode. .sp .RS .nf n search-reverse N search-forward ^A expand-file-name ^L list-file-name ^N next-history ^P previous-history ^R reprint ^^ toggle-transparency ^X-^B show-bindings ^X-^H show-history ^X-^L repaint ^X-^X expand-file-name ^X-^C terminate ^X-^D send-eof ^X-l list-file-name ^X-L list-file-name ^X-? help ^X-( start-script ^X-) end-script .fi .RE .sp .B Built-in commands .PP .I Fep has some built-in commands that are not passed to the child process but understood and processed by fep itself. These commands can be issued from the terminal or from the start-up file. .RS 3n .IP "\fBfep-bind \fIfunction-name key-binding\fR" Change key bindings. For example, to bind the function .I list-file-name to the string "^X-^X", type the following: .if t .sp 0.3v .if n .sp 1 \h'\w'MMMMM'u'fep-bind list-file-name "\\^X\\^X" .if t .sp 0.3v .if n .sp 1 .PP .nf \fBfep-alias\fP \fBfep-alias\fP \fIname\fP \fBfep-alias\fP \fIname string\fP .fi .RS The first form prints all aliases. The second form prints the alias for \fIname\fP. The last form set the alias for \fIname\fP to \fIstring\fP. .PP If you use .I fep without \fIauto-tty-fix\fP, following alias could be usefull. .if t .sp .3v .if n .sp 1 .nf \h'\w'MMMMM'u'if\ $command\ ==\ sh \h'\w'MMMMMMMMMM'u'fep-alias\ more\ "fep-command\ more" \h'\w'MMMMMMMMMM'u'fep-alias\ vi\ "fep-command\ vi" \h'\w'MMMMM'u'endif .fi .if t .sp .3v .if n .sp 1 .RE .IP "\fBfep-unalias\fP \fIlist\fP" Remove alias for each name in \fIlist\fP. .IP "\fBfep-set\fP \fIvariable = value\fR" Set a variable of \fIfep\fP to some value. .IP "\fBfep-unset\fP \fIvariable\fR" Unset a variable. .PP \fBfep-cd\fP [ \fIdirectory\fR ] .br \fBfep-chdir\fP [ \fIdirectory\fR ] .RS Change directory. It sometimes happens that a child process has changed directory, but .I fep is still in the old directory. In such a case, neither \fIlist-file-name\fR nor \fIexpand-file-name\fR will function as expected. This command allows you to change .IR fep 's current working directory (default = home directory). .RE .IP "\fBfep-pwd\fP" Print .IR fep 's current working directory. .IP "\fBfep-history\fP [ \fInumber of line\fR ]" Show the history of commands under .IR fep . .IP "\fBfep-echo\fP \fIarguments\fR" Only print the arguments. Variable names can be used prefixed by the "$" character. .IP "\fBfep-source\fP \fIfile\fR" Read the specified file and execute it. The contents of the file are not sent to sub-processes. .IP "\fBfep-save-history\fP [ \fInumber of lines to save\fR ] \fIfile\fR" Save the current history buffer in the specified file. .IP "\fBfep-read-history\fP [ \fIfile\fR ]" Read in the command history from the specified file. The default file is the value of the \fIhistory-file\fP variable. This file name is understood as a path relative to the home directory. If you want to specify the name relative to the current directory instead, prefix the path by "./". .PP .nf \fBfep-command\fP \fIcommand\fP \fBfep-!\fP \fIcommand\fP .fi .RS Execute \fIcommand\fP. .RE .IP "\fBquit-fep\fP" Kill the sub-process and exit. .PP .IP \fBfep-suspend\fP Suspend .I fep itself. In the unlikely possibility that .I fep falls into a dead-lock in which the sub-processes have stopped but .I fep is still running, use one of these commands to escape from the situation. .PP .nf \fBfep-read-from-file\fP \fIfile\fP \fBfep-<\fP \fIfile\fP .fi .RS Read data from specified file and send them to sub-process. The sub-process will read the data from the file as if they are typed at the keyboard. .RE .PP .nf \fBfep-read-from-command\fP \fIcommand\fP \fBfep-