bugGNU Octave - Bugs: bug #48754, Ignore >> when copy pasting...

 
 

bug #48754: Ignore >> when copy pasting into Command Window

Submitted by:  Ceral Paquet <octavebugs>
Submitted on:  Wed 10 Aug 2016 10:28:02 PM UTC  
 
Category: GUISeverity: 1 - Wish
Priority: 1 - LaterItem Group: Feature Request
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 15 Aug 2016 10:17:53 PM UTC, comment #2:

Yes. The matlab commandline (matlab -nodisplay) errors out:

>> >> x = rand (1e8, 1);

>> x = rand (1e8, 1);
|
Error: Unexpected MATLAB operator.

Yes. Pasting the following

>> x = rand (1e8, 1);
>> mean(x)


results in

>> x = rand (1e8, 1);

mean(x)

ans =

0.5000

>>

Ceral Paquet <octavebugs>
Mon 15 Aug 2016 06:00:54 PM UTC, comment #1:

So this would be specific to the GUI? Does Matlab also remove any leading ">> " after a newline (if pasting a block of code)?

This is probably possible by filtering the paste buffer when the command window has the focus.

Mike Miller <mtmiller>
Project Administrator
Wed 10 Aug 2016 10:28:02 PM UTC, original submission:

Not really a bug, just a little thing.

When cut/pasting code that includes the >> prompt, the Matlab command windows automatically removes the >> and exectutes the code. Octave doesn't.

E.g. if you paste this string into Matlab command window

>> x = rand (1e8, 1);


then it removes the leading ">> ". It seems to detect this and only this leading string and removes it completely, i.e. what is pasted is "x = rand (1e8, 1);" without any trace of the ">> ". Manually typing in the string with leading >> gives a syntax error.

In Octave, cut and paste result in this:

>> >> x = rand (1e8, 1);

parse error:

syntax error

>>> >> x = rand (1e8, 1);


Would it be possible to filter off ">> " during paste?

Ceral Paquet <octavebugs>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by octavebugs (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Aug 2016 06:00:54 PM UTCmtmillerPriority5 - Normal=>1 - Later
      Release4.0.1=>dev
    Thu 11 Aug 2016 05:49:20 PM UTCrik5Carbon-CopyRemoved 72865=>-
    Thu 11 Aug 2016 05:49:07 PM UTCrik5CategoryNone=>GUI
      Severity3 - Normal=>1 - Wish
      Item GroupNone=>Feature Request

    Back to the top


    Powered by Savane 3.1-cleanup1