fabiopapa · 2022-05-14 16:04
I have a log file that I would like to tail/follow in an emacs buffer, and it also has ANSI escape sequences for color that I would either want to display in right colours or just strip (for display) so that I can read the text. How can I do this? I’ve tried enabling both follow mode and ANSI mode, but when the buffer gets reverted/followed, ANSI mode turns off. Thanks for any help you can give.
kikechan · 2022-05-14 16:21
Off the top of my head, these are your (non-exhaustive) options:
- Make a function that calls `revert-buffer` and then the minor mode that you want, bind it to whatever you like.
- use .dir-locals.el https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
- set file local variables https://www.emacswiki.org/emacs/FileLocalVariables
- Add hook for the major-mode of that logfile that enables the minor mode you need
- Add hook to find-file / revert-buffer with the regex of your logfile that enables the minor mode you need
_viz_ · 2022-05-15 02:01
Have you tried auto-revert-tail-mode?
Jealous-Ad-7024 · 2022-05-15 10:04
How is itail-mode doing?