bugGNU Octave - Bugs: bug #40272, Issues with "run...

 
 

bug #40272: Issues with "run selection" from editor

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Mon 14 Oct 2013 09:14:40 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:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 16 Oct 2013 09:24:46 PM UTC, comment #8: 

Yes, fixed with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/b7670c05731b
and closing this report

Torsten Lilge <ttl>
Group Member
Wed 16 Oct 2013 08:48:13 PM UTC, comment #7: 

Yes it does the trick, both on my Linux box and on WinXP and Win7.

I saw no side effects when copying from history to terminal (but I never saw that happening, this bug only applied to running a selection from the editor.)

Thanks!

Will you push it and close this bug report?

Philip Nienhuis <philipnienhuis>
Group Member
Wed 16 Oct 2013 06:04:49 AM UTC, comment #6: 

Then this new patch should do the trick.
Please apply it instead of the first one.

Btw: Are there similar effects when evaluating (maybe several) selected entries of the history widget?


(file #29385)

Torsten Lilge <ttl>
Group Member
Tue 15 Oct 2013 10:07:33 PM UTC, comment #5: 

OK Torsten,

works now on Windows as well. But there are still Esc characters shown:


>> x = 0:0.1:10;^M
>> for ii=1:10^M
figure();^M
plot (x, sin(x * log (ii)));^M
endfor^M
>>


(Mabe those ^M made half of my bug report disappear?)

Philip Nienhuis <philipnienhuis>
Group Member
Tue 15 Oct 2013 08:55:57 PM UTC, comment #4: 

Update:

At least your patch does work in Linux - I now get the plots.
So far so good!

Building on MXE right now, but it is almost bed time here.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 15 Oct 2013 08:45:07 PM UTC, comment #3: 

Your complete bug report is visible in the mailing list.

Your example works with my patch: x is set and 10 figures are plotted. Without patch only x is set as you described in your report. Does the patch fix the issue on your linux system, too?


Torsten Lilge <ttl>
Group Member
Tue 15 Oct 2013 08:36:43 PM UTC, comment #2: 

Thank you Torsten

I see now that only half of my bug report came through.

It doesn't work on Linux either. On Linux I only get as far as creation of variable "x", but the loop does nothing. The only difference with Windows is that on Linux I see no control (Esc) characters.

Does my example work with your patch on Linux for you?

Yes I'll try on Windows but only tomorrow night at the earliest; perhaps someone beats me to it.
(On Linux I first need to build and do "make all dist", then transfer it to MXE, cross-build there, and then transfer + install on Windows. Looks convoluted; but building using MXE tools natively on Windows simply takes longer, even for just a small patch.)

Philip Nienhuis <philipnienhuis>
Group Member
Tue 15 Oct 2013 07:49:26 PM UTC, comment #1: 

Could you please test the attached patch? It fixes the issue on my system (ubuntu) but I have no possibility to test on windows at the moment.

(file #29382)

Torsten Lilge <ttl>
Group Member
Mon 14 Oct 2013 09:14:40 PM UTC, original submission:  

Changeset 17636:230ffaf80ac9 "fix enabling copy, cut and run selection actions depending on selected text" (warmly welcomed! thanks for making this) has problems.

For example, the following sequence in the editor:


x = 1:0.1:10;
for ii=1:10
  figure ();
  plot (x, sin (x * log (ii)));
endfor


(note newline/empty line included in selection)
gives in the GUI terminal on MinGW:

-verbatim-
x = 1:0.1:10;^M^Jfor ii=1:10^M^J  figure ();^M^J  plot (x, sin (x * log (ii)));^M^Jendfor


...and nothing happens, no error messages either, except that (only) variable x appears in the workspace.
I first thought the inserted Esc characters spoiled the party. However, when doing the same on Linux no Esc characters appear but no plots are produced either, and also here only variable x is created. (Apparently the ^M^J are EOLs)
Indentation or not makes no difference.

Simply copy/paste using Ctrl-C in editor and Ctrl-V in the terminal makes the show run fine on MinGW and Linux.

Then again, a simple
tic; a = 10; toc
goes fine on MinGW and Linux.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29385:  run_selected_v02.patch added by ttl (868B - text/x-diff)
file #29382:  run_selected.patch added by ttl (872B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Updated the item)
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-16 ttl StatusNone Fixed
        Open/ClosedOpen Closed
    2013-10-16 ttl Attached File- Added run_selected_v02.patch, #29385
    2013-10-15 ttl Attached File- Added run_selected.patch, #29382

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code