From unknown Tue Aug 19 04:06:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12792 <12792@debbugs.gnu.org> To: bug#12792 <12792@debbugs.gnu.org> Subject: Status: 24.2.50; shell-mode renders all its output in a yellow face Reply-To: bug#12792 <12792@debbugs.gnu.org> Date: Tue, 19 Aug 2025 11:06:42 +0000 retitle 12792 24.2.50; shell-mode renders all its output in a yellow face reassign 12792 emacs submitter 12792 Dima Kogan severity 12792 normal tag 12792 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 04:58:55 2012 Received: (at submit) by debbugs.gnu.org; 3 Nov 2012 08:58:55 +0000 Received: from localhost ([127.0.0.1]:46648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUZZ7-0006Fq-Lo for submit@debbugs.gnu.org; Sat, 03 Nov 2012 04:58:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55784) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUZZ2-0006Ff-JX for submit@debbugs.gnu.org; Sat, 03 Nov 2012 04:58:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUZWC-0000EU-Qc for submit@debbugs.gnu.org; Sat, 03 Nov 2012 04:55:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUZWC-0000EO-Ld for submit@debbugs.gnu.org; Sat, 03 Nov 2012 04:55:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUZW9-0007rl-Rc for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2012 04:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUZW6-0000Dj-9d for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2012 04:55:49 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUZW6-0000Ce-2e for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2012 04:55:46 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E22722017A for ; Sat, 3 Nov 2012 04:55:43 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute2.internal (MEProxy); Sat, 03 Nov 2012 04:55:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=9WVas9jUCuqlYDOkgHl+5mpW4QY=; b=g1sW4xYvPEpg6+vjMClzX Qz6l2aTyAFrb3n458QxmCwSL2lBsUeUZHTxrs1NE0imBQYEn/sJSS5ClsH4QGZTo CzjpfhAJr6uoAZxwlvr4tAEz7yDKxKNdH2V4S9/VMFj0gKwkt4PMdeOKiPf4zjFm z0d5MB+Iv3ByipQ3vCmcuk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=9WVas9jUCuqlYDOkgHl+5m pW4QY=; b=mFyiMoCgNR2ac+TXkos4hG5O9J5tMdiqh6S25GS9NTT3S7fS49jh/m rx0/5jTAfNxFcZt74vC9YCoF8sQ7JAYkn3xuSkEauqlH1sao8W3iy5QVeo/tXrHP wIQHB/sVTn5AIkbFjBNxoBhg7BRnYuw00LhVOujZ9RJY+Fm+2UVko= X-Sasl-enc: 232QrIlFMN0MfhidoywYaPL2/Cg/al0p7hNKIDo5Dg+s 1351932943 Received: from shorty.local (unknown [76.169.242.46]) by mail.messagingengine.com (Postfix) with ESMTPA id 7C0BD8E01B2 for ; Sat, 3 Nov 2012 04:55:43 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.80) (envelope-from ) id 1TUZW1-0004kX-7h for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2012 01:55:41 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 24.2.50; shell-mode renders all its output in a yellow face Date: Sat, 03 Nov 2012 01:55:40 -0700 Message-ID: <871ugbxdyr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) I'm using a very recent emacs snapshot. shell-mode no longer renders the ANSI-code colors correctly. Even with a relatively stock bash, All output is rendered in yellow except for the prompt line. The prompt isn't yellow, but it's wrong also: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11883 This is a regression, since both the output in general and the prompt in particular have been rendered correctly previously. I did a bisection, and tracked the issues down to two commits. The prompt coloring broke in http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ansi-color.el?id=cd49cea06bb1c492d4d024889f3f320bf4c9b507 After that commit the general output still looks correct, but the prompt isn't colored. Then later on, the rest of the output rendering broke in http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ansi-color.el?id=1bc85494c3236fa27cd8456635a4109aeed48344 If I back out these two commits, the colors look correct, same as they did in emacs23. It's still not perfect, but it's 99% right instead of 99% wrong. Thanks. In GNU Emacs 24.2.50.1 (x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2012-10-18 on dex, modified by Debian (emacs-snapshot package, version 2:20121101-1) Windowing system distributor `The X.Org Foundation', version 11.0.11204000 System Description: Debian GNU/Linux unstable (sid) Configured using: `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.2.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/' '--with-x=yes' '--with-x-toolkit=lucid' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: C value of $LANG: C locale-coding-system: nil default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: which-function-mode: t diff-auto-refine-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t global-hl-line-mode: t global-subword-mode: t subword-mode: t show-paren-mode: t shell-dirtrack-mode: t auto-insert-mode: t winner-mode: t iswitchb-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-k M-k M-k C-s C-w C-w C-w C-w C-w C-w C-w C-w C-w C-s C-s C-s C-s C-s C-s C-s C-s C-SPC M-w C-y C-x C-s C-x 1 C-x C-w ~ / . e m a c s . d C-x C-f C-x C-f C-g C-x C-f . d g C-s C-w C-w C-w C-w C-x b C-s C-s C-s C-s C-s a c e - f C-x k C-s C-s C-w C-w C-s C-s C-s C-s q M-x r e p o r t e Recent messages: Saving file /home/dima/.emacs.d/ansi-color.el... Wrote /home/dima/.emacs.d/ansi-color.el Quit Mark saved where search started [2 times] Error during redisplay: (eval (replace-regexp-in-string "%" "%%" (gethash (selected-window) which-func-table which-func-unknown))) signaled (wrong-type-argument arrayp nil) [4 times] Type C-x 1 to delete the help window. Mark saved where search started [2 times] Mark set Mark saved where search started When done with this frame, type C-x 5 0 Load-path shadows: /usr/share/emacs/24.2.50/site-lisp/cscope/xcscope hides /usr/share/emacs/site-lisp/xcscope /usr/share/emacs/24.2.50/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs-snapshot/site-lisp/easypg/epg hides /usr/share/emacs/24.2.50/lisp/epg /usr/share/emacs-snapshot/site-lisp/easypg/epa-dired hides /usr/share/emacs/24.2.50/lisp/epa-dired /home/dima/.emacs.d/ansi-color hides /usr/share/emacs/24.2.50/lisp/ansi-color /usr/share/emacs-snapshot/site-lisp/easypg/epg-config hides /usr/share/emacs/24.2.50/lisp/epg-config /usr/share/emacs-snapshot/site-lisp/easypg/epa hides /usr/share/emacs/24.2.50/lisp/epa /usr/share/emacs-snapshot/site-lisp/easypg/epa-file hides /usr/share/emacs/24.2.50/lisp/epa-file /usr/share/emacs-snapshot/site-lisp/easypg/epa-mail hides /usr/share/emacs/24.2.50/lisp/epa-mail /usr/share/emacs-snapshot/site-lisp/org-mode/org-list hides /usr/share/emacs/24.2.50/lisp/org/org-list /usr/share/emacs-snapshot/site-lisp/org-mode/ob-screen hides /usr/share/emacs/24.2.50/lisp/org/ob-screen /usr/share/emacs-snapshot/site-lisp/org-mode/org-protocol hides /usr/share/emacs/24.2.50/lisp/org/org-protocol /usr/share/emacs-snapshot/site-lisp/org-mode/org-footnote hides /usr/share/emacs/24.2.50/lisp/org/org-footnote /usr/share/emacs-snapshot/site-lisp/org-mode/org-docview hides /usr/share/emacs/24.2.50/lisp/org/org-docview /usr/share/emacs-snapshot/site-lisp/org-mode/org-pcomplete hides /usr/share/emacs/24.2.50/lisp/org/org-pcomplete /usr/share/emacs-snapshot/site-lisp/org-mode/ob-sh hides /usr/share/emacs/24.2.50/lisp/org/ob-sh /usr/share/emacs-snapshot/site-lisp/org-mode/org-irc hides /usr/share/emacs/24.2.50/lisp/org/org-irc /usr/share/emacs-snapshot/site-lisp/org-mode/ob-maxima hides /usr/share/emacs/24.2.50/lisp/org/ob-maxima /usr/share/emacs-snapshot/site-lisp/org-mode/org-mac-message hides /usr/share/emacs/24.2.50/lisp/org/org-mac-message /usr/share/emacs-snapshot/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/24.2.50/lisp/org/org-bibtex /usr/share/emacs-snapshot/site-lisp/org-mode/ob-asymptote hides /usr/share/emacs/24.2.50/lisp/org/ob-asymptote /usr/share/emacs-snapshot/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/24.2.50/lisp/org/org-bbdb /usr/share/emacs-snapshot/site-lisp/org-mode/ob hides /usr/share/emacs/24.2.50/lisp/org/ob /usr/share/emacs-snapshot/site-lisp/org-mode/ob-lilypond hides /usr/share/emacs/24.2.50/lisp/org/ob-lilypond /usr/share/emacs-snapshot/site-lisp/org-mode/org-exp-blocks hides /usr/share/emacs/24.2.50/lisp/org/org-exp-blocks /usr/share/emacs-snapshot/site-lisp/org-mode/org-icalendar hides /usr/share/emacs/24.2.50/lisp/org/org-icalendar /usr/share/emacs-snapshot/site-lisp/org-mode/ob-gnuplot hides /usr/share/emacs/24.2.50/lisp/org/ob-gnuplot /usr/share/emacs-snapshot/site-lisp/org-mode/org-src hides /usr/share/emacs/24.2.50/lisp/org/org-src /usr/share/emacs-snapshot/site-lisp/org-mode/org-w3m hides /usr/share/emacs/24.2.50/lisp/org/org-w3m /usr/share/emacs-snapshot/site-lisp/org-mode/ob-css hides /usr/share/emacs/24.2.50/lisp/org/ob-css /usr/share/emacs-snapshot/site-lisp/org-mode/ob-ledger hides /usr/share/emacs/24.2.50/lisp/org/ob-ledger /usr/share/emacs-snapshot/site-lisp/org-mode/org-wl hides /usr/share/emacs/24.2.50/lisp/org/org-wl /usr/share/emacs-snapshot/site-lisp/org-mode/org-mew hides /usr/share/emacs/24.2.50/lisp/org/org-mew /usr/share/emacs-snapshot/site-lisp/org-mode/org-mks hides /usr/share/emacs/24.2.50/lisp/org/org-mks /usr/share/emacs-snapshot/site-lisp/org-mode/ob-python hides /usr/share/emacs/24.2.50/lisp/org/ob-python /usr/share/emacs-snapshot/site-lisp/org-mode/ob-shen hides /usr/share/emacs/24.2.50/lisp/org/ob-shen /usr/share/emacs-snapshot/site-lisp/org-mode/ob-tangle hides /usr/share/emacs/24.2.50/lisp/org/ob-tangle /usr/share/emacs-snapshot/site-lisp/org-mode/ob-haskell hides /usr/share/emacs/24.2.50/lisp/org/ob-haskell /usr/share/emacs-snapshot/site-lisp/org-mode/ob-eval hides /usr/share/emacs/24.2.50/lisp/org/ob-eval /usr/share/emacs-snapshot/site-lisp/org-mode/org-rmail hides /usr/share/emacs/24.2.50/lisp/org/org-rmail /usr/share/emacs-snapshot/site-lisp/org-mode/org-habit hides /usr/share/emacs/24.2.50/lisp/org/org-habit /usr/share/emacs-snapshot/site-lisp/org-mode/org-exp hides /usr/share/emacs/24.2.50/lisp/org/org-exp /usr/share/emacs-snapshot/site-lisp/org-mode/ob-mscgen hides /usr/share/emacs/24.2.50/lisp/org/ob-mscgen /usr/share/emacs-snapshot/site-lisp/org-mode/org-gnus hides /usr/share/emacs/24.2.50/lisp/org/org-gnus /usr/share/emacs-snapshot/site-lisp/org-mode/ob-plantuml hides /usr/share/emacs/24.2.50/lisp/org/ob-plantuml /usr/share/emacs-snapshot/site-lisp/org-mode/org-ascii hides /usr/share/emacs/24.2.50/lisp/org/org-ascii /usr/share/emacs-snapshot/site-lisp/org-mode/ob-octave hides /usr/share/emacs/24.2.50/lisp/org/ob-octave /usr/share/emacs-snapshot/site-lisp/org-mode/org-entities hides /usr/share/emacs/24.2.50/lisp/org/org-entities /usr/share/emacs-snapshot/site-lisp/org-mode/ob-dot hides /usr/share/emacs/24.2.50/lisp/org/ob-dot /usr/share/emacs-snapshot/site-lisp/org-mode/ob-latex hides /usr/share/emacs/24.2.50/lisp/org/ob-latex /usr/share/emacs-snapshot/site-lisp/org-mode/ob-java hides /usr/share/emacs/24.2.50/lisp/org/ob-java /usr/share/emacs-snapshot/site-lisp/org-mode/org-indent hides /usr/share/emacs/24.2.50/lisp/org/org-indent /usr/share/emacs-snapshot/site-lisp/org-mode/org-table hides /usr/share/emacs/24.2.50/lisp/org/org-table /usr/share/emacs-snapshot/site-lisp/org-mode/org-eshell hides /usr/share/emacs/24.2.50/lisp/org/org-eshell /usr/share/emacs-snapshot/site-lisp/org-mode/ob-org hides /usr/share/emacs/24.2.50/lisp/org/ob-org /usr/share/emacs-snapshot/site-lisp/org-mode/ob-exp hides /usr/share/emacs/24.2.50/lisp/org/ob-exp /usr/share/emacs-snapshot/site-lisp/org-mode/ob-keys hides /usr/share/emacs/24.2.50/lisp/org/ob-keys /usr/share/emacs-snapshot/site-lisp/org-mode/ob-ref hides /usr/share/emacs/24.2.50/lisp/org/ob-ref /usr/share/emacs-snapshot/site-lisp/org-mode/org-id hides /usr/share/emacs/24.2.50/lisp/org/org-id /usr/share/emacs-snapshot/site-lisp/org-mode/ob-sass hides /usr/share/emacs/24.2.50/lisp/org/ob-sass /usr/share/emacs-snapshot/site-lisp/org-mode/ob-picolisp hides /usr/share/emacs/24.2.50/lisp/org/ob-picolisp /usr/share/emacs-snapshot/site-lisp/org-mode/ob-sqlite hides /usr/share/emacs/24.2.50/lisp/org/ob-sqlite /usr/share/emacs-snapshot/site-lisp/org-mode/org-xoxo hides /usr/share/emacs/24.2.50/lisp/org/org-xoxo /usr/share/emacs-snapshot/site-lisp/org-mode/ob-calc hides /usr/share/emacs/24.2.50/lisp/org/ob-calc /usr/share/emacs-snapshot/site-lisp/org-mode/org-mhe hides /usr/share/emacs/24.2.50/lisp/org/org-mhe /usr/share/emacs-snapshot/site-lisp/org-mode/org hides /usr/share/emacs/24.2.50/lisp/org/org /usr/share/emacs-snapshot/site-lisp/org-mode/org-docbook hides /usr/share/emacs/24.2.50/lisp/org/org-docbook /usr/share/emacs-snapshot/site-lisp/org-mode/org-mouse hides /usr/share/emacs/24.2.50/lisp/org/org-mouse /usr/share/emacs-snapshot/site-lisp/org-mode/org-html hides /usr/share/emacs/24.2.50/lisp/org/org-html /usr/share/emacs-snapshot/site-lisp/org-mode/ob-ditaa hides /usr/share/emacs/24.2.50/lisp/org/ob-ditaa /usr/share/emacs-snapshot/site-lisp/org-mode/ob-ocaml hides /usr/share/emacs/24.2.50/lisp/org/ob-ocaml /usr/share/emacs-snapshot/site-lisp/org-mode/ob-lisp hides /usr/share/emacs/24.2.50/lisp/org/ob-lisp /usr/share/emacs-snapshot/site-lisp/org-mode/org-jsinfo hides /usr/share/emacs/24.2.50/lisp/org/org-jsinfo /usr/share/emacs-snapshot/site-lisp/org-mode/org-odt hides /usr/share/emacs/24.2.50/lisp/org/org-odt /usr/share/emacs-snapshot/site-lisp/org-mode/org-macs hides /usr/share/emacs/24.2.50/lisp/org/org-macs /usr/share/emacs-snapshot/site-lisp/org-mode/org-freemind hides /usr/share/emacs/24.2.50/lisp/org/org-freemind /usr/share/emacs-snapshot/site-lisp/org-mode/org-archive hides /usr/share/emacs/24.2.50/lisp/org/org-archive /usr/share/emacs-snapshot/site-lisp/org-mode/org-latex hides /usr/share/emacs/24.2.50/lisp/org/org-latex /usr/share/emacs-snapshot/site-lisp/org-mode/org-crypt hides /usr/share/emacs/24.2.50/lisp/org/org-crypt /usr/share/emacs-snapshot/site-lisp/org-mode/ob-emacs-lisp hides /usr/share/emacs/24.2.50/lisp/org/ob-emacs-lisp /usr/share/emacs-snapshot/site-lisp/org-mode/ob-clojure hides /usr/share/emacs/24.2.50/lisp/org/ob-clojure /usr/share/emacs-snapshot/site-lisp/org-mode/org-lparse hides /usr/share/emacs/24.2.50/lisp/org/org-lparse /usr/share/emacs-snapshot/site-lisp/org-mode/org-colview hides /usr/share/emacs/24.2.50/lisp/org/org-colview /usr/share/emacs-snapshot/site-lisp/org-mode/org-taskjuggler hides /usr/share/emacs/24.2.50/lisp/org/org-taskjuggler /usr/share/emacs-snapshot/site-lisp/org-mode/ob-matlab hides /usr/share/emacs/24.2.50/lisp/org/ob-matlab /usr/share/emacs-snapshot/site-lisp/org-mode/org-faces hides /usr/share/emacs/24.2.50/lisp/org/org-faces /usr/share/emacs-snapshot/site-lisp/org-mode/ob-table hides /usr/share/emacs/24.2.50/lisp/org/ob-table /usr/share/emacs-snapshot/site-lisp/org-mode/org-capture hides /usr/share/emacs/24.2.50/lisp/org/org-capture /usr/share/emacs-snapshot/site-lisp/org-mode/ob-js hides /usr/share/emacs/24.2.50/lisp/org/ob-js /usr/share/emacs-snapshot/site-lisp/org-mode/org-mobile hides /usr/share/emacs/24.2.50/lisp/org/org-mobile /usr/share/emacs-snapshot/site-lisp/org-mode/org-agenda hides /usr/share/emacs/24.2.50/lisp/org/org-agenda /usr/share/emacs-snapshot/site-lisp/org-mode/ob-sql hides /usr/share/emacs/24.2.50/lisp/org/ob-sql /usr/share/emacs-snapshot/site-lisp/org-mode/org-special-blocks hides /usr/share/emacs/24.2.50/lisp/org/org-special-blocks /usr/share/emacs-snapshot/site-lisp/org-mode/org-beamer hides /usr/share/emacs/24.2.50/lisp/org/org-beamer /usr/share/emacs-snapshot/site-lisp/org-mode/ob-fortran hides /usr/share/emacs/24.2.50/lisp/org/ob-fortran /usr/share/emacs-snapshot/site-lisp/org-mode/org-timer hides /usr/share/emacs/24.2.50/lisp/org/org-timer /usr/share/emacs-snapshot/site-lisp/org-mode/ob-perl hides /usr/share/emacs/24.2.50/lisp/org/ob-perl /usr/share/emacs-snapshot/site-lisp/org-mode/ob-R hides /usr/share/emacs/24.2.50/lisp/org/ob-R /usr/share/emacs-snapshot/site-lisp/org-mode/org-ctags hides /usr/share/emacs/24.2.50/lisp/org/org-ctags /usr/share/emacs-snapshot/site-lisp/org-mode/ob-ruby hides /usr/share/emacs/24.2.50/lisp/org/ob-ruby /usr/share/emacs-snapshot/site-lisp/org-mode/org-compat hides /usr/share/emacs/24.2.50/lisp/org/org-compat /usr/share/emacs-snapshot/site-lisp/org-mode/org-feed hides /usr/share/emacs/24.2.50/lisp/org/org-feed /usr/share/emacs-snapshot/site-lisp/org-mode/org-publish hides /usr/share/emacs/24.2.50/lisp/org/org-publish /usr/share/emacs-snapshot/site-lisp/org-mode/org-remember hides /usr/share/emacs/24.2.50/lisp/org/org-remember /usr/share/emacs-snapshot/site-lisp/org-mode/ob-C hides /usr/share/emacs/24.2.50/lisp/org/ob-C /usr/share/emacs-snapshot/site-lisp/org-mode/org-vm hides /usr/share/emacs/24.2.50/lisp/org/org-vm /usr/share/emacs-snapshot/site-lisp/org-mode/org-datetree hides /usr/share/emacs/24.2.50/lisp/org/org-datetree /usr/share/emacs-snapshot/site-lisp/org-mode/ob-awk hides /usr/share/emacs/24.2.50/lisp/org/ob-awk /usr/share/emacs-snapshot/site-lisp/org-mode/org-plot hides /usr/share/emacs/24.2.50/lisp/org/org-plot /usr/share/emacs-snapshot/site-lisp/org-mode/org-install hides /usr/share/emacs/24.2.50/lisp/org/org-install /usr/share/emacs-snapshot/site-lisp/org-mode/ob-scheme hides /usr/share/emacs/24.2.50/lisp/org/ob-scheme /usr/share/emacs-snapshot/site-lisp/org-mode/org-attach hides /usr/share/emacs/24.2.50/lisp/org/org-attach /usr/share/emacs-snapshot/site-lisp/org-mode/ob-lob hides /usr/share/emacs/24.2.50/lisp/org/ob-lob /usr/share/emacs-snapshot/site-lisp/org-mode/ob-comint hides /usr/share/emacs/24.2.50/lisp/org/ob-comint /usr/share/emacs-snapshot/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/24.2.50/lisp/org/org-inlinetask /usr/share/emacs-snapshot/site-lisp/org-mode/org-clock hides /usr/share/emacs/24.2.50/lisp/org/org-clock /usr/share/emacs-snapshot/site-lisp/org-mode/org-info hides /usr/share/emacs/24.2.50/lisp/org/org-info Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader whitespace octave-inf octave-mod thai-util thai-word crm etags todoo gud dirtrack doc-view image-mode ps-mode sendmail mail-utils electric apropos cus-theme eieio-custom wid-browse tree-widget cpp cmacexp gnuplot-gui gnuplot info-look info erc-truncate erc-speedbar speedbar sb-image ezimage dframe erc-sound erc-services erc-replace erc-page erc-notify erc-desktop-notifications notifications dbus xml erc-log erc-identd erc-ibuffer ibuf-ext ibuffer erc-ezbounce erc-dcc erc-capab erc-autoaway goto-addr view underline boxquote ffap url-parse url-vars autoconf autoconf-mode tar-mode deb-view tramp-cmds pod-mode debian-copyright align grep compile debian-bug debian-changelog-mode debian-control-mode idlwave idlwave-help idlw-help hideif cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds conf-mode skeleton man pcmpl-unix vc-annotate log-view org-attach org-id jka-compr erc-imenu make-mode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailcap tabify sgml-mode sh-script smie executable which-func imenu tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs smerge-mode ispell org-table org-archive dabbrev misearch multi-isearch diff-mode dired-aux epa-dired dired ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-git org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb org warnings ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete org-list org-faces org-compat org-entities org-macs noutline outline cal-menu calendar cal-loaddefs help-mode home-end browse-url face-remap mule-util network-stream starttls tls erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat format-spec auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache thingatpt pp server hl-line cc-styles cc-align cc-engine cc-vars cc-defs cus-edit wid-edit subword time-date paren cus-start cus-load shell pcomplete comint ansi-color hideshow autoinsert winner cycle-buffer commit-patch-buffer log-edit pcvs-util add-log vc vc-dispatcher edmacro kmacro ace-jump-mode cl-macs gv jump-char cl cl-lib rect cperl-mode shell-command advice help-fns advice-preload xcscope ring easymenu iswitchb debian-el debian-el-loaddefs org-install magit-install emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode epa-setup epa-file epa derived epg epg-config epg-package-info dpkg-dev-el dpkg-dev-el-loaddefs tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment 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 macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 07:19:45 2012 Received: (at 12792) by debbugs.gnu.org; 3 Nov 2012 11:19:45 +0000 Received: from localhost ([127.0.0.1]:46742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUblQ-0001vL-8O for submit@debbugs.gnu.org; Sat, 03 Nov 2012 07:19:44 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:52542) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUblN-0001vE-SK for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 07:19:42 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so2962991pbb.3 for <12792@debbugs.gnu.org>; Sat, 03 Nov 2012 04:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Dn4Fx+X4JWThUxlYgbhtrb/4/wFfXVCH8eRO3p8CZrU=; b=uqU+g5JD1A34UpQfeZb0BBHj5iOjU2FeAH0UGXfs0IcBIwyiB+BUzWqJu210BD+Map FJTZes0TLxEgZ7MXbwri2Nw8iMoBMMs3A2xR4wbNpi0u0yJXfsDt7Jbi5RneFtmS6+4w yXaPSpawZ1U/hTFK5UKo6W83aWowjD1rMAMxXymfNAoUn625mNueoWf8iT08QkD5MEw/ w4RxzhMJASpYHExobxp885zZEuectIxJ+f6DPlrnH6684DW2TfRuO0n5CMmsYKvyl3+d fSfU3cFGH1W1QpFrri9/DA3P8zsveQ+uBT6CQzKDYUcZ+HvPqaRCGwRcIlxrFRlkKq0h lQZQ== Received: by 10.68.217.130 with SMTP id oy2mr14309485pbc.144.1351941407539; Sat, 03 Nov 2012 04:16:47 -0700 (PDT) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id nd6sm7252910pbc.68.2012.11.03.04.16.44 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2012 04:16:46 -0700 (PDT) From: Chong Yidong To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> Date: Sat, 03 Nov 2012 19:16:42 +0800 In-Reply-To: <871ugbxdyr.fsf@secretsauce.net> (Dima Kogan's message of "Sat, 03 Nov 2012 01:55:40 -0700") Message-ID: <87zk2z6in9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Dima Kogan writes: > I'm using a very recent emacs snapshot. shell-mode no longer renders the > ANSI-code colors correctly. Even with a relatively stock bash, All > output is rendered in yellow except for the prompt line. The prompt > isn't yellow, but it's wrong also I can't reproduce it with emacs -Q M-x shell RET ls --color RET The output of ls is colorized correctly. (Latest emacs-24 brach, x86_64-unknown-linux-gnu, GTK+ Version 3.4.2.) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 11:40:59 2012 Received: (at 12792) by debbugs.gnu.org; 3 Nov 2012 15:40:59 +0000 Received: from localhost ([127.0.0.1]:47311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUfqF-0001Ci-7w for submit@debbugs.gnu.org; Sat, 03 Nov 2012 11:40:59 -0400 Received: from mx11.lb01.inode.at ([62.99.145.13]:20139 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUfqD-0001Cb-I9 for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 11:40:58 -0400 Received: from [91.119.128.247] (port=5873 helo=iznogoud.viz) by smartmx-11.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TUfnN-0000Kt-JF; Sat, 03 Nov 2012 16:38:01 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TUfnM-0000YM-21; Sat, 03 Nov 2012 16:38:00 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> Date: Sat, 03 Nov 2012 16:37:59 +0100 In-Reply-To: <871ugbxdyr.fsf@secretsauce.net> (Dima Kogan's message of "Sat, 03 Nov 2012 01:55:40 -0700") Message-ID: <85r4oazoh4.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) On Sat, Nov 03 2012, Dima Kogan wrote: > I'm using a very recent emacs snapshot. shell-mode no longer renders the > ANSI-code colors correctly. Even with a relatively stock bash, All > output is rendered in yellow except for the prompt line. The prompt > isn't yellow, but it's wrong also: > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11883 > > This is a regression, since both the output in general and the prompt in > particular have been rendered correctly previously. I did a bisection, > and tracked the issues down to two commits. The prompt coloring broke in > > http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ansi-color.el?id=cd49cea06bb1c492d4d024889f3f320bf4c9b507 > > After that commit the general output still looks correct, but the prompt > isn't colored. Then later on, the rest of the output rendering broke in > > http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ansi-color.el?id=1bc85494c3236fa27cd8456635a4109aeed48344 In bug#11883 you give this example echo -e "\033[31mtest\033[39m" but ansi-color has never supported SGR parameter 39. However, before my change (the latter commit above), any unknown parameter would have the same effect as parameter 0 (turn off all rendition aspects), while it is simply ignored now (well, except for an "Invalid face reference: nil" message), see `ansi-color-apply-sequence'. Perhaps, this explains the problem. Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 12:36:02 2012 Received: (at 12792) by debbugs.gnu.org; 3 Nov 2012 16:36:02 +0000 Received: from localhost ([127.0.0.1]:47343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUghW-0002PZ-14 for submit@debbugs.gnu.org; Sat, 03 Nov 2012 12:36:02 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:40133) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUghS-0002PJ-Iw for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 12:36:00 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MCX00F0073OMO00@a-mtaout23.012.net.il> for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 18:33:02 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MCX00FZ27B1IZ50@a-mtaout23.012.net.il>; Sat, 03 Nov 2012 18:33:02 +0200 (IST) Date: Sat, 03 Nov 2012 18:32:51 +0200 From: Eli Zaretskii Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face In-reply-to: <85r4oazoh4.fsf@iznogoud.viz> X-012-Sender: halo1@inter.net.il To: Wolfgang Jenkner Message-id: <83y5ii4pfw.fsf@gnu.org> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > From: Wolfgang Jenkner > Date: Sat, 03 Nov 2012 16:37:59 +0100 > Cc: 12792@debbugs.gnu.org > > In bug#11883 you give this example > > echo -e "\033[31mtest\033[39m" > > but ansi-color has never supported SGR parameter 39. However, before my > change (the latter commit above), any unknown parameter would have the > same effect as parameter 0 (turn off all rendition aspects), while it is > simply ignored now (well, except for an "Invalid face reference: nil" > message), see `ansi-color-apply-sequence'. Perhaps, this explains the > problem. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, dima@secretsauce.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > From: Wolfgang Jenkner > Date: Sat, 03 Nov 2012 16:37:59 +0100 > Cc: 12792@debbugs.gnu.org > > In bug#11883 you give this example > > echo -e "\033[31mtest\033[39m" > > but ansi-color has never supported SGR parameter 39. However, before my > change (the latter commit above), any unknown parameter would have the > same effect as parameter 0 (turn off all rendition aspects), while it is > simply ignored now (well, except for an "Invalid face reference: nil" > message), see `ansi-color-apply-sequence'. Perhaps, this explains the > problem. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] > From: Wolfgang Jenkner > Date: Sat, 03 Nov 2012 16:37:59 +0100 > Cc: 12792@debbugs.gnu.org > > In bug#11883 you give this example > > echo -e "\033[31mtest\033[39m" > > but ansi-color has never supported SGR parameter 39. However, before my > change (the latter commit above), any unknown parameter would have the > same effect as parameter 0 (turn off all rendition aspects), while it is > simply ignored now (well, except for an "Invalid face reference: nil" > message), see `ansi-color-apply-sequence'. Perhaps, this explains the > problem. SGR parameter 39 means go back to the default foreground color. How can ansi-color not support it and still be useful? IIUC, what the old code did was exactly the right thing (or at least close, since 0 means turn off _all_ attributes, not just the foreground color), so removing it without replacing it with something that restores the default foreground would be a bug, IMO. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 14:02:27 2012 Received: (at 12792) by debbugs.gnu.org; 3 Nov 2012 18:02:27 +0000 Received: from localhost ([127.0.0.1]:47443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUi38-00065z-NM for submit@debbugs.gnu.org; Sat, 03 Nov 2012 14:02:27 -0400 Received: from mx01.lb01.inode.at ([62.99.145.1]:61290 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUi35-00065q-Un for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 14:02:25 -0400 Received: from [91.119.128.247] (port=7460 helo=iznogoud.viz) by smartmx-01.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TUi0G-0000dp-31; Sat, 03 Nov 2012 18:59:28 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TUi0D-00010a-Q0; Sat, 03 Nov 2012 18:59:25 +0100 From: Wolfgang Jenkner To: Eli Zaretskii Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> Date: Sat, 03 Nov 2012 18:59:25 +0100 In-Reply-To: <83y5ii4pfw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Nov 2012 18:32:51 +0200") Message-ID: <85d2zuzhxe.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, dima@secretsauce.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) On Sat, Nov 03 2012, Eli Zaretskii wrote: >> In bug#11883 you give this example >> >> echo -e "\033[31mtest\033[39m" >> >> but ansi-color has never supported SGR parameter 39. However, before my >> change (the latter commit above), any unknown parameter would have the >> same effect as parameter 0 (turn off all rendition aspects), while it is >> simply ignored now (well, except for an "Invalid face reference: nil" >> message), see `ansi-color-apply-sequence'. Perhaps, this explains the >> problem. > > SGR parameter 39 means go back to the default foreground color. How > can ansi-color not support it and still be useful? Perhaps because that parameter is but rarely observed in the wild? > IIUC, what the old > code did was exactly the right thing (or at least close, since 0 means > turn off _all_ attributes, not just the foreground color), so removing > it without replacing it with something that restores the default > foreground would be a bug, IMO. I'll fix this omission if nobody beats me to it. Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 14:11:30 2012 Received: (at 12792) by debbugs.gnu.org; 3 Nov 2012 18:11:30 +0000 Received: from localhost ([127.0.0.1]:47460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUiBt-0006IV-TO for submit@debbugs.gnu.org; Sat, 03 Nov 2012 14:11:30 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:40698) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUiBr-0006IO-Tx for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 14:11:28 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 9596920F3F; Sat, 3 Nov 2012 14:08:32 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 03 Nov 2012 14:08:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=/KnI7r1YTR1/f1e+hC7i/7fdUaI=; b=EwQGPHBQUP+a1L+9VR98iIvCbqB7 2DnY10FZKMann2Dgn/RkcB18txltKvmfb8hGtcMvb2KQ9AyQKQaIXRV/+Z2Fx4eY Mw5hjl8ndCwsTjKW0T+2YeXXyqw7N7WX8+PKPgzOMy79/5tU7iNl7dkVO/WRQefe L+hV20fgiYQy41U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=/KnI7r1YTR1/f1e+hC7i/7 fdUaI=; b=BsBZxwdL454GY9X5ZTAcTq3/I6XhORJ673s6dCpH3aVe2KLvyhewuP WtpfUaP0kMYzsXmxcIIEuRk+yGBRZOQRP/u1mdeJwUDjUk97AirT3gLMLRXmL2GL lKvcgNZ5T2DzHzImvU3kJxklUz2YmhCfHDmTHolGBG4FIOIzHj5GE= X-Sasl-enc: h7YidyuY+Noh4At0rNxx5HRXgLcKqawRyegdIuGzjUNy 1351966112 Received: from shorty.local (unknown [76.169.242.46]) by mail.messagingengine.com (Postfix) with ESMTPA id 151F94825E4; Sat, 3 Nov 2012 14:08:31 -0400 (EDT) Date: Sat, 3 Nov 2012 11:08:28 -0700 From: Dima Kogan To: Chong Yidong Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121103110828.6ace2ff8@shorty.local> In-Reply-To: <87zk2z6in9.fsf@gnu.org> References: <871ugbxdyr.fsf@secretsauce.net> <87zk2z6in9.fsf@gnu.org> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > On Sat, 03 Nov 2012 19:16:42 +0800 > Chong Yidong wrote: > > Dima Kogan writes: > > > I'm using a very recent emacs snapshot. shell-mode no longer renders the > > ANSI-code colors correctly. Even with a relatively stock bash, All > > output is rendered in yellow except for the prompt line. The prompt > > isn't yellow, but it's wrong also > > I can't reproduce it with > > emacs -Q > M-x shell RET > ls --color RET > > The output of ls is colorized correctly. (Latest emacs-24 brach, > x86_64-unknown-linux-gnu, GTK+ Version 3.4.2.) Looking at it a bit more, what seems to be happening is that console output that has coloring (like ls --color) is colored correctly, while anything that is plain text is yellow. So if I do ls --color, the first few files don't have any particular colors applied to them, and thus appear yellow. The first directory is blue, as it should be, and the rest of the ls --color output is ok after that point. I.e. even the "normal" text appears black instead of yellow. When the ls is done and I get back to the prompt, things get yellow again. (describe-face) says that the yellow bits have a nil face. This sounds like the problem. Apparently I also see lots of "Invalid face reference: nil" complaints in the *Messages* buffer. The original bug report had a description of my emacs. It's a very recent build, and I do see the issue with emacs -Q. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 23:35:43 2012 Received: (at 12792) by debbugs.gnu.org; 4 Nov 2012 03:35:43 +0000 Received: from localhost ([127.0.0.1]:47886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUqzu-0006X9-VZ for submit@debbugs.gnu.org; Sat, 03 Nov 2012 23:35:43 -0400 Received: from mx04.lb01.inode.at ([62.99.145.4]:43916 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUqzs-0006X1-Es for 12792@debbugs.gnu.org; Sat, 03 Nov 2012 23:35:41 -0400 Received: from [91.119.128.247] (port=3424 helo=iznogoud.viz) by smartmx-04.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TUqx0-0003Az-EK; Sun, 04 Nov 2012 04:32:42 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TUqwy-0000W3-17; Sun, 04 Nov 2012 04:32:40 +0100 From: Wolfgang Jenkner To: Eli Zaretskii Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Date: Sun, 04 Nov 2012 04:27:35 +0100 References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> Message-ID: <85hap6yre0.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, dima@secretsauce.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) On Sat, Nov 03 2012, Wolfgang Jenkner wrote: > On Sat, Nov 03 2012, Eli Zaretskii wrote: >> SGR parameter 39 means go back to the default foreground color. How >> can ansi-color not support it and still be useful? > I'll fix this omission if nobody beats me to it. Here's a rewrite of `ansi-color-apply-sequence' which implements SGR codes 39 and 49. It's straightforward but, sadly, uses side-effects all over the place. At this point, however, I'd just like to know if its behaviour meets everybody's expectations, so please test it a bit. Wolfgang (defun ansi-color-apply-sequence (escape-sequence codes) "Apply ESCAPE-SEQ to CODES and return the new list of codes. ESCAPE-SEQ is an escape sequence parsed by `ansi-color-parse-sequence'. For each new code, the following happens: if it is 1-7, add it to the list of codes; if it is 21-25 or 27, delete appropriate parameters from the list of codes; if it is 30-37 resp. 39, the foreground color code is replaced or added resp. deleted; if it is 40-47 resp. 49, the background color code is replaced or added resp. deleted; any other code is discarded together with the old codes. Finally, the so changed list of codes is returned." (let ((new-codes (ansi-color-parse-sequence escape-sequence)) (fg (and codes (>= (car codes) 30) (<= (car codes) 37) (pop codes))) (bg (and codes (>= (car codes) 40) (<= (car codes) 47) (pop codes)))) (while new-codes (let ((new (pop new-codes))) (cond ((and (>= new 1) (<= new 7)) (unless (memq new codes) (push new codes))) ((and (= new 22) (setq codes (remq 1 codes)) nil)) ((and (= new 25) (setq codes (remq 6 codes)) nil)) ;; The standard says `21 doubly underlined' while ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims ;; `21 Bright/Bold: off or Underline: Double'. ((and (>= new 21) (<= new 27) (/= new 26)) (setq codes (remq (- new 20) codes))) ((and (>= new 30) (<= new 37)) (setq fg new)) ((= new 39) (setq fg nil)) ((and (>= new 40) (<= new 47)) (setq bg new)) ((= new 49) (setq bg nil)) (t (setq codes nil fg nil bg nil))))) (when bg (push bg codes)) (when fg (push fg codes)) codes)) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 02:49:04 2012 Received: (at 12792) by debbugs.gnu.org; 4 Nov 2012 07:49:04 +0000 Received: from localhost ([127.0.0.1]:48027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUux6-0004gR-7l for submit@debbugs.gnu.org; Sun, 04 Nov 2012 02:49:04 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:40737) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUux4-0004g7-KN for 12792@debbugs.gnu.org; Sun, 04 Nov 2012 02:49:03 -0500 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 80CCD20385; Sun, 4 Nov 2012 02:46:03 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute3.internal (MEProxy); Sun, 04 Nov 2012 02:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=quOwurRThyq5wocGXCq9sIcVrZI=; b=DkEJwInKcUisVraCH4aAaSPbYfF3 LJSbH1xn9yjEx150QVC30PIWXpAMiBuUdppoD6rQjuq56RFe7jiISRO7fo0D9p4e vzA8VflJitKUM0hprey2Z7HTL+Fxyp5sWDUR+FOE0ADUh0OTSNwbL80IbPbR556H AalxikOM/Rvotpg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=quOwurRThyq5wocGXCq9sI cVrZI=; b=OAqgtgQGx2MTU/O7060NeqJhpWT3hk4kComZEnxqIIBo6yS7QpKcft pfq5Yq5fijHnmhZFdsXAiIxTUFdWILotK7FbMWxCimn1xFf/Rtn2yqFFrEM0DbwZ etLXQa1oe9KXm7lW7pli7IIWn0dGAPnXl7yvqLlwOS1dHrcmm2cZg= X-Sasl-enc: IEFKByX85uut/nJaJICZag328+7orK8LmwRRjXfEIBo8 1352015163 Received: from shorty.local (unknown [76.169.242.46]) by mail.messagingengine.com (Postfix) with ESMTPA id D1E678E04CD; Sun, 4 Nov 2012 02:46:02 -0500 (EST) Date: Sun, 4 Nov 2012 00:45:57 -0700 From: Dima Kogan To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121104004557.00fb50a5@shorty.local> In-Reply-To: <85hap6yre0.fsf@iznogoud.viz> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: Eli Zaretskii , 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > On Sun, 04 Nov 2012 04:27:35 +0100 > Wolfgang Jenkner wrote: > > On Sat, Nov 03 2012, Wolfgang Jenkner wrote: > > > On Sat, Nov 03 2012, Eli Zaretskii wrote: > > >> SGR parameter 39 means go back to the default foreground color. How > >> can ansi-color not support it and still be useful? > > > I'll fix this omission if nobody beats me to it. > > Here's a rewrite of `ansi-color-apply-sequence' which implements SGR > codes 39 and 49. It's straightforward but, sadly, uses side-effects all > over the place. At this point, however, I'd just like to know if its > behaviour meets everybody's expectations, so please test it a bit. > > Wolfgang > > (defun ansi-color-apply-sequence (escape-sequence codes) > "Apply ESCAPE-SEQ to CODES and return the new list of codes. > > ESCAPE-SEQ is an escape sequence parsed by `ansi-color-parse-sequence'. > > For each new code, the following happens: if it is 1-7, add it to > the list of codes; if it is 21-25 or 27, delete appropriate > parameters from the list of codes; if it is 30-37 resp. 39, the > foreground color code is replaced or added resp. deleted; if it > is 40-47 resp. 49, the background color code is replaced or added > resp. deleted; any other code is discarded together with the old > codes. Finally, the so changed list of codes is returned." > (let ((new-codes (ansi-color-parse-sequence escape-sequence)) > (fg (and codes (>= (car codes) 30) (<= (car codes) 37) > (pop codes))) > (bg (and codes (>= (car codes) 40) (<= (car codes) 47) > (pop codes)))) > (while new-codes > (let ((new (pop new-codes))) > (cond ((and (>= new 1) (<= new 7)) > (unless (memq new codes) > (push new codes))) > ((and (= new 22) > (setq codes (remq 1 codes)) > nil)) > ((and (= new 25) > (setq codes (remq 6 codes)) > nil)) > ;; The standard says `21 doubly underlined' while > ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims > ;; `21 Bright/Bold: off or Underline: Double'. > ((and (>= new 21) (<= new 27) (/= new 26)) > (setq codes (remq (- new 20) codes))) > ((and (>= new 30) (<= new 37)) > (setq fg new)) > ((= new 39) > (setq fg nil)) > ((and (>= new 40) (<= new 47)) > (setq bg new)) > ((= new 49) > (setq bg nil)) > (t > (setq codes nil fg nil bg nil))))) > (when bg > (push bg codes)) > (when fg > (push fg codes)) > codes)) I ran a test: 1. I start an 'emacs -Q' with the latest ansi-colors.el 2. I evaluate the defun you pasted 3. M-x shell 4. I run some commands in the shell Results: 1. The prompt is still not colored at all even though it should be. 2. Everything is still yellow with a 'nil' face UNTIL something with ansi color codes is encountered. At that point correct coloring resumes, except for the prompt. The prompt also doesn't count as encountering ansi colors. Are you not able to reproduce this? My setup isn't particularly special. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 08:52:55 2012 Received: (at 12792) by debbugs.gnu.org; 4 Nov 2012 13:52:55 +0000 Received: from localhost ([127.0.0.1]:48182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV0dC-0005Cd-S3 for submit@debbugs.gnu.org; Sun, 04 Nov 2012 08:52:55 -0500 Received: from mx17.lb01.inode.at ([62.99.145.19]:65164 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV0dA-0005CV-2m for 12792@debbugs.gnu.org; Sun, 04 Nov 2012 08:52:53 -0500 Received: from [91.119.128.247] (port=4068 helo=iznogoud.viz) by smartmx-17.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TV0aF-0000SP-F1; Sun, 04 Nov 2012 14:49:51 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TV0aE-0000TX-DX; Sun, 04 Nov 2012 14:49:50 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> Date: Sun, 04 Nov 2012 14:49:50 +0100 In-Reply-To: <20121104004557.00fb50a5@shorty.local> (Dima Kogan's message of "Sun, 4 Nov 2012 00:45:57 -0700") Message-ID: <85txt5eav5.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.4 (/) On Sun, Nov 04 2012, Dima Kogan wrote: > 1. I start an 'emacs -Q' with the latest ansi-colors.el > 2. I evaluate the defun you pasted Did you load ansi-colors /before/ step 2? If so, what is your PS1 set to? What are the (local) values of `comint-prompt-regexp' and `comint-use-prompt-regexp' in the "*shell*" buffer? Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 15:28:05 2012 Received: (at 12792) by debbugs.gnu.org; 4 Nov 2012 20:28:05 +0000 Received: from localhost ([127.0.0.1]:49322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV6nd-0007W3-01 for submit@debbugs.gnu.org; Sun, 04 Nov 2012 15:28:05 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42371) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV6nY-0007Vd-Vr for 12792@debbugs.gnu.org; Sun, 04 Nov 2012 15:28:02 -0500 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 0E9F320723; Sun, 4 Nov 2012 15:24:59 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute3.internal (MEProxy); Sun, 04 Nov 2012 15:24:59 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=HOC69RcCJ6hjEUJKeV0ltEK62fM=; b=ojgf5TFmnXX4EyYtfT6Mcw7tINDx LENTSWKS+PbSspRe1X9FQzefrVu0uVdgJ0a+TLvKzmYn2dqjBYUDuTGXWJLInYe3 LIimXqUR8ZDpeDdFnXHqehQjJiGj72Pdv5IYJchlUGMUGW36IuOIlbuFvaK7d1u4 Z5QtepWSMjdLdl8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=HOC69RcCJ6hjEUJKeV0ltE K62fM=; b=N+2HZN4gkFZmmCkmkHiGqxAVjAeqLRJhaWap7t3gGDGq/xXeKncAxl V0j6BhxVeG1f41ykoRtJK7Glbs2IumIuu1a9XSvl8iCyO6J3cOirYBF+6+AAJMqf D/Wr94SaGVlMo5CyWQH225taiayEE1/eG+640wwYebeAtfqp4+TSc= X-Sasl-enc: w3yDbQib3XbB5SzPzR0ObPO+2bIR1TPMmVFlYbIYIWzC 1352060698 Received: from shorty.local (unknown [76.169.242.46]) by mail.messagingengine.com (Postfix) with ESMTPA id 7FCC6482523; Sun, 4 Nov 2012 15:24:58 -0500 (EST) Date: Sun, 4 Nov 2012 12:24:56 -0800 From: Dima Kogan To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121104122456.3f2c6448@shorty.local> In-Reply-To: <85txt5eav5.fsf@iznogoud.viz> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > On Sun, 04 Nov 2012 14:49:50 +0100 > Wolfgang Jenkner wrote: > > On Sun, Nov 04 2012, Dima Kogan wrote: > > > 1. I start an 'emacs -Q' with the latest ansi-colors.el > > 2. I evaluate the defun you pasted > > Did you load ansi-colors /before/ step 2? > > If so, what is your PS1 set to? What are the (local) values of > `comint-prompt-regexp' and `comint-use-prompt-regexp' in the "*shell*" > buffer? > > Wolfgang Hi Wolfgang. You're right; I was loading ansi-colors.el after the eval, which was overwriting the new defun. On top of that, I just ran some more controlled tests, and I can now see that some of my descriptions were wrong. Stock bash actually behaves ok (I did test it previously, but must have made a mistake). Note "behaves ok" here means that the nil faces are gone; the prompts are still not colored even with bash. zsh is the main shell I use that looks to be problematic. I can consistently observe the issues if I delete all ~/.zsh* files, then add just the following to the .zshrc: export PS1="%F{red}%n@%m%f:%F{yellow}%~%f%(!.#.$) " This sets a bash-like prompt. With the latest ansi-colors.el I see the everything-is-yellow and face-is-nil issues from before. If I also then evaluate the defun, I observe the behavior I described previously, where everything is one color, until some ansi code is encountered. After the defun the wrong color becomes red instead of yellow, suggesting that something isn't being reset properly. I'm using the zsh package from Debian version 4.3.17-1. comint-prompt-regexp is a variable defined in `comint.el.gz'. Its value is "^[^#$%> ]*[#$%>] *" comint-use-prompt-regexp is a variable defined in `comint.el.gz'. Its value is nil (describe-face) with the point inside the prompt says the prompt face is 'comint-highlight-prompt'. Sorry for the misniformation dima From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 18:42:54 2012 Received: (at 12792) by debbugs.gnu.org; 4 Nov 2012 23:42:54 +0000 Received: from localhost ([127.0.0.1]:49418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV9qA-0003Vj-It for submit@debbugs.gnu.org; Sun, 04 Nov 2012 18:42:54 -0500 Received: from mx03.lb01.inode.at ([62.99.145.3]:31960 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV9q7-0003Va-Ol for 12792@debbugs.gnu.org; Sun, 04 Nov 2012 18:42:52 -0500 Received: from [91.119.128.247] (port=7916 helo=iznogoud.viz) by smartmx-03.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TV9nB-0001Fv-3R; Mon, 05 Nov 2012 00:39:49 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TV9n9-0000aA-8f; Mon, 05 Nov 2012 00:39:47 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> Date: Mon, 05 Nov 2012 00:39:46 +0100 In-Reply-To: <20121104122456.3f2c6448@shorty.local> (Dima Kogan's message of "Sun, 4 Nov 2012 12:24:56 -0800") Message-ID: <85sj8prl8d.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.4 (/) On Sun, Nov 04 2012, Dima Kogan wrote: > zsh is the main shell I use that looks to be problematic. I can consistently > observe the issues if I delete all ~/.zsh* files, then add just the following to > the .zshrc: > > export PS1="%F{red}%n@%m%f:%F{yellow}%~%f%(!.#.$) " Could you please do M-x ansi-color-for-comint-mode-off so that we may see the raw escape sequences generated by that PS1? Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 22:26:54 2012 Received: (at 12792) by debbugs.gnu.org; 5 Nov 2012 03:26:54 +0000 Received: from localhost ([127.0.0.1]:49497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVDKw-0000sy-7A for submit@debbugs.gnu.org; Sun, 04 Nov 2012 22:26:54 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVDKt-0000sq-BM for 12792@debbugs.gnu.org; Sun, 04 Nov 2012 22:26:52 -0500 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 6F2D52046F; Sun, 4 Nov 2012 22:23:47 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 04 Nov 2012 22:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=vfjwMeBgESsTce7zdGPErXznM1g=; b=rRBre4Vs61AHTqYEu6eshH5neG8r HQ5S0BaUwyJ7VOzFQVEotnZa9XxXEB6L8tK7BECkl0T/Jx3evQ1A/ie1eA2H9DVU LkZEroRLqB0BJ1IMztAFCvggSUz1Hd5r81JdrXLOaET7LxTj1RJoR+SCpcc7ex8P BOGybJnoJ5GfjqA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=vfjwMeBgESsTce7zdGPErX znM1g=; b=YhPHQT5dQmPpF5ejb4sQ0Rv4ANZU5V3uuf8qLawO3bxVgSbs7kQJZp TR4kMMF2p/hDwAaui2yru+BfFcijCOmd9lTwT3Zy8PLwHOwKeyS0n9dhBIXeiyFn KhQ/5+cUH+XnKhuZ2lV03lalw3+U9Mj/wukvodUKfk2Q7Dus6It5A= X-Sasl-enc: G1JnF3X10QndRJnkwz912V7UMcQvaTSm5cfZFwiicd7C 1352085827 Received: from shorty.local (unknown [76.169.242.46]) by mail.messagingengine.com (Postfix) with ESMTPA id C3E76482659; Sun, 4 Nov 2012 22:23:46 -0500 (EST) Date: Sun, 4 Nov 2012 19:23:43 -0800 From: Dima Kogan To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121104192343.1f243455@shorty.local> In-Reply-To: <85sj8prl8d.fsf@iznogoud.viz> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > On Mon, 05 Nov 2012 00:39:46 +0100 > Wolfgang Jenkner wrote: > > On Sun, Nov 04 2012, Dima Kogan wrote: > > > zsh is the main shell I use that looks to be problematic. I can consistently > > observe the issues if I delete all ~/.zsh* files, then add just the following to > > the .zshrc: > > > > export PS1="%F{red}%n@%m%f:%F{yellow}%~%f%(!.#.$) " > > Could you please do > > M-x ansi-color-for-comint-mode-off > > so that we may see the raw escape sequences generated by that PS1? To clarify the test even more, I set my .zshrc to unsetopt zle unsetopt prompt_cr unsetopt prompt_subst export PS1="%F{red}%n@%m%f:%F{yellow}%~%f%(!.#.$) " This is the complete .zshrc file. The unsetopt stuff turns off zsh's keyboard processing. Probably doesn't matter, but i'm mentioning this for completeness. In the shell I pressed enter a few times to see the prompt sequences; then I ran a command that produces some output without ANSI codes. Then I ran a command that does produce some ansi codes in its output. Then I ran the plain-output command again. The output (with all the 'escape' characters replaced with '\e' to make sure the email handlers don't get confused): \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 1 2 3 4 5 \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ ls --color=auto -ld .emacs.d drwxr-xr-x 6 dima dima 4096 Nov 3 15:31 \e[0m\e[01;34m.emacs.d\e[0m \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 1 2 3 4 5 \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ If I run the exact same sequence of commands with ansi-color-for-comint-mode-on and the latest ansi-color.el, I see everything yellow (nil face), except for ".emacs.d", which is blue and the last prompt, which is all blue also. This prompt would change to all yellow also if I press enter again. Not that the prompt shouldn't be all blue. If I evaluate your defun also, I get everything red (nil face also) until the ".emacs.d". The ".emacs.d" is blue, as it should be. From that point on, all the plain output is black and all the prompts are blue. This is correct, except the prompts still shouldn't be all blue. Sorry for all the confusion. dima From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 10:13:28 2012 Received: (at 12792) by debbugs.gnu.org; 5 Nov 2012 15:13:28 +0000 Received: from localhost ([127.0.0.1]:50687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVOMh-0004No-Ho for submit@debbugs.gnu.org; Mon, 05 Nov 2012 10:13:28 -0500 Received: from mx09.lb01.inode.at ([62.99.145.9]:52995 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVOMf-0004Ng-52 for 12792@debbugs.gnu.org; Mon, 05 Nov 2012 10:13:26 -0500 Received: from [91.119.128.247] (port=3902 helo=iznogoud.viz) by smartmx-09.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TVOJe-0007hi-F9; Mon, 05 Nov 2012 16:10:18 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TVOJc-0005ER-SA; Mon, 05 Nov 2012 16:10:16 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Date: Mon, 05 Nov 2012 16:00:34 +0100 References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> Message-ID: <854nl4krvr.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.4 (/) On Mon, Nov 05 2012, Dima Kogan wrote: > The output (with all the 'escape' characters replaced with '\e' to make sure the > email handlers don't get confused): > > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 > 1 > 2 > 3 > 4 > 5 > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ ls --color=auto -ld .emacs.d > drwxr-xr-x 6 dima dima 4096 Nov 3 15:31 \e[0m\e[01;34m.emacs.d\e[0m > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 > 1 > 2 > 3 > 4 > 5 > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > > [...] > If I evaluate your defun also, I get everything red (nil face also) until the > ".emacs.d". The ".emacs.d" is blue, as it should be. From that point on, all the > plain output is black and all the prompts are blue. This is correct, except the > prompts still shouldn't be all blue. Thanks for the precise recipe. I installed zsh 5.0.0 from ports in FreeBSD 9 and tried it, but I can't reproduce the bogus red colouring (with the rewritten ansi-color-apply-sequence). So I would like to ask you to do some more investigation: As usual, load ansi-color and then eval the new definition of ansi-color-apply-sequence. Then M-x trace-function-background ansi-color-apply-sequence M-x trace-function-background comint-output-filter M-x shell and type in the same shell commands as above. M-x untrace-all Then please attach the content of "*trace-output*" to your reply. Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 10:28:51 2012 Received: (at 12792) by debbugs.gnu.org; 5 Nov 2012 15:28:51 +0000 Received: from localhost ([127.0.0.1]:50700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVOba-0004j0-JN for submit@debbugs.gnu.org; Mon, 05 Nov 2012 10:28:51 -0500 Received: from mx15.lb01.inode.at ([62.99.145.17]:22733 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVObY-0004is-If for 12792@debbugs.gnu.org; Mon, 05 Nov 2012 10:28:49 -0500 Received: from [91.119.128.247] (port=2970 helo=iznogoud.viz) by smartmx-15.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TVOYY-0004gc-3P; Mon, 05 Nov 2012 16:25:42 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TVOYW-0005FP-4D; Mon, 05 Nov 2012 16:25:40 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> Date: Mon, 05 Nov 2012 16:25:40 +0100 In-Reply-To: <854nl4krvr.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Mon, 05 Nov 2012 16:00:34 +0100") Message-ID: <85zk2wjcln.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.4 (/) On Mon, Nov 05 2012, Wolfgang Jenkner wrote: > As usual, load ansi-color and then eval the new definition of > ansi-color-apply-sequence. Also load comint at this point. And untrace-all seems to be broken in trunk, but never mind... Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 19:01:37 2012 Received: (at 12792) by debbugs.gnu.org; 6 Nov 2012 00:01:37 +0000 Received: from localhost ([127.0.0.1]:51272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVWbo-0001Hd-Cd for submit@debbugs.gnu.org; Mon, 05 Nov 2012 19:01:37 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33710) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVWbk-0001HT-I0 for 12792@debbugs.gnu.org; Mon, 05 Nov 2012 19:01:34 -0500 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 690F920531; Mon, 5 Nov 2012 18:58:24 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute6.internal (MEProxy); Mon, 05 Nov 2012 18:58:24 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=Ll9pCLZm8KHI+2UYdRE/0Mjrdp4=; b=aSNNpqd1aqKYKa57KGdfLLycjw1G gfpDxKzw2Bbqed/xjSK+m+pkPPkQXgyCSOF4ZGsHAd1Xp2/jBYjs2eD/59Cg7vWA l5DYs6ErT9Dxyv8UIjaNLC+kSsofr1qexUylwWd6iZG77iA76Uj4N9Co9lQVvFby JwWGP0HDQKF5vDw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=Ll9pCLZm8KHI+2UYdRE/0M jrdp4=; b=KZF3qam51cmtmwrSfBBuK5+FQ79sjXtPbB1JhE+6I/kIFFsKwypPBs VDbgakPv1uJ6iqeCgUcvKQhqt9TWf+mdoIxauWDto8AM+IwKaJJ/oXXdriXR4lAw zXVNFP3BdjqSkkzuPG5bOrlOmNcB2+BW3hhIZuyQTyFzF+RGHQaDw= X-Sasl-enc: VV03rCAykNwlBV/HOkEPT+wy5ja+/7MvaQQ5rfk9xNIV 1352159903 Received: from fatty (unknown [204.154.109.20]) by mail.messagingengine.com (Postfix) with ESMTPA id C22A78E04E0; Mon, 5 Nov 2012 18:58:23 -0500 (EST) Date: Mon, 5 Nov 2012 15:57:11 -0800 From: Dima Kogan To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121105155711.267e869b@fatty> In-Reply-To: <854nl4krvr.fsf@iznogoud.viz> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > On Mon, 05 Nov 2012 16:00:34 +0100 > Wolfgang Jenkner wrote: > > On Mon, Nov 05 2012, Dima Kogan wrote: > > > The output (with all the 'escape' characters replaced with '\e' to > > make sure the email handlers don't get confused): > > > > > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 > > 1 > > 2 > > 3 > > 4 > > 5 > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ ls --color=auto -ld .emacs.d > > drwxr-xr-x 6 dima dima 4096 Nov 3 15:31 \e[0m\e[01;34m.emacs.d\e[0m > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ seq 5 > > 1 > > 2 > > 3 > > 4 > > 5 > > \e[31mdima@shorty\e[39m:\e[33m~\e[39m$ > > > > > [...] > > If I evaluate your defun also, I get everything red (nil face also) > > until the ".emacs.d". The ".emacs.d" is blue, as it should be. From > > that point on, all the plain output is black and all the prompts > > are blue. This is correct, except the prompts still shouldn't be > > all blue. > > Thanks for the precise recipe. I installed zsh 5.0.0 from ports in > FreeBSD 9 and tried it, but I can't reproduce the bogus red colouring > (with the rewritten ansi-color-apply-sequence). > > So I would like to ask you to do some more investigation: > > As usual, load ansi-color and then eval the new definition of > ansi-color-apply-sequence. > > Then > > M-x trace-function-background ansi-color-apply-sequence > M-x trace-function-background > comint-output-filter > > M-x shell and type in the same shell commands as above. > > M-x untrace-all > > Then please attach the content of "*trace-output*" to your reply. > > Wolfgang > > > > Hi Wolfgang. I just ran those tests. Previously, I would do M-x shell, and then evaluate the new defun; this produced the results I described earlier. You just asked for a different order: load ansi-color, comint, THEN eval defun, THEN M-x shell. That produces different colored results: everything looks correct except the prompt is all blue all the time. Nothing has nil face. Is this the expected behavior with that defun, or is the prompt supposed to look right also? The trace output follows. Note that once again I replaced all escape characters with '\e'. ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="1 2 3 4 " 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="5 \e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="drwxr-xr-x 4 dima dima 4096 Nov 5 00:33 \e[0m\e[01;34m/home/dima/.emacs.d\e[0m " | 2 -> ansi-color-apply-sequence: escape-sequence=#("0m" 0 2 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("01;34m" 0 6 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (34 1) | 2 -> ansi-color-apply-sequence: escape-sequence=#("0m" 0 2 (fontified nil)) codes=(34 1) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="\e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="1 2 3 4 " 1 <- comint-output-filter: # ====================================================================== 1 -> comint-output-filter: process=# string="5 \e[32mdima@fatty\e[39m:\e[33m/tmp\e[39m$ " | 2 -> ansi-color-apply-sequence: escape-sequence=#("32m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (32) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(32) | 2 <- ansi-color-apply-sequence: nil | 2 -> ansi-color-apply-sequence: escape-sequence=#("33m" 0 3 (fontified nil)) codes=nil | 2 <- ansi-color-apply-sequence: (33) | 2 -> ansi-color-apply-sequence: escape-sequence=#("39m" 0 3 (fontified nil)) codes=(33) | 2 <- ansi-color-apply-sequence: nil 1 <- comint-output-filter: # From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 20:27:42 2012 Received: (at 12792) by debbugs.gnu.org; 6 Nov 2012 01:27:42 +0000 Received: from localhost ([127.0.0.1]:51337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVXx7-00039j-NP for submit@debbugs.gnu.org; Mon, 05 Nov 2012 20:27:42 -0500 Received: from mx12.lb01.inode.at ([62.99.145.14]:36002 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVXx6-00039c-6V for 12792@debbugs.gnu.org; Mon, 05 Nov 2012 20:27:41 -0500 Received: from [91.119.128.247] (port=8139 helo=iznogoud.viz) by smartmx-12.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TVXu3-0007rM-CP; Tue, 06 Nov 2012 02:24:31 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TVXu1-0000or-Vq; Tue, 06 Nov 2012 02:24:29 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> Date: Tue, 06 Nov 2012 02:24:29 +0100 Message-ID: <85mwyvplpu.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.9 (/) On Tue, Nov 06 2012, Dima Kogan wrote: > Previously, I would do M-x shell, and then evaluate the new defun; this produced > the results I described earlier. Too late, the function must be redefined before the first prompt is sent. I thought it would be simpler to give you the rewritten defun separately instead of having you patching ansi-color.el ;-) > You just asked for a different order: load ansi-color, comint, THEN eval defun, > THEN M-x shell. That produces different colored results: everything looks > correct except the prompt is all blue all the time. Nothing has nil face. Is > this the expected behavior with that defun Yes. As you found out in your original report the prompt coloring has been broken for longer. If you customize the comint-highlight-prompt face so that it doesn't inherit from minibuffer-prompt (which does the blue colouring), you'll see that the current prompt is actually coloured correctly but for the previous prompts, comint-highlight-prompt just replaces the ansi-color faces. That's weird. Somebody should at some point do something about it ;-) In any case, you submitted a separate report about the prompt issue, viz. bug#11883. So, I'd say that the issue at hand is solved. I'll just try to rewrite the new ansi-color-apply-sequence in a less ugly way. Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 20:36:18 2012 Received: (at 12792) by debbugs.gnu.org; 6 Nov 2012 01:36:18 +0000 Received: from localhost ([127.0.0.1]:51344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVY5R-0003Lv-5Q for submit@debbugs.gnu.org; Mon, 05 Nov 2012 20:36:18 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52889) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVY5N-0003Lj-3U for 12792@debbugs.gnu.org; Mon, 05 Nov 2012 20:36:15 -0500 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 8844320C71; Mon, 5 Nov 2012 20:33:04 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 05 Nov 2012 20:33:04 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=Wb2H+2oAmfAwXxFX0ImPoYEG3b0=; b=TQ3qoI+mgthoHR1PvD6KBH/2pLRv 1I7PoYd1/9r4OZ72MJiGx4WvuBtjri8j0uDkPHM1s3aft8TJD5UWdMVyHVYDraNn cMwSXhsvpTdkp3rVmGdTDy6DJ74q8upG1RoYkOFgRV4MfN8b05FIVVGoLI+jNbWE /sZRzyRIXyVVkPU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=Wb2H+2oAmfAwXxFX0ImPoY EG3b0=; b=qIKkj2qtzgVibiyCeEsfNs5R9Kh40FgsG8TGE/1ruNF7L39DdDrWBF hK18IO60CQp7Vcrbz+zzZBrxlEcU6FwIJgSaiLj944gEZWW3bOgJsTx8rchlWjRR HY2HRApkZiDC0PkddBV738EjEDtwb5m5nQFfsn5oQrtZkHYP/FZIY= X-Sasl-enc: IzYEOADEMaprcV/Cj2ocOsxY340fOoFGp37cro4uvWau 1352165584 Received: from fatty (unknown [204.154.109.20]) by mail.messagingengine.com (Postfix) with ESMTPA id 0ECA8482644; Mon, 5 Nov 2012 20:33:03 -0500 (EST) Date: Mon, 5 Nov 2012 17:31:50 -0800 From: Dima Kogan To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: <20121105173150.19d3290c@fatty> In-Reply-To: <85mwyvplpu.fsf@iznogoud.viz> References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> <85mwyvplpu.fsf@iznogoud.viz> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > On Tue, 06 Nov 2012 02:24:29 +0100 > Wolfgang Jenkner wrote: > > On Tue, Nov 06 2012, Dima Kogan wrote: > > > Previously, I would do M-x shell, and then evaluate the new defun; > > this produced the results I described earlier. > > Too late, the function must be redefined before the first prompt is > sent. I thought it would be simpler to give you the rewritten defun > separately instead of having you patching ansi-color.el ;-) > > > You just asked for a different order: load ansi-color, comint, THEN > > eval defun, THEN M-x shell. That produces different colored > > results: everything looks correct except the prompt is all blue all > > the time. Nothing has nil face. Is this the expected behavior with > > that defun > > Yes. As you found out in your original report the prompt coloring has > been broken for longer. If you customize the comint-highlight-prompt > face so that it doesn't inherit from minibuffer-prompt (which does the > blue colouring), you'll see that the current prompt is actually > coloured correctly but for the previous prompts, > comint-highlight-prompt just replaces the ansi-color faces. That's > weird. Somebody should at some point do something about it ;-) > > In any case, you submitted a separate report about the prompt issue, > viz. bug#11883. > > So, I'd say that the issue at hand is solved. I'll just try to > rewrite the new ansi-color-apply-sequence in a less ugly way. > > Wolfgang Sounds good. Thanks a lot. dima From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 09:29:56 2012 Received: (at 12792) by debbugs.gnu.org; 9 Nov 2012 14:29:56 +0000 Received: from localhost ([127.0.0.1]:57351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWpal-0001jv-DD for submit@debbugs.gnu.org; Fri, 09 Nov 2012 09:29:56 -0500 Received: from mx19.lb01.inode.at ([62.99.145.21]:31224 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWpah-0001jl-Bn for 12792@debbugs.gnu.org; Fri, 09 Nov 2012 09:29:53 -0500 Received: from [91.119.128.247] (port=2061 helo=iznogoud.viz) by smartmx-19.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TWpaY-0008CE-Si; Fri, 09 Nov 2012 15:29:42 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TWpaX-0000qD-ET; Fri, 09 Nov 2012 15:29:41 +0100 From: Wolfgang Jenkner To: Dima Kogan Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Date: Fri, 09 Nov 2012 02:50:32 +0100 References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> <85mwyvplpu.fsf@iznogoud.viz> <20121105173150.19d3290c@fatty> Message-ID: <858vaaq27e.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) On Tue, Nov 06 2012, Dima Kogan wrote: >> So, I'd say that the issue at hand is solved. I'll just try to >> rewrite the new ansi-color-apply-sequence in a less ugly way. > > Sounds good. Thanks a lot. I hope the patch below is less ugly and also correct. Perhaps you could try it. Note to the maintainers: This fixes a regression for a feature not actually present in previous versions of emacs ;-) 2012-11-08 Wolfgang Jenkner * ansi-color.el (ansi-color-apply-sequence): Implement SGR codes 39 and 49 (bug#12792). Also, restore the behavior of revisions prior to 109621, where unimplemented codes are treated like code 0. === modified file 'lisp/ansi-color.el' --- lisp/ansi-color.el 2012-09-25 04:13:02 +0000 +++ lisp/ansi-color.el 2012-11-09 00:19:00 +0000 @@ -534,34 +534,39 @@ ESCAPE-SEQ is an escape sequence parsed by `ansi-color-parse-sequence'. -If the new codes resulting from ESCAPE-SEQ start with 0, then the -old codes are discarded and the remaining new codes are -processed. Otherwise, for each new code: if it is 21-25 or 27-29 -delete appropriate parameters from the list of codes; any other -code that makes sense is added to the list of codes. Finally, -the so changed list of codes is returned." +For each new code, the following happens: if it is 1-7, add it to +the list of codes; if it is 21-25 or 27, delete appropriate +parameters from the list of codes; if it is 30-37 resp. 39, the +foreground color code is replaced or added resp. deleted; if it +is 40-47 resp. 49, the background color code is replaced or added +resp. deleted; any other code is discarded together with the old +codes. Finally, the so changed list of codes is returned." (let ((new-codes (ansi-color-parse-sequence escape-sequence))) (while new-codes - (setq codes - (let ((new (pop new-codes))) - (cond ((zerop new) - nil) - ((or (<= new 20) - (>= new 30)) - (if (memq new codes) - codes - (cons new codes))) - ;; The standard says `21 doubly underlined' while - ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims - ;; `21 Bright/Bold: off or Underline: Double'. - ((/= new 26) - (remq (- new 20) - (cond ((= new 22) - (remq 1 codes)) - ((= new 25) - (remq 6 codes)) - (t codes)))) - (t codes))))) + (let* ((new (pop new-codes)) + (q (/ new 10))) + (setq codes + (pcase q + (0 (unless (memq new '(0 8 9)) + (cons new (remq new codes)))) + (2 (unless (memq new '(20 26 28 29)) + ;; The standard says `21 doubly underlined' while + ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims + ;; `21 Bright/Bold: off or Underline: Double'. + (remq (- new 20) (pcase new + (22 (remq 1 codes)) + (25 (remq 6 codes)) + (_ codes))))) + ((or 3 4) (let ((r (mod new 10))) + (unless (= r 8) + (let (beg) + (while (and codes (/= q (/ (car codes) 10))) + (push (pop codes) beg)) + (setq codes (nconc (nreverse beg) (cdr codes))) + (if (= r 9) + codes + (cons new codes)))))) + (_ nil))))) codes)) (defun ansi-color-make-color-map () From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 09:36:24 2012 Received: (at control) by debbugs.gnu.org; 9 Nov 2012 14:36:24 +0000 Received: from localhost ([127.0.0.1]:57359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWph1-0001u8-Vr for submit@debbugs.gnu.org; Fri, 09 Nov 2012 09:36:24 -0500 Received: from mx04.lb01.inode.at ([62.99.145.4]:35215 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWph0-0001u1-0D for control@debbugs.gnu.org; Fri, 09 Nov 2012 09:36:22 -0500 Received: from [91.119.128.247] (port=6728 helo=iznogoud.viz) by smartmx-04.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TWpgs-00059D-1Y for control@debbugs.gnu.org; Fri, 09 Nov 2012 15:36:14 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TWpgq-0000rQ-GW for control@debbugs.gnu.org; Fri, 09 Nov 2012 15:36:12 +0100 From: Wolfgang Jenkner To: control@debbugs.gnu.org Subject: 12792 Date: Fri, 09 Nov 2012 03:48:47 +0100 Message-ID: <85390iq1wj.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: package emacs tags 12792 + patch quit [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.99.145.4 listed in list.dnswl.org] 1.5 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: package emacs tags 12792 + patch quit [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.99.145.4 listed in list.dnswl.org] 1.5 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4998] package emacs tags 12792 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 12:30:20 2012 Received: (at 12792) by debbugs.gnu.org; 9 Nov 2012 17:30:20 +0000 Received: from localhost ([127.0.0.1]:58253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWsPH-0007pM-BO for submit@debbugs.gnu.org; Fri, 09 Nov 2012 12:30:16 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49067) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWsPD-0007pE-FP for 12792@debbugs.gnu.org; Fri, 09 Nov 2012 12:30:12 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qA9HU2qK005740; Fri, 9 Nov 2012 12:30:02 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id DE54EB4278; Fri, 9 Nov 2012 12:30:01 -0500 (EST) From: Stefan Monnier To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> <85mwyvplpu.fsf@iznogoud.viz> <20121105173150.19d3290c@fatty> <858vaaq27e.fsf@iznogoud.viz> Date: Fri, 09 Nov 2012 12:30:01 -0500 In-Reply-To: <858vaaq27e.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Fri, 09 Nov 2012 02:50:32 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4396=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4396> : streams <854617> : uri <1263854> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > I hope the patch below is less ugly and also correct. Perhaps you could > try it. It seems to work on the example of bug#11883 (it doesn't solve bug#11883, mind you, just brings it back to the less broken state that it was in when the bug was reported). > Note to the maintainers: This fixes a regression for a feature not > actually present in previous versions of emacs ;-) At least for the example code of bug#11883 it fixes a regression w.r.t Emacs-24.1. Please install it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 13:20:47 2012 Received: (at 12792) by debbugs.gnu.org; 9 Nov 2012 18:20:47 +0000 Received: from localhost ([127.0.0.1]:58294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWtCB-0000Z3-8X for submit@debbugs.gnu.org; Fri, 09 Nov 2012 13:20:47 -0500 Received: from mx07.lb01.inode.at ([62.99.145.7]:25817 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWtC8-0000Ys-JH for 12792@debbugs.gnu.org; Fri, 09 Nov 2012 13:20:46 -0500 Received: from [91.119.128.247] (port=5489 helo=iznogoud.viz) by smartmx-07.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TWtBz-0006V3-BY; Fri, 09 Nov 2012 19:20:35 +0100 Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TWtBv-0001gn-UP; Fri, 09 Nov 2012 19:20:31 +0100 From: Wolfgang Jenkner To: Stefan Monnier Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> <85mwyvplpu.fsf@iznogoud.viz> <20121105173150.19d3290c@fatty> <858vaaq27e.fsf@iznogoud.viz> Date: Fri, 09 Nov 2012 19:20:31 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 09 Nov 2012 12:30:01 -0500") Message-ID: <85y5iaocy8.fsf@iznogoud.viz> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.9 (/) On Fri, Nov 09 2012, Stefan Monnier wrote: > At least for the example code of bug#11883 it fixes a regression w.r.t > Emacs-24.1. Please install it. To which branch? Oh, and I don't have a commit bit. Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 15:37:22 2012 Received: (at 12792) by debbugs.gnu.org; 9 Nov 2012 20:37:22 +0000 Received: from localhost ([127.0.0.1]:58429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWvKL-0005Rg-Mc for submit@debbugs.gnu.org; Fri, 09 Nov 2012 15:37:22 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:48215) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TWvKF-0005RT-VG for 12792@debbugs.gnu.org; Fri, 09 Nov 2012 15:37:20 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qA9Kb1fd031755; Fri, 9 Nov 2012 15:37:01 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1681CB4278; Fri, 9 Nov 2012 15:37:01 -0500 (EST) From: Stefan Monnier To: Wolfgang Jenkner Subject: Re: bug#12792: 24.2.50; shell-mode renders all its output in a yellow face Message-ID: References: <871ugbxdyr.fsf@secretsauce.net> <85r4oazoh4.fsf@iznogoud.viz> <83y5ii4pfw.fsf@gnu.org> <85d2zuzhxe.fsf@iznogoud.viz> <85hap6yre0.fsf@iznogoud.viz> <20121104004557.00fb50a5@shorty.local> <85txt5eav5.fsf@iznogoud.viz> <20121104122456.3f2c6448@shorty.local> <85sj8prl8d.fsf@iznogoud.viz> <20121104192343.1f243455@shorty.local> <854nl4krvr.fsf@iznogoud.viz> <20121105155711.267e869b@fatty> <85mwyvplpu.fsf@iznogoud.viz> <20121105173150.19d3290c@fatty> <858vaaq27e.fsf@iznogoud.viz> <85y5iaocy8.fsf@iznogoud.viz> Date: Fri, 09 Nov 2012 15:37:00 -0500 In-Reply-To: <85y5iaocy8.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Fri, 09 Nov 2012 19:20:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4396=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4396> : streams <854622> : uri <1263854> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 12792 Cc: 12792@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) >> At least for the example code of bug#11883 it fixes a regression w.r.t >> Emacs-24.1. Please install it. > To which branch? emacs-24. > Oh, and I don't have a commit bit. That's easy to fix. Can you request membership in the `emacs' group, from your savannah account (you may need to create such an account first, obviously)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 10:22:31 2012 Received: (at 12792-done) by debbugs.gnu.org; 17 Nov 2012 15:22:31 +0000 Received: from localhost ([127.0.0.1]:50994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZkE2-0003mK-Qn for submit@debbugs.gnu.org; Sat, 17 Nov 2012 10:22:31 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:45755) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZkDz-0003mB-9N for 12792-done@debbugs.gnu.org; Sat, 17 Nov 2012 10:22:28 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C160AA6000A; Sat, 17 Nov 2012 07:21:33 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SXUwC39ZqjJ7; Sat, 17 Nov 2012 07:21:33 -0800 (PST) Received: from [192.168.1.3] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 718A5A60001; Sat, 17 Nov 2012 07:21:33 -0800 (PST) Message-ID: <50A7AB78.50609@cs.ucla.edu> Date: Sat, 17 Nov 2012 07:21:28 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: Wolfgang Jenkner Subject: Re: 24.2.50; shell-mode renders all its output in a yellow face Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 12792-done Cc: 12792-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.6 (-) Thanks for installing that patch. I'm marking the bug as done. From unknown Tue Aug 19 04:06:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 16 Dec 2012 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator