2

I am trying to run htop in ansi-term in a graphical (X session) emacs, and htop won't resize. Whatever size the window/frame is when I start htop is the size it continues to try rendering at forever.

Things I've tried:

  1. Running ansi-term on htop directly and inside an ansi-term running zsh.
  2. Manually sending a SIGWINCH w/ kill -28 $pid to the htop process. Also to the parent zsh process when there was one.
  3. Telling emacs to send the signal with emacsclient eval'ing (signal-process nil 28) and with (signal-process (get-buffer-process (get-buffer "mybuffername")) 28). I know the signal gets through because sending signal 29 kills the process.

Interestingly plain ol' top does resize, but only when the frame containing its buffer has X input focus. Htop still doesn't resize regardless of focus though. Also interestingly emacs itself running in console mode in ansi-term does resize, but only when given input. So you have to press up or down or write a character first or something.

Ideally all 3 would always resize immediately when the window does. Emacs has a hook for detecting this, I just need to know what to tell the hook to do.

Any ideas?

Joseph Garvin
  • 20,727
  • 18
  • 94
  • 165
  • 1
    Did you try `proced`? – abo-abo Nov 29 '14 at 10:58
  • This is my first time hearing of it and it looks awesome. – Joseph Garvin Nov 29 '14 at 17:39
  • It really is: `isearch`, `occur` or any other Emacs feature is readily available in `proced`. – abo-abo Nov 29 '14 at 18:42
  • Unfortunately proced updates really slowly, even when I set its update interval to 1 second. The CPU usage still seems to change extremely slowly, to the point where I'm not confident its accurate at all. I can do actions in an app that cause my CPU to vary wildly in top and proced will show a constant 15%. – Joseph Garvin Dec 03 '14 at 04:09

0 Answers0