unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs shell mode prompt problem
@ 2007-06-25 16:50 Zhen
  2007-06-25 19:42 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Zhen @ 2007-06-25 16:50 UTC (permalink / raw)
  To: help-gnu-emacs

I set the PS1 to "\t@desk~>" in ~/.bashrc and the it works well in
emacs shell mode for a long time until some days ago. I may updated
some packages related to emacs21, but I do not think I changed
the configurations. Now the problem is the shell prompt in emacs shell
mode looks like this:

^[]0;USER NAME /the/current/working/directory/^G12:34:25@desk~>

This prompt is very annoying, how can I change it back to
"12:34:25@desk~> "?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs shell mode prompt problem
  2007-06-25 16:50 emacs shell mode prompt problem Zhen
@ 2007-06-25 19:42 ` Peter Dyballa
  2007-07-11 10:35   ` Jim Ottaway
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Dyballa @ 2007-06-25 19:42 UTC (permalink / raw)
  To: Zhen; +Cc: help-gnu-emacs


Am 25.06.2007 um 18:50 schrieb Zhen:

> This prompt is very annoying, how can I change it back to
> "12:34:25@desk~> "?

By reading the bash manual. In GNU Emacs' *shell* buffer neither the  
prompt nor ls should emit ^[ANSI escape sequences for (colour)  
effects. In *terminal* buffer this might work better ...

In ~/.emacs_bash you can set a prompt that is only used in GNU Emacs'  
*shell* buffer (*terminal* does not read ~/.emacs_bash).

--
Greetings

   Pete

 From error to error, one discovers the entire truth.
                                                      - Sigmund Freud

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs shell mode prompt problem
  2007-06-25 19:42 ` Peter Dyballa
@ 2007-07-11 10:35   ` Jim Ottaway
  2007-07-11 22:17     ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Ottaway @ 2007-07-11 10:35 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 25.06.2007 um 18:50 schrieb Zhen:

>> This prompt is very annoying, how can I change it back to
>> "12:34:25@desk~> "?

> By reading the bash manual. In GNU Emacs' *shell* buffer neither the
> prompt nor ls should emit .ANSI escape sequences for (colour)
> effects. In *terminal* buffer this might work better ...

You *can* have ANSI colour in shell buffers with 

M-x ansi-color-for-comint-mode-on RET

or (ansi-color-for-comint-mode-on) in .emacs.

I thinks that this works in Emacs 21 as well as Emacs 22.

Regards,

-- 
Jim Ottaway

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs shell mode prompt problem
  2007-07-11 10:35   ` Jim Ottaway
@ 2007-07-11 22:17     ` Peter Dyballa
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2007-07-11 22:17 UTC (permalink / raw)
  To: Emacs Mailing List


Am 11.07.2007 um 12:35 schrieb Jim Ottaway:

> You *can* have ANSI colour in shell buffers with
>
> M-x ansi-color-for-comint-mode-on RET
>
> or (ansi-color-for-comint-mode-on) in .emacs.

Works indeed!

--
Greetings

   Pete

"Isn't vi that text editor with two modes... one that beeps and one
that corrupts your file?" -- Dan Jacobson, on comp.os.linux.advocacy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-11 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-25 16:50 emacs shell mode prompt problem Zhen
2007-06-25 19:42 ` Peter Dyballa
2007-07-11 10:35   ` Jim Ottaway
2007-07-11 22:17     ` Peter Dyballa

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).