Permalink
Browse files

Workaround coffee-repl printing garbage chars until upstream bug is f…

…ixed. See #30
  • Loading branch information...
1 parent 7fa390f commit 4a2e7f484c2ad7f50edb739153708f3dcdcfcd7e @jart jart committed Apr 21, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 coffee-mode.el
View
7 coffee-mode.el
@@ -254,7 +254,12 @@ with CoffeeScript."
(set-buffer
(apply 'make-comint "CoffeeREPL"
"env"
- nil (append (list "NODE_NO_READLINE=1" coffee-command) coffee-args-repl))))
+ nil (append (list "NODE_NO_READLINE=1" coffee-command) coffee-args-repl)))
+
+ ;; Workaround: https://github.com/defunkt/coffee-mode/issues/30
+ (set (make-local-variable 'comint-preoutput-filter-functions)
+ (cons (lambda (string)
+ (replace-regexp-in-string "\x1b\\[.[GJK]" "" string)) nil)))
(pop-to-buffer coffee-repl-buffer))

0 comments on commit 4a2e7f4

Please sign in to comment.