help-octave
[Top][All Lists]
Advanced

[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 
~/.emacs
(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]
              'comint-previous-input)
            (define-key inferior-octave-mode-map [down]
              'comint-next-input)))
(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. 
Then
"Ctrl" x 5 2
create a new window, where you can edit everything you like.

Regards

Pascal 

--
View this message in context: 
http://octave.1599824.n4.nabble.com/help-tp4412177p4416637.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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