From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Parsons Newsgroups: gmane.emacs.help Subject: Re: .emacs_bash Date: 22 Jan 2006 22:27:50 GMT Message-ID: References: Reply-To: ellenophilos@yahoo.com NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1137972200 1030 80.91.229.2 (22 Jan 2006 23:23:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2006 23:23:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 23 00:23:20 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F0oYH-0000dY-R1 for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jan 2006 00:23:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0oX9-0000vj-F6 for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Jan 2006 18:22:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Original-X-Trace: individual.net +ay/2xxSF4uY/AFSlcZu7wJ52G7J7d19c9hbdhqOusoEO3WUFW User-Agent: slrn/0.9.8.1 (Debian) Original-Xref: shelby.stanford.edu gnu.emacs.help:137162 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32784 Archived-At: 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