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

 
 

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

Submitter:  Ceral Paquet <octavebugs>
Submitted:  Wed 10 Aug 2016 10:28:02 PM UTC
   
 
Category:  GUI Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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 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 mtmiller (Posted a comment)
  • -email is unavailable- added by octavebugs (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
    2016-08-15 mtmiller Priority5 - Normal 1 - Later
        Release4.0.1 dev
    2016-08-11 rik5 Carbon-CopyRemoved 72865 -
    2016-08-11 rik5 CategoryNone GUI
        Severity3 - Normal 1 - Wish
        Item GroupNone Feature Request

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code