* .emacs_bash
@ 2006-01-05 2:25 Will Parsons
2006-01-05 9:32 ` .emacs_bash Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Will Parsons @ 2006-01-05 2:25 UTC (permalink / raw)
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.
- Will
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs_bash
2006-01-05 2:25 .emacs_bash Will Parsons
@ 2006-01-05 9:32 ` Peter Dyballa
2006-01-22 22:27 ` .emacs_bash Will Parsons
2006-01-23 16:10 ` .emacs_bash stpap
2 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-01-05 9:32 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 05.01.2006 um 03:25 schrieb Will Parsons:
> 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.
I have a similiar case with tcsh. Here I can clearly write that
unsetenv commands in .emacs_tcsh make the multiple prompts. For
your .emacs_bash example no reason can be found. Could be the
execution of .bashrc causes them ... ?
A way to trace the reason is to add at the beginning and at the end
of the dot files a statement like
echo '<whatever> file starts|ends here'
This way you can at least find out which file makes it happen.
--
Greetings
Pete
Genius may have its limitations, but stupidity is not thus handicapped.
-- Elbert Hubbard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs_bash
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
2006-01-23 18:55 ` .emacs_bash Peter Dyballa
2006-01-23 16:10 ` .emacs_bash stpap
2 siblings, 1 reply; 9+ messages in thread
From: Will Parsons @ 2006-01-22 22:27 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs_bash
2006-01-05 2:25 .emacs_bash Will Parsons
2006-01-05 9:32 ` .emacs_bash Peter Dyballa
2006-01-22 22:27 ` .emacs_bash Will Parsons
@ 2006-01-23 16:10 ` stpap
2006-01-25 21:05 ` Dired and wild cards Tim Johnson
2 siblings, 1 reply; 9+ messages in thread
From: stpap @ 2006-01-23 16:10 UTC (permalink / raw)
FYI, you can enable colorised ls output by doing
M-x ansi-color-for-comint-mode-on
or add
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
in your startup emacs files
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs_bash
2006-01-22 22:27 ` .emacs_bash Will Parsons
@ 2006-01-23 18:55 ` Peter Dyballa
0 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-01-23 18:55 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 22.01.2006 um 23:27 schrieb Will Parsons:
> 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.
You could save one more line in ~/.emacs_bash and one more prompt in
Emacs' *shell* buffer by checking the value of TERM in .bashrc or
such *before* setting LS_OPTIONS -- then you would not need to unset
it. Only when TERM is *not* emacs or *not* dumb, then it's worth to
set them. Or you check for those xterm (and other) variations in
which ls can produce colourful output ...
--
Greetings
Pete <]
o __o |__ o HPV, the real
___o /I -\<, |o \ -\),-% high speed!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Dired and wild cards
2006-01-23 16:10 ` .emacs_bash stpap
@ 2006-01-25 21:05 ` Tim Johnson
2006-01-25 21:09 ` Drew Adams
[not found] ` <mailman.136.1138223551.2878.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Tim Johnson @ 2006-01-25 21:05 UTC (permalink / raw)
In Xemacs, I can do the follow:
C-x, d and then at the prompt, put in "*.html"
and get a wild card listing.
In GNU emacs, I have to do
M-: and then (dired "*.html").
Is there easier way to do this in GNU Emacs?
:-) I know, I'm lazy, but I'm always looking for an easier, quicker way
to do things.....
Thanks
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Dired and wild cards
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>
1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2006-01-25 21:09 UTC (permalink / raw)
C-x, d and then at the prompt, put in "*.html"
and get a wild card listing.
That works in GNU Emacs also.
In GNU emacs, I have to do
M-: and then (dired "*.html").
You shouldn't have to do that. Try emacs -q and see if it doesn't work.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dired and wild cards
[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
1 sibling, 0 replies; 9+ messages in thread
From: Tim Johnson @ 2006-01-27 12:56 UTC (permalink / raw)
On 2006-01-25, Drew Adams <drew.adams@oracle.com> wrote:
> C-x, d and then at the prompt, put in "*.html"
> and get a wild card listing.
>
> That works in GNU Emacs also.
>
> In GNU emacs, I have to do
> M-: and then (dired "*.html").
>
> You shouldn't have to do that. Try emacs -q and see if it doesn't work.
You're right - works with -q switch. I'll check my init file
and see what's clobbering it.
Thanks
tj
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dired and wild cards
[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
1 sibling, 0 replies; 9+ messages in thread
From: Tim Johnson @ 2006-01-27 18:32 UTC (permalink / raw)
On 2006-01-25, Drew Adams <drew.adams@oracle.com> wrote:
> C-x, d and then at the prompt, put in "*.html"
> and get a wild card listing.
>
> That works in GNU Emacs also.
>
> In GNU emacs, I have to do
> M-: and then (dired "*.html").
>
> You shouldn't have to do that. Try emacs -q and see if it doesn't work.
FYI: Problem was not in .emacs, but in a major mode.
The major mode has in invocation of (ffap-bindings).
Disabling that is the cure. Now I must research 'ffap.
tj
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-01-27 18:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 2:25 .emacs_bash Will Parsons
2006-01-05 9:32 ` .emacs_bash Peter Dyballa
2006-01-22 22:27 ` .emacs_bash Will Parsons
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
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).