From help-request at octave dot org Sat Apr 15 16:42:22 2006 Subject: running mfiles in emacs From: "Rich E" To: help at octave dot org Date: Sat, 15 Apr 2006 14:40:45 -0700 ------=_Part_6875_4394710.1145137245769 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, First off, I have just switched from Matlab to Octave, so there are many things I am used to doing in Matlab that I would like to see if.how they ar= e possible in Octave. Most importantly, I like to work in mfiles that I can save as scripts, then run whatever I would like by highlighting code and pressing F9. Is anythin= g like this possible with Emacs and Octave? I have gotten Emacs to work in Octave-mode, but I cannot use the debug features. If I try running any line= s or regions, I get the message "Spawning Child Process - Invalid Argument". If anyone can help me figure this out, much thanks. Here is my .emacs 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)))) (setq octave-help-files '("octave" "octave-LG")) (autoload 'run-octave "octave-inf" nil t) (add-hook 'inferior-octave-mode-hook (lambda () (turn-on-font-lock) (define-key inferior-octave-mode-map [up] 'comint-previous-input) (define-key inferior-octave-mode-map [down] 'comint-next-input))) (defvar inferior-octave-program "C:\Program Files\GNU Octave 2.1.73\bin" "*Program invoked by 'inferior-octave'.") Thanks Richie ------=_Part_6875_4394710.1145137245769 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello,

First off, I have just switched from Matlab to Octave, so the= re are many things I am used to doing in Matlab that I would like to see if= .how they are possible in Octave. 

Most importantly, I like to= work in mfiles that I can save as scripts, then run whatever I would like = by highlighting code and pressing F9.  Is anything like this possible = with Emacs and Octave?  I have gotten Emacs to work in Octave-mode, bu= t I cannot use the debug features. If I try running any lines or regions, I= get the message "Spawning Child Process - Invalid Argument". If = anyone can help me figure this out, much thanks. Here is my .emacs file:

(autoload 'octave-mode "octave-mod" nil t)
  = ;        (setq auto-mode-alist
 =             &nb= sp;  (cons '("\\.m$" . octave-mode) auto-mode-alist))
(ad= d-hook 'octave-mode-hook
        = ;            (lambda= ()
            = ;          (abbrev-mode 1)
=             &nb= sp;         (auto-fill-mode 1)
&= nbsp;           &nbs= p;         (if (eq window-system 'x= )
           &nbs= p;            &= nbsp; (font-lock-mode 1))))

(setq octave-help-files '("octave&q= uot; "octave-LG"))

(autoload 'run-octave "octave-inf" nil t)

(add-hoo= k 'inferior-octave-mode-hook
       &= nbsp;       (lambda ()
   &= nbsp;           &nbs= p; (turn-on-font-lock)
        &= nbsp;        (define-key inferior-octave= -mode-map [up]
            = ;       'comint-previous-input)
 &nbs= p;            &= nbsp;  (define-key inferior-octave-mode-map [down]
  &nbs= p;            &= nbsp;   'comint-next-input)))

(defvar inferior-octave-prog= ram "C:\Program Files\GNU Octave=20 2.1.73\bin"
         &= nbsp;         "*Program invoke= d by 'inferior-octave'.")


Thanks
Richie

------=_Part_6875_4394710.1145137245769-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------