octave-maintainers
[Top][All Lists]
Advanced

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

Re: Run editor selection


From: Andrew Janke
Subject: Re: Run editor selection
Date: Sun, 20 Oct 2019 11:27:06 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0


On 10/20/19 8:41 AM, Torsten Lilge wrote:
Hi everyone,

I would like to discuss the desired behavior, when running code, which
is selected in the gui's editor ("Run Selection"). Currently the
selected code is executed in the console line by line. This does not
work if a keyboard command is included, which is more or less ignored
(see https://savannah.gnu.org/bugs/?42705).

Using Fsource of a temp. file or Feval would solve this issue. However,
in this case, the commands themselves are not displayed in the console
and are not added to the history. This in turn could be fixed by, e.g.,
extending the selected text by commands for displaying and updateing the
history.

What is the desired behavior here, execute the selected portion of code
like a script or as if it was manually entered into the console?

This might be my "do what Matlab does" bias speaking, but I prefer the current behavior of it executing line-by-line as though typed in the terminal, and getting added to the command history.

Most of the time when I use Run Selection, I'm either iterating development on a script that I run incrementally in the base workspace, or in a "dbstop" breakpoint in the debugger, poking at local data and trying various things. In both these situations, it's handy to have the evaluated commands in the history.

Cheers,
Andrew



reply via email to

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