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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Andreas Röhler <andreas.roehler@HIDDEN>; dated Sat, 5 Nov 2011 15:50:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'non-empty ~/.emacs_SHELLNAME causes multiple shell prompts' from 'Subject: 24.0.91; shell prompt doubled' Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 9961 <at> debbugs.gnu.org:


Received: (at 9961) by debbugs.gnu.org; 7 Nov 2011 22:01:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 17:01:33 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RNXG0-0002Eq-Ub
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2011 17:01:33 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rgm@HIDDEN>) id 1RNXFz-0002Ei-2k
	for 9961 <at> debbugs.gnu.org; Mon, 07 Nov 2011 17:01:31 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm@HIDDEN>)
	id 1RNXDB-0001uX-4L; Mon, 07 Nov 2011 16:58:37 -0500
From: Glenn Morris <rgm@HIDDEN>
To: 9961 <at> debbugs.gnu.org
Subject: Re: bug#9961: Subject: 24.0.91; shell prompt doubled
References: <4EB55A72.4050905@HIDDEN>
X-Spook: Agfa Ft. Meade White House terrorism munitions virus SWAT
X-Ran: V*#=(!S{:l)!MZ/tHNd}zl5|T-l&pKye@l!ojJGO4Xh<?Y)[TM5Pz!D>,WUO[.I,2SuG!5
X-Hue: magenta
X-Attribution: GM
Date: Mon, 07 Nov 2011 16:58:36 -0500
In-Reply-To: <4EB55A72.4050905@HIDDEN> ("Andreas =?utf-8?Q?R=C3=B6hler?=
	=?utf-8?Q?=22's?= message of "Sat, 05 Nov 2011 16:46:58 +0100")
Message-ID: <x7k47b7fxv.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 9961
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.4 (------)


The patch (which could not be applied anyway due to copyright reasons)
simply silently makes comint-exec ignore its STARTFILE argument, which
obviously cannot be the correct solution.

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9961; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Nov 2011 15:49:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 05 11:49:57 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RMiVJ-0008U6-51
	for submit <at> debbugs.gnu.org; Sat, 05 Nov 2011 11:49:57 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiVG-0008Ty-0i
	for submit <at> debbugs.gnu.org; Sat, 05 Nov 2011 11:49:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiSe-0003G3-0v
	for submit <at> debbugs.gnu.org; Sat, 05 Nov 2011 11:47:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:43798)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiSd-0003Fz-Vd
	for submit <at> debbugs.gnu.org; Sat, 05 Nov 2011 11:47:11 -0400
Received: from eggs.gnu.org ([140.186.70.92]:58212)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiSc-00031Q-Ox
	for bug-gnu-emacs@HIDDEN; Sat, 05 Nov 2011 11:47:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiSb-0003Fi-Bm
	for bug-gnu-emacs@HIDDEN; Sat, 05 Nov 2011 11:47:10 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:50010)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.roehler@HIDDEN>) id 1RMiSb-0003FM-0S
	for bug-gnu-emacs@HIDDEN; Sat, 05 Nov 2011 11:47:09 -0400
Received: from [192.168.178.27] (brln-4d0c25be.pool.mediaWays.net
	[77.12.37.190])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MSXwa-1RUNwL2kyq-00S3P0; Sat, 05 Nov 2011 16:47:05 +0100
Message-ID: <4EB55A72.4050905@HIDDEN>
Date: Sat, 05 Nov 2011 16:46:58 +0100
From: =?ISO-8859-15?Q?Andreas_R=F6hler?= <andreas.roehler@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de;
	rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: Subject: 24.0.91; shell prompt doubled
Content-Type: multipart/mixed; boundary="------------000004010209020905070704"
X-Provags-ID: V02:K0:IGToEjRUEAKM/3EQf+uICGuwh8XHbBt8rUYj2ren5NB
	/YAmHPgjXaYrvuUcxhBommm9EkFwj4Qset9RavNPy6cqIkIL3a
	FxMYCC2vnICDywNlyr5/ug1/MHGj5WgAAf5uJAhSEeZKOgD6rM
	uyQJURr3iAeq+/kb2XtCcUwyxXBxc3Qq1DiXOTSxnJhFTAPBM2
	6xjtLhbIW01IRWvne/8pivp+qBSrNU6L4sE79YcUBztr0WA7Qr
	ytZ/zX5FFwnCnHGnWjW8ZtVRtRJGbBG9y++z6qa1lVSR3jVQUG
	mY8BsrkJr2AxHpLs9aO9DIbxerb9g9JqcLcScikZr/sPX25Lxm
	OPfJAKcLGMiz1xv3NXlI=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.7 (-----)

This is a multi-part message in MIME format.
--------------000004010209020905070704
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

after M-x shell RET

shell prompt appears twofold like this:

MYNAME@MYHOST:~/emacs-20111105-r106290/src> 
MYNAME@MYHOST:~/emacs-20111105-r106290/src>

;;;;;;;;;

patch attached seems to fix it

Andreas

;;;;;;;;;

In GNU Emacs 24.0.91.1 (i686-suse-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2011-11-05 on MYHOST
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: de_DE.UTF-8
   value of $XMODIFIERS: @im=local
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
   shell-dirtrack-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
M-x s h e l l <return> M-x r e p o r t - e m c <backspace>
a c s - b u f <backspace> g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug ansi-color shell pcomplete comint regexp-opt ring time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)

--------------000004010209020905070704
Content-Type: text/x-patch;
 name="shell-prompt-doubled.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="shell-prompt-doubled.patch"

=== modified file 'lisp/comint.el'
--- lisp/comint.el	2011-10-25 12:33:31 +0000
+++ lisp/comint.el	2011-11-05 15:35:31 +0000
@@ -769,18 +769,19 @@
       (goto-char (point-max))
       (set-marker (process-mark proc) (point))
       ;; Feed it the startfile.
-      (cond (startfile
+      ;; (cond (startfile
 	     ;;This is guaranteed to wait long enough
 	     ;;but has bad results if the comint does not prompt at all
 	     ;;	     (while (= size (buffer-size))
 	     ;;	       (sleep-for 1))
 	     ;;I hope 1 second is enough!
-	     (sleep-for 1)
-	     (goto-char (point-max))
-	     (insert-file-contents startfile)
-	     (setq startfile (buffer-substring (point) (point-max)))
-	     (delete-region (point) (point-max))
-	     (comint-send-string proc startfile)))
+	     ;; (sleep-for 1)
+	     ;; (goto-char (point-max))
+	     ;; (insert-file-contents startfile)
+	     ;; (setq startfile (buffer-substring (point) (point-max)))
+	     ;; (delete-region (point) (point-max))
+	     ;; (comint-send-string proc startfile)))
+	     
       (run-hooks 'comint-exec-hook)
       buffer)))
 


--------------000004010209020905070704--




Acknowledgement sent to Andreas Röhler <andreas.roehler@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#9961; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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