GNU bug report logs - #46332
Eshell color control characters not displayed correctly

Previous Next

Package: emacs;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Fri, 5 Feb 2021 17:50:01 UTC

Severity: normal

Tags: fixed, moreinfo

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46332 in the body.
You can then email your comments to 46332 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Fri, 05 Feb 2021 17:50:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 05 Feb 2021 17:50:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Eshell color control characters not displayed correctly
Date: Fri, 5 Feb 2021 12:34:36 -0500
Hello Emacs maintainers!


So I have my pager set to cat and in eshell I type `git log` and after a
while (1000 - 2000 lines) it starts to show the control characters
verbatim instead of coloring the characters. So it works initially but
then breaks down after a bit. This applies to all commands but git log
is a good one to use for testing.

I did a quick git bisect to figure out when the problem occurred and it
seems commit 2e2a8e5491bc6259a9ebe8c703c1c501307953e2 is the
offender.

I can confirm the bug still exists as of commit
0484879d3b0f81222bacbc3c9655d1cfcdb5d321.


Thanks,

Morgan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Sat, 06 Feb 2021 10:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Sat, 06 Feb 2021 11:54:40 +0100
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> So I have my pager set to cat and in eshell I type `git log` and after a
> while (1000 - 2000 lines) it starts to show the control characters
> verbatim instead of coloring the characters. So it works initially but
> then breaks down after a bit. This applies to all commands but git log
> is a good one to use for testing.
>
> I did a quick git bisect to figure out when the problem occurred and it
> seems commit 2e2a8e5491bc6259a9ebe8c703c1c501307953e2 is the
> offender.

Thanks for bisecting this -- we've had similar reports about ANSI
colouring randomly not working, but I've been unable to reproduce the
problem here.

And I'm still not able to, and it would be nice to be able to reproduce
it before starting to poke at it.

Do you have a recipe, starting from "emacs -Q", for how to reproduce
this bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 07 Feb 2021 13:01:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Tue, 09 Feb 2021 19:32:01 GMT) Full text and rfc822 format available.

Message #13 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Tue, 9 Feb 2021 14:31:07 -0500
Hi Lars,

Thanks for all the hard work you do! I read your blog :)


I can't seem to be able to not reproduce this. Meaning no matter what I
do the bug shows up. Maybe it's a compile flag issue? I'm using guix to
build emacs so I'm wondering if you're willing to install guix (just the
package manager, not the operating system) to check if that's the issue.

Using this command I'm able to recreate the bug. This command boots up a
container, creates a user for the container, and exposes pretty much
nothing except the current working directory (so do this in a git
repository to check). I expose /tmp too because X11 seems to want it but
you might not have to.

guix environment --preserve='^DISPLAY$' --expose=/tmp
--with-commit=emacs-next=817a49748f0cd7f746ce1895d7c31c086289a91e
--with-git-url=emacs-next=/home/USERNAME/src/emacs --user=testyboi -C
--ad-hoc emacs-next git -- emacs -Q

Then M-x eshell
Then type: git log --color

Around 300 lines later, the control characters start being printed
verbatim. The amount of time until it happens seems to vary sometimes,
but it always seems to happen eventually.


If you don't want to install guix, I'll include the bug report stuff here:


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.24, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 --prefix=/gnu/store/s0gxsqli2jx89sdj5xli8l44i7g49slr-emacs-next-git.817a497
 --enable-fast-install --with-modules --with-cairo
 --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH:
/gnu/store/1wbb10gwhahy7gmh8n9csza1cl2mipwy-profile/share/emacs/site-lisp:/gnu/store/1wbb10gwhahy7gmh8n9csza1cl2mipwy-profile/share/emacs/28.0.50/lisp
  locale-coding-system: nil

Major mode: Eshell

Minor modes in effect:
  shell-dirtrack-mode: t
  eshell-prompt-mode: t
  eshell-hist-mode: t
  eshell-pred-mode: t
  eshell-cmpl-mode: t
  eshell-proc-mode: t
  eshell-arg-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source eieio eieio-core cl-macs eieio-loaddefs
password-cache json map text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq em-unix em-term
term disp-table easymenu shell ehelp em-script em-prompt em-ls
cl-loaddefs cl-lib em-hist em-pred em-glob em-dirs esh-var em-cmpl
pcomplete comint ansi-color ring em-basic em-banner em-alias esh-mode
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util iso-transl tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 69622 6268)
 (symbols 48 8356 1)
 (strings 32 24845 1877)
 (string-bytes 1 835448)
 (vectors 16 14757)
 (vector-slots 8 195777 13108)
 (floats 8 27 32)
 (intervals 56 641 0)
 (buffers 984 12))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Tue, 09 Feb 2021 20:25:01 GMT) Full text and rfc822 format available.

Message #16 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Tue, 09 Feb 2021 21:23:50 +0100
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Then M-x eshell
> Then type: git log --color

Ah, thanks -- that was the missing clue -- with that, I'm able to
reproduce the bug here, too.  Or to be precise, if somebody else wants
to poke at this before I get a chance:

emacs -Q
M-x eshell
export PAGER=cat
git log --color

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Mon, 22 Feb 2021 15:53:02 GMT) Full text and rfc822 format available.

Message #19 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Mon, 22 Feb 2021 16:51:50 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Ah, thanks -- that was the missing clue -- with that, I'm able to
> reproduce the bug here, too.  Or to be precise, if somebody else wants
> to poke at this before I get a chance:
>
> emacs -Q
> M-x eshell
> export PAGER=cat
> git log --color

This now works for me in Emacs 28 -- it was saving the wrong end
position.  Would it be possible for you to check whether this works for
you too now?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Mon, 22 Feb 2021 19:02:01 GMT) Full text and rfc822 format available.

Message #22 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Mon, 22 Feb 2021 14:01:13 -0500
I had a little trouble testing this as there is currently a bug in
master preventing me from compiling. The bug was introduced in commit
8d5dfafab7dc40d4b74dc0b56d1b314fd8cac390 and you can see the compile log
here: https://emba.gnu.org/emacs/emacs/-/jobs/13484

Thankfully, that commit is after your fix so I was eventually able to
test it. And it works!! Thank you so much!! I've just been dealing with
this for months now and it has not been ideal.

Feel free to close the bug. You have made me a very happy man!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46332; Package emacs. (Mon, 22 Feb 2021 19:57:02 GMT) Full text and rfc822 format available.

Message #25 received at 46332 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 46332 <at> debbugs.gnu.org
Subject: Re: bug#46332: Eshell color control characters not displayed correctly
Date: Mon, 22 Feb 2021 20:55:55 +0100
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Thankfully, that commit is after your fix so I was eventually able to
> test it. And it works!! Thank you so much!! I've just been dealing with
> this for months now and it has not been ideal.

Thanks for checking and confirming that the fix works.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 22 Feb 2021 19:57:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 46332 <at> debbugs.gnu.org and Morgan Smith <Morgan.J.Smith <at> outlook.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 22 Feb 2021 19:57:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Mar 2021 11:24:39 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.