bugGNU Octave - Bugs: bug #57146, [GUI] F9 in GUI editor gives stray...


bug #57146: [GUI] F9 in GUI editor gives stray text

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Wed 30 Oct 2019 09:25:33 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Thu 14 Nov 2019 08:16:01 PM UTC, comment #14: 

Marking as fixed and closing report.

@Philip: You could open another bug report for the two trailing newlines after executing code.  On a Linux platform, it seems that it may be reversed.  I had the line "x = pi" in the editor and when I run that with F9 I get two newlines before the code is executed


x = pi
x = 3.1416

Rik <rik5>
Project Administrator
Thu 07 Nov 2019 07:23:03 PM UTC, comment #13: 

Changeset http://hg.savannah.gnu.org/hgweb/octave/rev/f18e48749a7a makes using F9 more robust in cases where the executed code results in an error.

Unfortunately, I have found no possibility to prevent the two newlines after executing the selected code.

Torsten Lilge <ttl>
Project Member
Sat 02 Nov 2019 01:43:44 PM UTC, comment #12: 

Works fine now, no more stray text, thanks.

But I find it a bit annoying that after every F9 action, two empty lines are entered in the terminal. Can those empty lines be avoided, please?

Philip Nienhuis <philipnienhuis>
Project Member
Fri 01 Nov 2019 09:20:56 PM UTC, comment #11: 

BTW I'll make a new cross-build for testing this bug report's fix tomorrow

Philip Nienhuis <philipnienhuis>
Project Member
Fri 01 Nov 2019 09:20:13 PM UTC, comment #10: 

Saw it, yes.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 01 Nov 2019 09:16:45 PM UTC, comment #9: 

Markus has just pushed a cset addressing your second concern by doing the canonicalization in a more "central" routine.

Torsten Lilge <ttl>
Project Member
Fri 01 Nov 2019 08:45:06 PM UTC, comment #8: 

Some remarks:

1. This cset may simplify some .m-file code in pkg.m and in a pending cset for bug #51632.

2. In bug #57083 comment #23 Rik noted that canonicalize_file_name, when used to fixup Windows-specific paths, had better be enclosed in an "if (ispc)" block. It's invoked here unconditionally.
Another reason to be careful is that on Windows, not all paths have been canonicalized (yet?). E.g., the OF-packages' ones were canonicalized but not those of core Octave, see e.g., verbatim block in comment #38 of bug #51632.
It could be (just a hunch) that Markus Muetzel is busy canonicalizing the core Octave paths as well; see bug #51632.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 01 Nov 2019 08:34:51 PM UTC, comment #7: 

Cset http://hg.savannah.gnu.org/hgweb/octave/rev/994db4a60d10 suppresses the extra prompt in the first line of the selected code run in the console.

Torsten Lilge <ttl>
Project Member
Fri 01 Nov 2019 07:55:11 PM UTC, comment #6: 

The warning message should disappear after cset http://hg.savannah.gnu.org/hgweb/octave/rev/1397742ea0fe

Qt provides the path of a QFileInfo object with "/", even in windows. This path is canonicalized in addpath (recent fix of bug #56267) making "\" from "/" in windows. The fix for this bug here is to just canonicalize the path in rmpath, too.

A cset for suppressing the first extra ">>" will follow.

Torsten Lilge <ttl>
Project Member
Thu 31 Oct 2019 04:20:37 PM UTC, comment #5: 

Thanks for testing. This seem to isolate the cause of the bug quite well. I'll have a look at this over the weekend.

Torsten Lilge <ttl>
Project Member
Thu 31 Oct 2019 12:07:31 PM UTC, comment #4: 

After pressing F9 in some function, C:\Users\<USERNAME>\AppData\Local\Temp\octave is still in the path.

(sorry I keep on mixing up rmdir and rmpath)

Philip Nienhuis <philipnienhuis>
Project Member
Thu 31 Oct 2019 07:24:27 AM UTC, comment #3: 

The directory should not be deleted but just removed from octave's path again. Is it included in your path after having used F9?

Torsten Lilge <ttl>
Project Member
Wed 30 Oct 2019 11:02:20 PM UTC, comment #2: 

├Łes I've got:
(note backslash fileseps)

I can shift other files into it, so yes I have write permission there.
Maybe it can't be deleted because inside there are files still locked by some other process; that is a situation I often encounter in some situations. The error message in that case could be misleading, but I'm unsure of it, I don't know rmpath().

I don't know whether that subdir "exists after F9", it exists now.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 30 Oct 2019 10:31:23 PM UTC, comment #1: 

Philip, thanks for the report. This is definitely related to my cset http://hg.savannah.gnu.org/hgweb/octave/rev/410622ac120f where temporary files are used for "Run Selection" now.

Some questions:

  • Do you have write access to the temp. directory that is mentioned in the warning message?
  • Does the subdir "octave" exists after using F9?
  • If not, what happens if you manually create it before using F9?
Torsten Lilge <ttl>
Project Member
Wed 30 Oct 2019 09:25:33 PM UTC, original submission:  

Since a few days, highlighting code in the GUI editor and pressing F9 yields a lot of text and sometimes errors and warnings in the terminal. An extra prompt is also displayed.

It looks like it copies lastwarn or lasterr.

E.g., with pkg.m in the editor, highlighting L.325 (but could be any line) and hitting F9:

>> >>   files = {};
warning: rmpath: C:/Users/philip/AppData/Local/Temp/octave: not found



>> lastwarn
ans = rmpath: C:/Users/philip/AppData/Local/Temp/octave: not found
>> lasterr
ans = 'actxserver' undefined near line 33, column 33

Philip Nienhuis <philipnienhuis>
Project 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 ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-14 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
    2019-11-01 philipnienhuis StatusReady For Test => None
    2019-11-01 ttl StatusNone => Ready For Test
    2019-10-30 ttl Item GroupUnexpected Error or Warning => Regression
        Summary[GUI} F9 in GUI editor gives stray text => [GUI] F9 in GUI editor gives stray text

    Back to the top

    Powered by Savane 3.6