* bug#11785: 24.1; term-mode doesn't respect first color change from a process
@ 2012-06-26 0:37 Michael Hoffman
2012-06-26 7:34 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Michael Hoffman @ 2012-06-26 0:37 UTC (permalink / raw)
To: 11785
A small test file will demonstrate this problem:
$ cat test.sh
#!/usr/bin/env bash
echo -e "\E[31mRed \E[32mGreen"
When running this, I expect to get "Red" in red and "Green" in green.
Running `emacs -Q --eval '(ansi-term "./test.sh")' with Emacs 24 results
in "Red" in black (not red as expected) and "Green" in green. Doing this
with Emacs 23.1 results in the expected behavior ("Red" in red).
In GNU Emacs 24.1.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
of 2012-06-21 on rhel5-x64.grid.gs.washington.edu
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
Configured using:
`configure '--without-gif' '--with-x' '--with-x-toolkit=gtk'
'--prefix=/net/gs/vol3/software/modules-sw/emacs/24.1/Linux/RHEL5/x86_64''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: en_US
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=SCIM
locale-coding-system: iso-latin-1-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x r e p o r <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#11785: 24.1; term-mode doesn't respect first color change from a process
2012-06-26 0:37 bug#11785: 24.1; term-mode doesn't respect first color change from a process Michael Hoffman
@ 2012-06-26 7:34 ` Glenn Morris
2012-06-26 20:28 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2012-06-26 7:34 UTC (permalink / raw)
To: Michael Hoffman; +Cc: 11785
Michael Hoffman wrote:
> $ cat test.sh
> #!/usr/bin/env bash
> echo -e "\E[31mRed \E[32mGreen"
>
> When running this, I expect to get "Red" in red and "Green" in green.
>
> Running `emacs -Q --eval '(ansi-term "./test.sh")' with Emacs 24 results
> in "Red" in black (not red as expected) and "Green" in green. Doing this
> with Emacs 23.1 results in the expected behavior ("Red" in red).
The issue first appears in 23.2. Removing the call to term-ansi-reset in
term-mode brings back the red.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#11785: 24.1; term-mode doesn't respect first color change from a process
2012-06-26 7:34 ` Glenn Morris
@ 2012-06-26 20:28 ` Glenn Morris
2012-07-06 2:07 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2012-06-26 20:28 UTC (permalink / raw)
To: Michael Hoffman; +Cc: 11785
More specifically, this seems to fix your problem.
I haven't checked yet if it has other consequences though:
*** lisp/term.el 2012-06-20 16:21:57 +0000
--- lisp/term.el 2012-06-26 20:26:20 +0000
***************
*** 961,967 ****
(setq term-ansi-current-reverse nil)
(setq term-ansi-current-color 0)
(setq term-ansi-current-invisible nil)
! (setq term-ansi-face-already-done t)
(setq term-ansi-current-bg-color 0))
(define-derived-mode term-mode fundamental-mode "Term"
--- 961,967 ----
(setq term-ansi-current-reverse nil)
(setq term-ansi-current-color 0)
(setq term-ansi-current-invisible nil)
! (setq term-ansi-face-already-done nil)
(setq term-ansi-current-bg-color 0))
(define-derived-mode term-mode fundamental-mode "Term"
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#11785: 24.1; term-mode doesn't respect first color change from a process
2012-06-26 20:28 ` Glenn Morris
@ 2012-07-06 2:07 ` Glenn Morris
2012-07-06 21:31 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2012-07-06 2:07 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11785, Michael Hoffman
Glenn Morris wrote:
> More specifically, this seems to fix your problem.
> I haven't checked yet if it has other consequences though:
>
> *** lisp/term.el 2012-06-20 16:21:57 +0000
> --- lisp/term.el 2012-06-26 20:26:20 +0000
> ***************
> *** 961,967 ****
> (setq term-ansi-current-reverse nil)
> (setq term-ansi-current-color 0)
> (setq term-ansi-current-invisible nil)
> ! (setq term-ansi-face-already-done t)
> (setq term-ansi-current-bg-color 0))
>
> (define-derived-mode term-mode fundamental-mode "Term"
> --- 961,967 ----
> (setq term-ansi-current-reverse nil)
> (setq term-ansi-current-color 0)
> (setq term-ansi-current-invisible nil)
> ! (setq term-ansi-face-already-done nil)
> (setq term-ansi-current-bg-color 0))
>
> (define-derived-mode term-mode fundamental-mode "Term"
Stefan, you have some comments in term.el saying that
term-ansi-face-already-done should perhaps be t in more places.
Maybe this example shows why it shouldn't be?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#11785: 24.1; term-mode doesn't respect first color change from a process
2012-07-06 2:07 ` Glenn Morris
@ 2012-07-06 21:31 ` Stefan Monnier
2012-09-27 7:07 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2012-07-06 21:31 UTC (permalink / raw)
To: Glenn Morris; +Cc: 11785, Michael Hoffman
> Stefan, you have some comments in term.el saying that
> term-ansi-face-already-done should perhaps be t in more places.
> Maybe this example shows why it shouldn't be?
I can't remember any of it and don't have time to look into it now,
so... I'll trust you on that, but in any case, it suggest complementing
my comment.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#11785: 24.1; term-mode doesn't respect first color change from a process
2012-07-06 21:31 ` Stefan Monnier
@ 2012-09-27 7:07 ` Glenn Morris
0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2012-09-27 7:07 UTC (permalink / raw)
To: 11785-done
Version: 24.3
Stefan Monnier wrote:
>> Stefan, you have some comments in term.el saying that
>> term-ansi-face-already-done should perhaps be t in more places.
>> Maybe this example shows why it shouldn't be?
>
> I can't remember any of it and don't have time to look into it now,
> so... I'll trust you on that, but in any case, it suggest complementing
> my comment.
I'm afraid I know nothing about what is going on here, I just saw by
experiment that reverting that change fixed the reported issue.
I committed it so it will hopefully get some testing that may reveal
whether or not there are any other consequences.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-27 7:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26 0:37 bug#11785: 24.1; term-mode doesn't respect first color change from a process Michael Hoffman
2012-06-26 7:34 ` Glenn Morris
2012-06-26 20:28 ` Glenn Morris
2012-07-06 2:07 ` Glenn Morris
2012-07-06 21:31 ` Stefan Monnier
2012-09-27 7:07 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.