You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does address a similar problem (re ANSI color sequences) with elpy+ipython.
But when I
M-x load-library [RET] realgud [RET]
M-x realgud:ipdb [RET]
from within a python buffer, I get a new ipdb interpreter in another window (that appears to be working as expected). But I get the above mentioned ANSI color escape sequence problem:
Although beggars can't be choosers, my suggestion would be to document the problem in general: ANSI escape codes in Emacs shells, and then under ipdb notes add a mention to that along with your sample shell script that disables ANSI control codes. Thanks in advance.
I've added entries to the wiki. I may also try more aggressive ANSI Escape code filtering in the future.
@stnbu@eflanigan00@xkal36 I have just created a branch that may address this by filtering out all ANSI escape codes. Try this patch and let me know if this helps:
diff --git a/realgud/common/track.el b/realgud/common/track.el
index f26a0ed..3097de0 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -41,6 +41,11 @@
:type 'symbolp
:group 'realgud)
+(defcustom realgud-strip-ansi? nil
+"If non-nil, set strip ANSI control characters from output text we see"
+ :type 'symbolp
+ :group 'realgud)
+
(declare-function fn-p-to-fn?-alias 'realgud-helper)
(declare-function realgud-bp-add-info 'realgud-bp)
(declare-function realgud-bp-del-info 'realgud-bp)
@@ -182,7 +187,8 @@ evaluating (realgud-cmdbuf-info-loc-regexp realgud-cmdbuf-info)"
(interactive "r")
(if (> from to) (psetq to from from to))
- (let* ((text (buffer-substring-no-properties from to))
+ (let* ((raw-text (buffer-substring-no-properties from to))
+ (text (if realgud-strip-ansi? (ansi-color-filter-apply raw-text) raw-text))
(loc (realgud-track-loc text cmd-mark))
;; If we see a selected frame number, it is stored
;; in frame-num. Otherwise, nil.
@stnbu commented on Thu Apr 20 2017
I'm quite new to emacs so please forgive any stupid...
I have the following in my ~/.emacs
This does address a similar problem (re ANSI color sequences) with elpy+ipython.
But when I
from within a python buffer, I get a new ipdb interpreter in another window (that appears to be working as expected). But I get the above mentioned ANSI color escape sequence problem:
From my package listing buffer:
@eflanigan00 commented on Thu Jul 13 2017
Anyone know anything about this? I'm having the same problem.
@xkal36 commented on Sun Aug 13 2017
I came across this problem also. I detailed my fix here: https://emacs.stackexchange.com/questions/34854/ipdb-displaying-ansi-color-escape-sequences
@rocky commented on Sun Aug 13 2017
@xkal36
I'd be grateful if you documented the workaround in off of https://github.com/realgud/realgud/wikiAlthough beggars can't be choosers, my suggestion would be to document the problem in general: ANSI escape codes in Emacs shells, and then under ipdb notes add a mention to that along with your sample shell script that disables ANSI control codes. Thanks in advance.I've added entries to the wiki. I may also try more aggressive ANSI Escape code filtering in the future.
@rocky commented on Tue Aug 15 2017
@stnbu @eflanigan00 @xkal36 I have just created a branch that may address this by filtering out all ANSI escape codes. Try this patch and let me know if this helps:
It is also in the strip-ansi-var branch on github.
The text was updated successfully, but these errors were encountered: