emacs-bpr
emacs-bpr copied to clipboard
Add comint-output-filter so output is colorized
Add comint-output-filter to process so that ouput is colorized in the same way as async-shell-command.
shell-command has the following:
;; Use the comint filter for proper handling of carriage motion
;; (see `comint-inhibit-carriage-motion'),.
(set-process-filter proc 'comint-output-filter)
Thanks for the package!
I like the way async-shell-command colorized output as it is displayed. With bpr-colorize-output set, output first shows up with escape codes, then gets colorized when I hit enter on the next prompt.
After making the change in this PR, output is colorized on the fly.
Thank you, this is very nice improvement!
I think there is a problem when bpr-process-mode is not derived from comint mode. For example comint-output-filter doesn't work with fundamental mode.
Good catch. Would abpr-on-start defcustom be an option? Users could set this to a function that calls set-process-filter on the process.
Implemented in #12
Thanks, I've merged bpr-on-start pull request.
Regarding this PR - I can close it and add a note about bpr-on-start + comint-output-filter to the readme. On the other hand it nice to have this functionality built-in, I think it should be possible to use something like derived-mode-class or derived-mode-p to check that bpr-process-mode is derived from comint-mode. I'll try to investigate it deeper a bit later.