help-octave
[Top][All Lists]
Advanced

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

Re: Octave User Interface


From: John W. Eaton
Subject: Re: Octave User Interface
Date: Thu, 4 Feb 2010 15:03:46 -0500

On  4-Feb-2010, Jordi Guti rrez Hermoso wrote:

| 2010/2/4 Jordi Guti rrez Hermoso <address@hidden>:
| > On 3 February 2010 22:10, John Swensen <address@hidden> wrote:
| >>I also enjoy having the command history so I can make a selection of
| >>previously executed commands and execute them as a block. Now, there
| >>may be a way of doing a lot of these things from the command line,
| >
| > There is.
| 
| I'm sorry, in my preaching, I missed the part where you said "as a
| block". You can do this too, but perhaps not as easily. You isearch
| back to the first entry in the block. You kill the line (C-x
| <backspace>). C-n to go to the next line, and adding separators if
| necessary, you yank into this line at the beginning (C-a C-y C-a C-k),
| and you repeat this for as many lines as necessary. You can of course
| record the C-a C-y  C-a C-k sequence as a macro, or even put it in
| your readline init file.
| 
| You may argue this is complicated, and it's admittedly not easily
| discoverable... but now I'm glad you made me go look and discover
| this, because I started using it for some readline editing, and I've
| come to love it.

Or you can go back to the beginning of the block and type C-o
(operated-and-get-next) to execute the current command and get the
next one.  Repeat this until you are done with the lines you want to
execute.  You can of course edit them along the way.

Or you can type history -q to get the history list without line
numbers and then cut and paste a region with the mouse.

Or you can type history to display the history with line numbers,
find numbers for the the first and last commands in the block you want
to run, and type run_history FIRST LAST to execute the block.

Or you can use edit_history to edit a copy of the history list.  When
you exit the editor, Octave executes the list of commands that remain
in the file.

Yeah, having a GUI makes the "cut and paste from the history list"
method a little more obvious, but it does not really make it any more
possible, or even that much simpler to do.

jwe


reply via email to

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