[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs freeze
From: |
poti |
Subject: |
Re: Emacs freeze |
Date: |
Tue, 21 Aug 2007 00:52:49 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On 11:25 Wed 08 Aug , Matt Coleman wrote:
>
> I am still having problems with emacs freezing when I try to run octave from
> within emacs (M-x run-octave). Does the octave have to run within cygwin for
> this to work? Mine does not run in cygwin.
Are you loading octave mode? I use the following code in my startup file:
(autoload 'octave-mode "octave-mod" nil t)
(setq auto-mode-alist
(cons '("\\.m$" . octave-mode) auto-mode-alist))
(add-hook 'octave-mode-hook
(lambda ()
(abbrev-mode 1)
(auto-fill-mode 1)
(if (eq window-system 'x)
(font-lock-mode 1))))
Also, I am not quite sure how the Windows path works. Does Windows
have some way to recursively add to PATH the bin directory of programs
installed in Program Files? If not, the following is edited down from
what I do, which can be extended to add other programs:
(let* (
(opath (directory-file-name (mapconcat 'file-name-as-directory (list
"C:" "Program Files" "GNU Octave 2.1.73" "bin") ""))))
(setq tlpath (list opath)))
(setq exec-path (append tlpath exec-path))
(setenv "PATH" (concat (mapconcat (lambda (dir) (or dir ".")) tlpath
path-separator) path-separator (getenv "PATH")))
> I also don't really understand
> how octave is running in my computer. The only way I can get the octave
> console to run is with my desktop shortcut icon. Where the target for this
> is
>
> "C:\Program Files\GNU Octave 2.1.73\bin\rxvt.exe" --keysym.0xFF50 '^a'
> --keysym.0xFF57 '^e' --keysym.0xFFFF '^f^h' -tn linux -title 'GNU Octave
> 2.1.73' -geometry 80x25 -bg White -fg Black -cr Blue -fn 'Lucida Console-12'
> -sr -b 5 -e /bin/sh octave.sh
>
> Can anyone help with this?
>
You can achieve a similar thing by opening a command shell, or a shell
in emacs (M-x eshell) and typing the full path to the executable. Once
you add the bin directory to your path, you will be able to invoke
octave just with the executable name, though using octave mode will be
far better. By the way, the version of octave I am using is 2.9.12
which, judging by the enthusiastic response of a MATLAB textbook author at a
recent conference, adds some very nice features.
-Poti