I'm trying to run mutt in ansi-term in the GUI on OS X. The refresh rate is really slow for some reason, so when I try to navigate between emails the result is pretty much unreadable. Has anyone found a workaround for this / is there a dedicated emacs mutt front end? Also, apparently this problem is way old. https://www.reddit.com/r/emacs/comments/bk8pd/best_emacs_mail_client_for_a_mutt_user/
The bi-directional text support introduced in Emacs 24 interacts badly with term.el when large numbers of spaces or tabs are inserted, and many applications clear the screen (often drawing a new background colour) by writing WIDTHxHEIGHT spaces (which, if the terminal’s dimensions are sufficiently large, may take several seconds).
The workaround is to prevent Emacs from guessing the text direction in term-mode, and simply enforce a left-to-right direction:
;; Terminal buffer configuration. (add-hook 'term-mode-hook 'my-term-mode-hook) (defun my-term-mode-hook () ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20611 (setq bidi-paragraph-direction 'left-to-right))
This workaround is enabled by default in
term-mode for Emacs 25.1 (and current pre-releases thereof), so manually configuring
term-mode-hook should only be necessary for Emacs 24.x.
The root of the problem has been fixed in the Emacs master branch (such that the workaround is not needed at all). That fix should be included in either Emacs 25.2 or 25.3.
I've also updated https://www.emacswiki.org/emacs/AnsiTermHints with the same information.
For the sake of searchability, here are the names of the applications I'm aware of which trigger this problem. These are mostly (if not all) curses- or ncurses-based -- presumably this method of screen refresh is a commonly-used curses function -- and so it is highly probable that many other curses applications will do the same thing.
- mc (midnight commander)