bugGNU Octave - Bugs: bug #57634, Pressing F9 in GUI editor echoes...

 
 

bug #57634: Pressing F9 in GUI editor echoes last command output as well

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Sun 19 Jan 2020 02:15:24 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * 6.0.90 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 26 Oct 2020 08:13:14 AM UTC, comment #24: 

Thanks Torsten also from me; this was a long-standing, somewhat elusive and often irritating issue for me :-)

And also thank you, Kai; it works fine in Windows but I simply didn't come around to test it on Linux.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 26 Oct 2020 06:58:13 AM UTC, comment #23: 

Thank you Torsten 👍

Confirmed to be fixed with Octave 6.0.92 on Linux and MS Windows.

Kai Torben Ohlhus <siko1056>
Group Member
Thu 22 Oct 2020 09:09:11 PM UTC, comment #22: 
Torsten Lilge <ttl>
Group Member
Sun 18 Oct 2020 09:32:51 PM UTC, comment #21: 

Yeah, I might have mentioned "debug" a bit earlier :-)

FTR, although release says "dev" this bug is also in 6.0.90 - I suppose it needs to be fixed here as well before 6.1 is released.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Oct 2020 08:20:12 PM UTC, comment #20: 

Sorry, typo: The effect does not show up for me when executing a command from the history.

Torsten Lilge <ttl>
Group Member
Sun 18 Oct 2020 08:17:44 PM UTC, comment #19: 

Ah, I forgot the debug mode. Confirmed on Windows and Linux. Actually, it is not just the output that is repeated, but the last command is executed a second time. This might be related to the fact that in debug mode, n new line repeats the last command.

However, the effect does show up for me when executing a command from the history.

Torsten Lilge <ttl>
Group Member
Sun 18 Oct 2020 07:56:12 PM UTC, comment #18: 

for xlsopen you'd need to load the io package.
But it should be reproducible in any function being debugged.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Oct 2020 07:54:44 PM UTC, comment #17: 

@Torsten:
Did you try on Windows or on Linux? In or out of debug mode?

I get the same if I double-click on a line in the command history.
So it looks like output of any command entered outside the editor (F9) gets repeated after F9's output.
It's always output from just the last command outside <F9>-in-the-editor that is repeated.
It's only in debug mode, in the function currently having "focus" (I mean where execution is). F9 on code in any "inactive" function or script in the editor doesn't provoke the bug.

I tried several editor and Command window settings, no difference.

Maybe a concrete example that works beautifully reproducible for me?

  • edit xlsopen
  • ## in xlsopen, set a breakpoint at -say- L.136 ("xlsintf_cnt = 1")
  • xls = xlsopen ("blahblah")  ## makes no difference, input validation not needed
  • select all of L. 139 ("xlssupport = 0") except ";", press F9
  • terminal just repeats xlssupport = 0 twice as it should
  • now enter "a = and (3)" in command line
  • go back to editor, again press F9 on L.139, now you should see "xlssupport = 0" twice followed by the output of "x = rand (3)"
  • <quit debug mode>


Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Oct 2020 06:12:31 PM UTC, comment #16: 

Unfortunately, I am still not able to reproduce this issue following the steps in comment #15 with a recent build from the default branch.

Does this effect also show up when you trigger a command by another way, like, e.g., via the context menu of an entry in the command history?

Torsten Lilge <ttl>
Group Member
Wed 14 Oct 2020 12:01:10 PM UTC, comment #15: 

I think I have a reliable way to reproduce it, at least reliable for me in debug mode.

1. Select a few lines or a (part of a) command, and press F9.
==> code will be copied to terminal and code output is shown.

2. In terminal, enter any command that displays output, e.g., "a = 1"   ## (w/o ending semicolon)
==> command + output of the command will be shown.

3. In editor, select code and press F9
==> selected code + output from it will be shown, followed by output of command in step 2.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 04 Jul 2020 12:49:24 PM UTC, comment #14: 

Thank you Torsten for considering our complains.  I think UX design is an art where someone will always complain.  That's why probably GUI settings are often super verbose to satisfy as many peoples needs as possible...

Regarding your choice of comment #12 I favor 1, too.  I hope it makes the least work for you and I do not really see the huge benefit of the markers.

Kai Torben Ohlhus <siko1056>
Group Member
Fri 03 Jul 2020 06:14:03 PM UTC, comment #13: 

You'll probably already know what my two cents would be for: option 1

But I'm also happy to accept any other option. (Maybe with my least favorite being option 3.)

Markus Mützel <mmuetzel>
Group administrator
Fri 03 Jul 2020 05:22:55 PM UTC, comment #12: 

I think there are three possibilities

  1. Dropping the grouping comments in console and history
  2. Dropping them in the console only
  3. Only adding them when there are at least n lines
Torsten Lilge <ttl>
Group Member
Fri 03 Jul 2020 04:46:00 PM UTC, comment #11: 

@Torsten: The begin and end marker lines are useful for longer inputs.

For my personal workflow, I don't like them that much.  As I said, when quickly checking the value of a variable by selecting and pressing F9, I just expect to see a value and maybe the selection mirrored in the console.  But seeing three lines made me "uncomfortable" of having received an error ^^

Kai Torben Ohlhus <siko1056>
Group Member
Fri 03 Jul 2020 04:37:15 PM UTC, comment #10: 

Two of three lines are the begin/end comments for grouping the selected code lines in the command window and history. This has already been discussed in bug #58323 and if others are not convinced that grouping those code lines is a good idea (like, e.g., Markus), we can drop these comments.

Torsten Lilge <ttl>
Group Member
Fri 03 Jul 2020 04:25:00 PM UTC, comment #9: 

@Torsten,Philip: Thanks for the clarification.  I just got surprised to see three lines of code in the command window, when just executing a small one-liner statement.  (I subliminally suspected I did an error.)  Maybe just a question of personal taste 😉

Nothing more then from my side.

Kai Torben Ohlhus <siko1056>
Group Member
Fri 03 Jul 2020 04:19:04 PM UTC, comment #8: 

@Kai, the code snippet is intended, as explained by Philip.

@Philip, I think the "old way" comment is an artifact from a previous temporary solution, since in case the new way wiht temp files was not possible you would just see an error dialog and nothing else.

Torsten Lilge <ttl>
Group Member
Fri 03 Jul 2020 02:32:43 PM UTC, comment #7: 

To me it looks deliberate, it's the part that echoes the selected commands to the terminal.

My report is about the previously selected line(s) that (I think) linger around and are copied after the currently selected code.

Just a hunch; looking at the code further down, could it be that on my box "the old way" (instead of a tmp file) is used which still has the previous commands?

Philip Nienhuis <philipnienhuis>
Group Member
Fri 03 Jul 2020 05:23:40 AM UTC, comment #6: 
Kai Torben Ohlhus <siko1056>
Group Member
Fri 03 Jul 2020 05:14:34 AM UTC, comment #5: 

Because of the (hopefully soon) upcoming release of Octave 6, I worked more with the GUI recently.
On openSUSE 15.1, cset 627da618dcc4 (01 Jul 2020) I see a similar issue echoing the selected and run output.


Kai Torben Ohlhus <siko1056>
Group Member
Sun 31 May 2020 08:18:44 PM UTC, comment #4: 

Yes it is and I also see this on Linux.

I wish I had a reliable way of reproducing it.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 31 May 2020 07:45:08 PM UTC, comment #3: 

Philip, is this still an issue after changeset http://hg.savannah.gnu.org/hgweb/octave/rev/777eb315b004 for bug #58323, which reorganizes the F9-behavior?

Torsten Lilge <ttl>
Group Member
Wed 19 Feb 2020 09:28:32 PM UTC, comment #2: 

What I sometimes see is that he name of the temporary editor file (octave_SOMECAPITALS) is echoed.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 19 Feb 2020 06:11:18 AM UTC, comment #1: 

Is there a way to reliably reproduce this in the meanwhile? I haven't seen the issue by now, neither on Linux, nor on Windows.

Torsten Lilge <ttl>
Group Member
Sun 19 Jan 2020 02:15:24 PM UTC, original submission:  

This is hard (for me) to explicitly reproduce but I hit it very often.

The first time one selects code in the editor and F9 is pressed the output of that code gets shown in the command pane, fine.

Next times F9 is pressed I often see that command pane output of previous commands follows the output of the newly selected code.
No real harm done but it leads to very clobbered output in the command pane.

I have no idea whether this is related to (closed) bug #57469.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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 mmuetzel (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-26 siko1056 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-10-22 ttl StatusNeed Info Ready For Test
    2020-10-19 siko1056 Releasedev 6.0.90
    2020-07-03 siko1056 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code