I'm currently started using tmux because of getting tired of term-mode, and I managed to shortcut in tmux to open current session output in emacs so I could search and select from it in emacs. I have the only problem - I wish for emacs buffer to display term session output with the same color highlighting - for directories to be blue e.g. As I understand it is doable since term-mode is able of that somehow. Can anyone point me how to copy text with such face overlays from terminal to emacs?
I found answer by my own - part of rendering ansi color codes in emacs originally answered here, I will double it here:
(require 'ansi-color) (defun display-ansi-colors () (interactive) (ansi-color-apply-on-region (point-min) (point-max)))
As for copying tmux buffer to with ansi codes for color - also was already answered here, and it here also:
bind H capture-pane -e \; save-buffer ~/tmux.hardcopy \; delete-buffer