[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help

From: CdeMills
Subject: Re: help
Date: Fri, 24 Feb 2012 01:33:53 -0800 (PST)

sw007 wrote
> Dear users,
> I am new to Octave and am having trouble with "diary" function.  I could
> use "diary on", but when I put in

If you're using Ubuntu, you can also try emacs. Put in your 
(load "~/.emacs-octave")

then create .emacs-octave.el with content
;; -*- Mode: Emacs-Lisp -*-

;;(autoload 'matlab-mode "matlab" "Enter Matlab mode." t)
;;(setq auto-mode-alist (cons '("\\.m$" . matlab-mode) auto-mode-alist))

(message "inside .emacs-octave")

(autoload 'octave-mode "octave3.2-emacsen/octave-mod" nil t)

(autoload 'octave-help "octave3.2-emacsen/octave-hlp" nil t)

(setq auto-mode-alist
      (cons '("\\.m$" . octave-mode) auto-mode-alist))

(add-hook 'octave-mode-hook
          (lambda ()
            (setq line-number-mode t)
            (abbrev-mode 1)
            (auto-fill-mode 1))) 
(add-hook 'inferior-octave-mode-hook
          (lambda ()
            (define-key inferior-octave-mode-map [up]
            (define-key inferior-octave-mode-map [down]
(defun my-matlab-mode-hook ()
  ;;(setq matlab-function-indent t)
  (setq fill-column 76)

You have to create first .emacs-octave.el in emacs, then go to the menu
"Emacs_lisp", then "byte compile this file". Same game for .emacs. Then exit
emacs, restart it, and type
"Esc"x run-octave
This launchs octave in the background and you get octave output in a window. 
"Ctrl" x 5 2
create a new window, where you can edit everything you like.



View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]