GNU bug report logs - #44118
28.0.50; Unwanted switch of foreground colour in *shell* buffer

Previous Next

Package: emacs;

Reported by: Peter Dyballa <Peter_Dyballa <at> Web.DE>

Date: Wed, 21 Oct 2020 18:11:02 UTC

Severity: minor

Found in version 28.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Peter Dyballa <Peter_Dyballa <at> Web.DE>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44118 <at> debbugs.gnu.org
Subject: Re: bug#44118: 28.0.50; Unwanted switch of foreground colour in
 *shell* buffer
Date: Fri, 11 Dec 2020 16:23:10 +0100
[Message part 1 (text/plain, inline)]

> Am 11.12.2020 um 15:47 schrieb Lars Ingebrigtsen <larsi <at> gnus.org>:
> 
> And the blue "root 235 /\" is your shell prompt?

Not really. I think it comes from shell-mode. In Apple Terminal it looks like this:



In ~/.emacs I have:

	.emacs:503: '(comint-prompt-regexp "^[a-z]+ [0-9]+ /\\\\ " t)
	.emacs:620: '(shell-prompt-pattern "^[a-z0-9]+ [0-9]+ /\\\\ ")
	.emacs:650: '(comint-highlight-prompt ((t (:background "khaki" :foreground "firebrick" :weight bold))))
	.emacs:670: '(minibuffer-prompt ((t (:background "yellow" :foreground "dark red" :weight bold))))


> Are there any ANSI codes in your prompt?

Yes. It's defined like this in ~/.tcshrc:

	 11 if ($?TERM) then
	 12     if (($TERM == xterm) | ($TERM == nxterm)) then
	 13         setenv TERM xterm-color
	 17     endif
	 43     if (($TERM == eterm-color) | ($TERM == xterm-256color) | ($TERM == xterm-color)) then
	 44         set     red="%{\033[1;47;31m%}"
	 45         set   green="%{\033[0;47;32m%}"
	 46         set  yellow="%{\033[1;33m%}"
	 47         set    blue="%{\033[1;34m%}"
	 48         set magenta="%{\033[1;35m%}"
	 49         set    cyan="%{\033[1;36m%}"
	 50         set   white="%{\033[0;37m%}"
	 51         set     end="%{\033[0m%}" # This is needed at the end... :(
	 52 #        set prompt      = "`echo \e[31\;47\;1m\j-$user` ! /\\ "
	 53         set prompt="${red}%n ! /\\ ${end} "
	 54 #       set prompt="${red}%n${blue}@%m ${white}%~ ${green}! /\\ ${end}"
	 55 #       set prompt="[${green}%n${blue}@%m ${white}%~ ]${end}"
	 56         unset red green yellow blue magenta cyan yellow white end
	 57     else
	 58         set prompt       = "`echo $user` ! /\\ "
	 59     endif
	126 endif


>  I don't quite see why that would affect the
> output here in this way, but it's one more thing that would be nice to
> eliminate -- could you use the default OS shell prompt and see whether
> that changes anything?

Alright, that'll be my next try! (In a new Terminal tab.)

--
Greetings

  Pete

We have to expect it, otherwise we would be surprised.

[Message part 2 (text/html, inline)]
[root's tcsh prompt.png (image/png, inline)]

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

Previous Next


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