tags:

views:

83

answers:

1

I'm an avid Emacs user and love shell-mode that in my opinion brings the best of two worlds: Emacs buffers and terminal emulators. For me shell-mode's biggest down fall is that ncurses based applications wouldn't render correctly. Having the need to design & code a little monitoring app in C that reads and write to standard input & output (think something like htop) I would love to use a framework, and I would really like my app to work in shell-mode, what framework would you recommend me to look at?

N.B: I'm not interested in capturing the mouse.

+3  A: 

There is nothing like ncurses that works under Emacs' shell-mode. This is a fundamental limitation of the design of comint-mode, which is what shell-mode is built on: it only works with programs that alternately read whole lines of plain text from stdin and write whole lines of plain text to stdout.

If you want to run something fancier, you need to use a full terminal emulator (which Emacs has, of course), or else to write an Emacs-specific front end that uses Emacs buffers natively.

Porculus
That's a good solution: in emacs term-mode using char-mode I can run htop just fine, then switching to line-mode I can treat it like an emacs buffer including scrolling up and down and searching all using my familiar emacs key bindings. thanks!
Mcradle