unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Will Parsons <oudeis@nodomain.invalid>
Subject: Re: .emacs_bash
Date: 22 Jan 2006 22:27:50 GMT	[thread overview]
Message-ID: <slrndt81n7.47h.oudeis@isis.thalatta> (raw)
In-Reply-To: slrndrp0tg.6iu.oudeis@isis.thalatta

Will Parsons wrote:
> For quite a long time now I've been mildly annoyed that when I invoke a 
> shell (bash) under Emacs (running in a GNU/Linux system) that I get a string
> of prompts, like:
>
> 1 isis$ 2 isis$ 3 isis$ 4 isis$ 5 isis$ 
>
> (PS1 is set to '\! \h\$ '.)
>
> I finally got around to tracking this down, and it appears it's being caused
> by .emacs_bash.  In ~/.bashrc, I have:
>
> export LS_OPTIONS=--color
>
> so that I have pretty colours in ls output, but since this screws up ls 
> output under Emacs, I created the following .emacs_bash:
>
>======
> #  .emacs_bash
> #  This file contains additional commands to be run after starting up the
> #  bash shell under emacs.
> unset LS_OPTIONS
>======
>
> If I remove this file, the multiple prompts go away (and I have the screwed
> up ls output), but I don't understand why it causes the multiple prompts.
>
Following a suggestion by the only responder to my original post, I added 
echo statements to .bashrc and .emacs_bash to see where the multiple prompts
were coming from.  With .emacs_bash as follows:

=====
echo ".emacs_bash starts here"
#  .emacs_bash
#  This file contains additional commands to be run after starting up the
#  bash shell under emacs.
echo "LS_OPTIONS = $LS_OPTIONS"
unset LS_OPTIONS
echo ".emacs_bash ends here"
=====

starting up a shell I see:

.bashrc starts here
.bashrc ends here
1 isis$ .emacs_bash starts here
2 isis$ 3 isis$ 4 isis$ 5 isis$ LS_OPTIONS = --color
6 isis$ 7 isis$ .emacs_bash ends here
8 isis$ 

Deleting the three comment lines in .emacs_bash, I see:

.bashrc starts here
.bashrc ends here
1 isis$ .emacs_bash starts here
2 isis$ LS_OPTIONS = --color
3 isis$ 4 isis$ .emacs_bash ends here
5 isis$ 

So it looks like the extra prompts are related to the lines in .emacs_bash,
whether they are comment lines or not.  As I said, this is a minor annoyance,
but I still would like a fix and/or explanation if possible.

- Will

  parent reply	other threads:[~2006-01-22 22:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05  2:25 .emacs_bash Will Parsons
2006-01-05  9:32 ` .emacs_bash Peter Dyballa
2006-01-22 22:27 ` Will Parsons [this message]
2006-01-23 18:55   ` .emacs_bash Peter Dyballa
2006-01-23 16:10 ` .emacs_bash stpap
2006-01-25 21:05   ` Dired and wild cards Tim Johnson
2006-01-25 21:09     ` Drew Adams
     [not found]     ` <mailman.136.1138223551.2878.help-gnu-emacs@gnu.org>
2006-01-27 12:56       ` Tim Johnson
2006-01-27 18:32       ` Tim Johnson

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=slrndt81n7.47h.oudeis@isis.thalatta \
    --to=oudeis@nodomain.invalid \
    --cc=ellenophilos@yahoo.com \
    /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.
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).