bugGNU Octave - Bugs: bug #49385, less gives error:...

 
 

bug #49385: less gives error: "undecodable token"

Submitted by:  None
Submitted on:  Wed 19 Oct 2016 12:16:17 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Yoni TeitelbaumOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.2
Operating System: GNU/Linux

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 Jump to the original submission)

Thu 03 Nov 2016 08:13:02 PM UTC, comment #7:

Yoni - thanks for the additional details. The combination of settings that you are running Octave in will no longer produce this error with Octave 4.2, so you can consider that fixed.

In Octave 4.0, if the TERM environment variable was set, Octave used it. But in Octave 4.2 we set TERM to xterm, because Octave is the terminal, it makes no sense to act as if Octave were tmux or screen when it knows that it isn't.

As a workaround if you run

in Octave, that should get rid of the spurious control characters for you.

Other pagers, though, may still send this escape sequence as I showed with vim. Does anyone care or should we close this as fixed?

Mike Miller <mtmiller>
Project Administrator
Thu 20 Oct 2016 06:50:21 PM UTC, comment #6:

Hi, original reporter of the bug here. (I only just now made an account).

@Kai, I'm running Ubuntu 14.04.

Some more specific information to reproduce this bug: it only occurs when I run octave from within a tmux session. I use tmux as part of my normal workflow, which is why I did it that way; there's no reason for me not to just run octave directly from the terminal or by clicking on the graphical icon. So I guess I'll just do that from now on.

I didn't try the zsh fix, mostly because I don't completely understand what this change is or how to carry it out quickly and reversibly. If it would be helpful in diagnosing and fixing an issue, I'm willing to try it, especially if someone can point me to some helpful reading material.

Yoni Teitelbaum <ytbaum>
Wed 19 Oct 2016 10:09:39 PM UTC, comment #5:

I see this escape sequence printed if I set PAGER=/usr/share/vim/vim80/macros/less.sh, which runs vim in a less pager emulation mode, and does generate these escape sequences.

So yes, the Octave qterminal is incompatible with vim as pager, and possibly other pagers or programs that may run in the terminal.

Mike Miller <mtmiller>
Project Administrator
Wed 19 Oct 2016 06:14:19 PM UTC, comment #4:

To be clear, I meant that the user should disable these escape sequences in their environment, not that Octave should be doing anything differently to handle/ignore them.

Other opinions?

I briefly looked at the qterminal code to handle ANSI escapes and it is a little hard to follow

http://hg.savannah.gnu.org/hgweb/octave/file/fb8b23754d76/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp#l287

Mike Miller <mtmiller>
Project Administrator
Wed 19 Oct 2016 06:10:03 PM UTC, comment #3:

Confirmed, I get the same when I run the following in Octave:

So this suggests there is something in the environment or in the less program that is printing the "standout" and "no standout" ANSI terminal escape sequences, but the Octave qterminal does not know how to interpret them.

Best answer here would be to disable these escape sequences (which is probably what the Arch wiki page is doing opaquely).

Mike Miller <mtmiller>
Project Administrator
Wed 19 Oct 2016 01:57:52 PM UTC, comment #2:

Is the last line in the following link relevant in your case?

https://wiki.archlinux.org/index.php/Octave#Zsh_Undecodable_Token

Pantxo Diribarne <pantxo>
Project Member
Wed 19 Oct 2016 01:33:26 PM UTC, comment #1:

Please be more specific about your Linux then. I cannot reproduce this error using openSUSE Tumbleweed, GNOME 3, Octave 4.2-rc2 and any GUI command window size.

If I run

in the repository, even online

http://hg.savannah.gnu.org/hgweb/octave/log?rev=undecodable+token

I cannot figure out a potential source of this error.

Kai Torben Ohlhus <siko1056>
Project Member
Wed 19 Oct 2016 12:16:17 PM UTC, original submission:

In the octave GUI, whenever I try to print out a matrix that is bigger than the terminal area, I get an error that looks like this:

This happens even if I do something as simple as:

repmat(1.1, 16, 16)

(The exact command to repro will probably depend on the size of your screen; the point is just to make a big enough matrix).

Anonymous

 

(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 rik5 (Updated the item)
  • -unavailable- added by ytbaum (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by siko1056 (Posted a comment)
  • -unavailable- added by None (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Nov 2016 07:16:47 PM UTCrik5StatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
    Wed 19 Oct 2016 01:34:02 PM UTCsiko1056Item GroupNone=>Incorrect Result
      StatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1