4

I am having trouble running htop within an ansi-term in Emacs 24.2. It looks like some of the control characters are not interpreted correctly.

I thought ansi-term was capable of handling font control characters. Is there a way to have ansi-term work with graphical console applications?

Amelio Vazquez-Reina
  • 40,169
  • 77
  • 197
  • 294

2 Answers2

2

It works for me. Without a screenshot, there's not enough information in the question to guess what you were seeing. By the way, TERM=eterm-color (some users override TERM, which won't work well).

Here is a screenshot to illustrate the graphic characters:

enter image description here

If one sets TERM to xterm (something frequently done...), you can see it works not as well:

enter image description here

Without overriding TERM, htop looks fine:

enter image description here

but again, setting TERM=xterm works not as well:

enter image description here

Further reading:

Thomas Dickey
  • 75,040
  • 9
  • 171
  • 268
0

I have tried replicating your issue and I don't see the problem. I was able to run htop in ansi-term mode both in my tty window (using -nw) and in the graphical window.

David Paigen
  • 146
  • 2
  • 2
    Hmm, I am running Emacs 24.2 and while I am able to *run* `htop` within ansi-term, some of the characters are clearly not displayed correctly (e.g. at the top left of the window). I have also tried with `emacs -Q` and the problem persists. – Amelio Vazquez-Reina Dec 06 '12 at 23:24
  • @user815423426: Does changing the shell emacs uses fix the behavior? When entering emacs' term-mode, my emacs defaults to /bin/bash, and htop looks mangled. If I ask emacs to use /bin/dash, htop displays correctly. – jthetzel Sep 04 '14 at 11:18