12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix D: Emacs <strong>Octave</strong> Support 339• the builtin operators (‘&&’, ‘’, . . .) using font-lock-reference-face• the builtin variables (such as ‘warn_fortran_indexing’, ‘NaN’ or ‘LOADPATH’) in fontlock-variable-name-face• and the function names in function declarations in font-lock-function-name-face.There is also rudimentary support for Imenu (currently, function names can be indexed).You can generate TAGS files for Emacs from <strong>Octave</strong> ‘.m’ files using the shell script otagsthat is installed alongside your copy of <strong>Octave</strong>.Customization of <strong>Octave</strong> mode can be performed by modification of the variable octavemode-hook.If the value of this variable is non-nil, turning on <strong>Octave</strong> mode calls its value.If you discover a problem with <strong>Octave</strong> mode, you can conveniently send a bug reportusing C-c C-b (octave-submit-bug-report). This automatically sets up a mail bufferwith version information already added. You just need to add a description of the problem,including a reproducible test case and send the message.D.3 Running <strong>Octave</strong> From Within EmacsThe package ‘octave’ provides commands for running an inferior <strong>Octave</strong> process in aspecial Emacs buffer. UseM-x run-octaveto directly start an inferior <strong>Octave</strong> process. If Emacs does not know about this command,add the line(autoload ’run-octave "octave-inf" nil t)to your ‘.emacs’ file.This will start <strong>Octave</strong> in a special buffer the name of which is specified by the variableinferior-octave-buffer and defaults to "*Inferior <strong>Octave</strong>*". From within this buffer,you can interact with the inferior <strong>Octave</strong> process ‘as usual’, i.e., by entering <strong>Octave</strong> commandsat the prompt. The buffer is in Inferior <strong>Octave</strong> mode, which is derived from thestandard Comint mode, a major mode for interacting with an inferior interpreter. See thedocumentation for comint-mode for more details, and use C-h b to find out about availablespecial keybindings.You can also communicate with an inferior <strong>Octave</strong> process from within files with <strong>Octave</strong>code (i.e., buffers in <strong>Octave</strong> mode), using the following commands.C-c i lC-c i bC-c i fC-c i rC-c i sC-c i hSend the current line to the inferior <strong>Octave</strong> process (octave-send-line). Withpositive prefix argument N, send that many lines. If octave-send-line-autoforwardis non-nil, go to the next unsent code line.Send the current block to the inferior <strong>Octave</strong> process (octave-send-block).Send the current function to the inferior <strong>Octave</strong> process (octave-send-defun).Send the region to the inferior <strong>Octave</strong> process (octave-send-region).Make sure that ‘inferior-octave-buffer’ is displayed (octave-show-processbuffer).Delete all windows that display the inferior <strong>Octave</strong> buffer (octave-hideprocess-buffer).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!