Subject: Subject: 24.0.91; shell prompt doubled

From: Andreas Röhler <[email-masked]>
Date: Sat, 05 Nov 2011 16:46:58 +0100

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)
=== 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)))