bugGNU Octave - Bugs: bug #65577, Feature request - editor right...


bug #65577: Feature request - editor right click to run test without needing to clear %! first

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 10 Apr 2024 01:48:36 PM UTC
Category:  GUI Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  10.1.0 (current default) Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Sat 04 May 2024 03:59:32 PM UTC, comment #7: 

I have pushed cset http://hg.savannah.gnu.org/hgweb/octave/rev/1ab09074c74b which adds menu entries and shortcuts for running all tests and demos in the file currently open in the editor.

Torsten Lilge <ttl>
Group Member
Thu 02 May 2024 09:59:53 PM UTC, comment #6: 

There was an unnecessary code context block created by a set of parentheses which I removed in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/7afc314f2998).

Everything else looks good.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Sun 21 Apr 2024 07:53:20 PM UTC, comment #5: 

I have implemented what Nicholas describes in comment #3 with the extensions that %! is not ignored if the keyword is directly following without whitespace, like in "%!demo" or "%!test", but with the exception "%!assert". The changes are in the default branch.

I'am also planning to add editor menu entries like "save & run all test" and "save & run all demos".

Torsten Lilge <ttl>
Group Member
Thu 11 Apr 2024 02:01:24 PM UTC, comment #4: 

I would recommend to just run what's highlighted, keeping it as simple as possible, almost identically to using F9/Run selection.  if you're missing shared variables, you should have highlighted differently or pre-set some variables.   basically, it's just F9 but ignoring any line-leading %!

Nicholas Jankowski <nrjank>
Group Member
Thu 11 Apr 2024 07:28:35 AM UTC, comment #3: 

@anonymous from comment #2: That's a request for a different feature. Please consider opening a separate report for that.

A potential complication for running tests separately might be to figure out which `%!shared` blocks to run and which prior tests might have affected which shared variable in which way...

Markus M├╝tzel <mmuetzel>
Group administrator
Wed 10 Apr 2024 11:22:01 PM UTC, comment #2: 

Also is it possible to ignore ">>" so we can copy/paste previous commands without having to edit in Mousepad first?

Wed 10 Apr 2024 07:31:47 PM UTC, comment #1: 

This would be a nice feature. In addition to the possibility to run selected tests, we could offer a menu entry for running all tests in the current editor file.

Torsten Lilge <ttl>
Group Member
Wed 10 Apr 2024 01:48:36 PM UTC, original submission:  

low priority feature request.  I find myself repeatedly removing and re-adding %! to run individual or blocks of tests in m-files.  It would be convenient if there was a right click context-menu option (or if F9 could just 'know') that would strip out the %! from a test block and run the highlighted code. Bonus points if it wouldn't get confused if i the %!test line was also highlighted.

Nicholas Jankowski <nrjank>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-02 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 10.1.0 (current default)
        Planned ReleaseNone 10.1.0 (current default)
    2024-04-21 ttl StatusNone Ready For Test
    2024-04-10 nrjank Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code