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:
- Running ansi-term on htop directly and inside an ansi-term running zsh.
- Manually sending a SIGWINCH w/
kill -28 $pid
to the htop process. Also to the parent zsh process when there was one. - 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?