unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44118@debbugs.gnu.org
Subject: bug#44118: 28.0.50; Unwanted switch of foreground colour in *shell* buffer
Date: Fri, 11 Dec 2020 16:23:10 +0100	[thread overview]
Message-ID: <DBBFEEDC-FDA9-4812-B195-4F58E1B166D5@Web.DE> (raw)
In-Reply-To: <87sg8c9z7v.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]



> Am 11.12.2020 um 15:47 schrieb Lars Ingebrigtsen <larsi@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.


[-- Attachment #2.1: Type: text/html, Size: 5623 bytes --]

[-- Attachment #2.2: root's tcsh prompt.png --]
[-- Type: image/png, Size: 5811 bytes --]

  reply	other threads:[~2020-12-11 15:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 18:10 bug#44118: 28.0.50; Unwanted switch of foreground colour in *shell* buffer Peter Dyballa
2020-12-09 13:24 ` Lars Ingebrigtsen
2020-12-09 13:44   ` Peter Dyballa
2020-12-10 14:09   ` Peter Dyballa
2020-12-11 14:47     ` Lars Ingebrigtsen
2020-12-11 15:23       ` Peter Dyballa [this message]
2020-12-11 15:27         ` Lars Ingebrigtsen
2020-12-11 16:30           ` Peter Dyballa
2020-12-12 10:54             ` Lars Ingebrigtsen
2020-12-12 11:12               ` Peter Dyballa
2020-12-18 23:18                 ` Lars Ingebrigtsen
2020-12-19  9:53                   ` Peter Dyballa
2020-12-19 15:48                     ` Lars Ingebrigtsen
2021-02-22 16:12                       ` Lars Ingebrigtsen
2021-02-22 20:03                         ` Peter Dyballa
2021-02-22 21:16                         ` Peter Dyballa
2021-02-22 21:41                           ` Lars Ingebrigtsen
2022-03-21 22:15                             ` Lars Ingebrigtsen
2020-12-10 14:58   ` Peter Dyballa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBBFEEDC-FDA9-4812-B195-4F58E1B166D5@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=44118@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).