all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: weird emacs shell behavior
Date: Sat, 18 Aug 2007 16:36:55 +0200	[thread overview]
Message-ID: <87d4xkkiyg.fsf@baldur.tsdh.de> (raw)
In-Reply-To: mailman.4930.1187384971.32220.help-gnu-emacs@gnu.org

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 17.08.2007 um 21:34 schrieb Tassilo Horn:
>
>> | > echo "Hello, test!"  <== That's what I typed.  It's bold after RET
>
> It becomes interpreted as prompt. Check comint-prompt-regexp and
> shell-prompt-pattern.

,----[ C-h v comint-prompt-regexp RET ]
| comint-prompt-regexp is a variable defined in `comint.el'.
| Its value is 
| "^[^#$%>\n]*[#$%>] *"
| Local in buffer *shell*; global value is "^"
| 
| Documentation:
| Regexp to recognize prompts in the inferior process.
| Defaults to "^", the null string at BOL.
| 
| This variable is only used if the variable
| `comint-use-prompt-regexp' is non-nil.
`----

By default `comint-use-prompt-regexp' is nil in *shell*.  I've set it to
t, but that doesn't change things.

,----[ C-h v shell-prompt-pattern RET ]
| shell-prompt-pattern is a variable defined in `shell.el'.
| Its value is 
| "^[^#$%>\n]*[#$%>] *"
`----

So it seems that `comint-prompt-regexp' is set to `shell-prompt-pattern'
in shell-mode.

And this regexp matches my prompt.  It's only a simple "> " when TERM is
set to dumb.

(string-match shell-prompt-pattern "> ") == C-x C-e ==> 0

>> | > echo "Hello, test!"  <== After my RET the line gets repeated...
>
> Again, it seems to be kept for the prompt?
>
>> | ^[]2;echo  ~^GHello, test! <== After the ^G comes the output.
>> `----
>>
>> Do you know what ^[ and ^G are for control chars and how I can get rid
>> of them?
>
> ESC and BELL. Maybe you should check which echo you are using, what is
> set for it, and what else is set for the shell interpreter running in
> *shell* buffer.

,----
| > which echo
| > which echo
| ^[]2;which  ~^G/bin/echo
`----

echo --help tells me it's the echo from coreutils 6.9.

,----
| > env
| > env
| ^[]2;env  ~^GEMACS=t
| CLASSPATH= [snipped]
| DISPLAY=:0
| CVS_RSH=ssh
| INSIDE_EMACS=22.1.50.1,comint
| MAIL=/var/mail/heimdall
| JAVA_HOME=/opt/sun-jdk-1.6.0
| WINDOWPATH=7
| RI=--format ansi --width 80
| TERM=dumb
| SHLVL=2
| GREP_OPTIONS=--color=auto
| USER=heimdall
| GREP_COLOR=97;45
| LOGNAME=heimdall
| HOME=/home/heimdall
| DARCS_EDITOR=emacsclient
| INPUTRC=/etc/fish/fish_inputrc
| HUSHLOGIN=FALSE
| RGHOME=/home/heimdall/uni/repos/re-group/trunk
| VISUAL=emacsclient
| ANTLR_HOME=/usr/share/antlr/lib
| LS_COLORS=
| LC_ALL=en_US.UTF-8
| PATH=/bin:/usr/bin:/usr/X11R6/bin:/opt/bin:/usr/games/bin:/home/heimdall/bin:/usr/kde/3.5/bin:/usr/local/bin
| EDITOR=emacsclient
| COLUMNS=96
| BOUML_ID=50
| BROWSER=firefox
| JAVA_VERSION=1.6.0
| TERMCAP=
| XAUTHORITY=/home/heimdall/.Xauthority
| LANG=en_US.UTF-8
| MAILHOST=pop.gmx.de
| SHELL=/bin/fish
| PWD=/home/heimdall
`----

> After all: are you using GNU Emacs 22?

Yes, a some hours old CVS checkout.

Bye,
Tassilo

  parent reply	other threads:[~2007-08-18 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4916.1187369678.32220.help-gnu-emacs@gnu.org>
2007-08-17 17:36 ` weird emacs shell behavior Joel J. Adamson
2007-08-17 18:19   ` Emilio Lopes
2007-08-17 18:26     ` Joel J. Adamson
2007-08-17 18:38       ` Emilio Lopes
2007-08-17 19:40         ` Joel J. Adamson
2007-08-17 19:34     ` Tassilo Horn
2007-08-17 21:09       ` Peter Dyballa
     [not found]       ` <mailman.4930.1187384971.32220.help-gnu-emacs@gnu.org>
2007-08-18 14:36         ` Tassilo Horn [this message]
2007-08-18 16:11           ` Peter Dyballa
     [not found]           ` <mailman.4951.1187453499.32220.help-gnu-emacs@gnu.org>
2007-08-18 16:30             ` Tassilo Horn
2007-08-17 16:54 phundamental unaudio
2007-08-17 17:43 ` 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

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

  git send-email \
    --in-reply-to=87d4xkkiyg.fsf@baldur.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=help-gnu-emacs@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.