GNU bug report logs - #9961
non-empty ~/.emacs_SHELLNAME causes multiple shell prompts

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> online.de>

Date: Sat, 5 Nov 2011 15:50:02 UTC

Severity: minor

Merged with 40754

Found in version 27.0.91

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Colin Baxter <m43cap <at> yandex.com>
To: 9961 <at> debbugs.gnu.org
Subject: bug#9961: Subject: 24.0.91; shell prompt doubled
Date: Tue, 25 Aug 2020 14:26:37 +0100
>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:

    > (I think I sent this one prematurely once already; sorry.)  Glenn
    > Morris <rgm <at> gnu.org> writes:

    >> This issue occurs since at least Emacs 21.1.  If you have a
    >> non-empty ~/.emacs_bash file, eg one that contains just:
    >> 
    >> #comment
    >> 
    >> and do M-x shell with the bash shell, then you get an extra N
    >> copies of your prompt, as the N lines of ~/.emacs_bash are fed to
    >> the shell by comint-exec.

    > This bug is still present in Emacs 28, although it looks a bit
    > different now:




    > I poked around to see whether there's any easy way to fix this:
    > Like a way to say to comint "send this to the process, but discard
    > the output", but there doesn't seem to be?

This works for me. Create a ~/.emacs_bash as:

 # -*- mode: sh; -*-
 # echo ""
 printf '\r\n%.0s' {1..50} ## This clears screen and puts prompt at bottom



There will only be one prompt. For csh, touch the file ~/.emacs_csh but
keep empty.

Best wishes,

Colin Baxter.





This bug report was last modified 3 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.