Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange underlining with TERM=xterm and emacs #51

Open
robnagler opened this issue Dec 11, 2017 · 4 comments
Open

Strange underlining with TERM=xterm and emacs #51

robnagler opened this issue Dec 11, 2017 · 4 comments

Comments

@robnagler
Copy link

Versions: terminado 0.8.1 and jupyter 1.0.0.

In radiasoft/jupyter.radiasoft.org#15 you'll see a screenshot of the issue. The terminal goes into underline mode when emacs starts, and stays in underline mode after exit. reset does clear the mode so I suspect the term init string.

The term init string itself seems right:

$ TERM=xterm tput init | od -c
0000000 033   [   !   p 033   [   ?   3   ;   4   l 033   [   4   l 033
0000020   >
0000021

However, TERM=xterm tput init does not put the terminal in underline mode.

You can clear the mode with the reset SGR:

$ printf '\e[m'

Therefore, it does appear that terminado/xterm.js is going into underline mode.

emacs, ncurses, etc. are all a couple of years old (Fedora 21) so I don't suspect them.

A workaround is to set TERM=ansi, which seems to avoid the issue, because there's no init for ansi.

@takluyver
Copy link
Member

What version of notebook are you using? This is likely to be a bug of xterm.js (which actually does the terminal emulation) rather than terminado (which passes the data through to it). Xterm.js is bundled in the notebook.

@robnagler
Copy link
Author

Thanks for the quick response! notebook 5.2.2. I also attached the full pip list.

I couldn't find a version in xterm.js, but the md5 is:

83343775b76ff1f25429f6b63ed5da3a  ./lib/python2.7/site-packages/notebook/static/components/xterm.js/dist/xterm.js

pip-list.txt

@takluyver
Copy link
Member

So the version of xterm we bundled was 2.9.2 - you can see it here:

https://github.com/jupyter/notebook/blob/5.2.2/bower.json#L27

That still appears to be the latest release, if you want to open an issue on xterm.js. I can't see a similar issue already there. It's possible that they'll tell you to come back here because terminado or Jupyter is setting something up wrong, but if that is the case, hopefully we can get a better idea what to fix.

@robnagler
Copy link
Author

Created xtermjs/xterm.js#1147. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants