[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs and Octave
From: |
poti |
Subject: |
Re: Emacs and Octave |
Date: |
Sun, 15 Jul 2007 17:29:30 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On 12:52 Fri 13 Jul , mccoct wrote:
>
> So emacs is starting to make more sense to me but it is a farily painful
> process.
Emacs is a good thing.
>
> >If you do not see the Octave prompt or the commands you write
> >do not work, then it's a system configuration issue. What system are
> >you on?
>
> I do not see an octave prompt. I think that I need to edit the ~/.emacs file
> that emacs loads at startup (according to the octave manual). However, I do
> not know what file this is. Can anyone help describe where this file is?
>
It sounds like you are using Windows.
This was a problem that was recently fixed.
get
http://velveeta.che.wisc.edu/cgi-bin/cvsweb.cgi/~checkout~/octave/emacs/octave-inf.el?rev=1.18;content-type=text%2Fplain
This will give you octave-inf.el
In emacs :
M-x byte-compile-file
then select octave-inf.el
This well produce a file
octave-inf.elc
Copy both files to
Emacs/lisp/progmodes/
replacing the old files.
Step by step notes on the key steps:
1) Hold down the option key, press x. Observe that M-x appears at the
bottom of your screen. Then type the command name. A better way is to
use tab completion to do the typing for you. Start typing the command--
say 'by' -- then press the tab key. Press the tab key twice. Keep going
a few letters at a time until emacs fills in the correct command name,
with no typos, for you.
2) Instead of opening a command shell, or copying with the mouse, use Emacs.
M-x eshell
will give you a very nice shell. If you install coreutils from GnuWin32 to your
PC, it will give you a nice command line with the basic GNU functions, like ls
and cp.
> >From the octave manual:
> 1. To begin using Octave mode for all .m files you visit, add the following
> lines to a file loaded by Emacs at startup time, typically your ~/.emacs
> file:
> (autoload 'octave-mode "octave-mod" nil t)
> (setq auto-mode-alist
> (cons '("\\.m$" . octave-mode) auto-mode-alist))
>
> But how do I actually do this?
>
in your shell go to the C drive, and then cd %HOME%
There create a file called _emacs (on Windows, it is _emacs, not
.emacs):
C-x C-f _emacs
(hold down the control key, press x, then hold down control key and
press f)
then paste those lines into the blank page (the buffer) and save (C-x
C-s). Quit emacs (C-x C-c). When you restart, open a .m file, and all
will be good. M-x run-octave gets you an octave prompt. C-h m shows you
many powerful key-bindings for this mode.
I don't use windows, but I think I recalled everything right.
-Poti