~abcdw/rde-devel

emacs-arei: Add option to apply ANSI colors v1 NEEDS REVISION

Nicolas Graves: 1
 Add option to apply ANSI colors

 2 files changed, 7 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~abcdw/rde-devel/patches/56875/mbox | git am -3
Learn more about email & git

[PATCH emacs-arei] Add option to apply ANSI colors Export this patch

---
 arei-client.el     | 3 +++
 arei-evaluation.el | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arei-client.el b/arei-client.el
index bbd2ff2..1072d5f 100644
--- a/arei-client.el
+++ b/arei-client.el
@@ -46,6 +46,9 @@ and responses.")
(defvar arei-client--sesman-session-cache (make-hash-table :test 'equal)
  "Session cache for `arei-connection-buffer'.")

(defvar arei-client-ansi-out nil
  "Whether `ansi-color-apply' should be executed when printing out.")



;;;
;;; Sesman
diff --git a/arei-evaluation.el b/arei-evaluation.el
index b3c7a85..5050a91 100644
--- a/arei-evaluation.el
+++ b/arei-evaluation.el
@@ -28,6 +28,7 @@
(require 'arei-syntax)
(require 'arei-nrepl)
(require 'arei-ui)
(autoload 'ansi-color-apply "ansi-color")

(eval-when-compile (require 'map))
(eval-when-compile (require 'pcase))
@@ -57,7 +58,9 @@
         (when (member "need-input" status)
           (arei--send-stdin))
         (when out
           (insert out))
           (insert (if arei-client-ansi-out
                       (ansi-color-apply out)
                     out)))
         (when err
           (insert (propertize err 'face
                               '((t (:inherit font-lock-warning-face))))))
-- 
2.47.1