Subject: bug#32438: 26.1; Long command in shell-mode results in ^G being displayed

From: Svend Sorensen <[email-masked]>
Date: Tue, 14 Aug 2018 09:39:52 -0700

To reproduce:

emacs -Q

M-x [execute-extended-command]
s [self-insert-command]
h [self-insert-command]
e [self-insert-command]
l [self-insert-command]
l [self-insert-command]
<return> [minibuffer-complete-and-exit]
t [self-insert-command]
r [self-insert-command]
u [self-insert-command]
e [self-insert-command]
SPC [self-insert-command]
C-u [universal-argument]
1 [digit-argument]
0 [digit-argument]
1 [digit-argument]
9 [digit-argument]
a [self-insert-command]
<return> [comint-send-input]

Expected result:

New shell prompt displayed with no output from "true" command:

$ true aaa...
$

Actual result:

^G displayed, pressing enter results in ^G again.

$ true aaa...
^G
^G

In GNU Emacs 26.1 (build 2, x86_64-apple-darwin17.7.0, NS appkit-1561.60 Version 10.13.6 (Build 17G65))
 of 2018-07-31 built on 200956
Windowing system distributor 'Apple', version 10.3.1561
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Quit
Configured using:
 'configure
 --prefix=/nix/store/f8dskldv8dh8pqrwbglrb0vqsnnmri0w-emacs-26.1
 --with-modules --with-ns --disable-ns-self-contained
 CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $EMACSLOADPATH: /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp::/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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

Load-path shadows:
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-20180709.648/clojure-mode hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-5.8.1/clojure-mode
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-20180709.648/clojure-mode-autoloads hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-5.8.1/clojure-mode-autoloads
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-20180709.648/clojure-mode-pkg hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/clojure-mode-5.8.1/clojure-mode-pkg
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-dabbrev-code hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-dabbrev-code
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-tempo hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-tempo
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-gtags hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-gtags
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-elisp hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-elisp
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-cmake hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-cmake
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-capf hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-capf
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-dabbrev hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-dabbrev
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-autoloads hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-autoloads
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-etags hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-etags
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-eclim hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-eclim
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-semantic hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-semantic
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-ispell hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-ispell
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-keywords hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-keywords
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-clang hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-clang
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-abbrev hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-abbrev
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-pkg hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-pkg
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-yasnippet hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-yasnippet
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-template hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-template
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-nxml hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-nxml
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-css hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-css
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-oddmuse hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-oddmuse
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-files hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-files
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-xcode hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-xcode
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-bbdb hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-bbdb
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-0.9.6/company-tng hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/company-20180704.701/company-tng
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-20180720.247/flycheck-autoloads hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-31/flycheck-autoloads
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-20180720.247/flycheck-pkg hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-31/flycheck-pkg
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-20180720.247/flycheck-ert hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-31/flycheck-ert
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-20180720.247/flycheck-buttercup hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-31/flycheck-buttercup
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-20180720.247/flycheck hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/flycheck-31/flycheck
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-1.5.0/go-mode hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-20180327.830/go-mode
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-1.5.0/go-mode-pkg hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-20180327.830/go-mode-pkg
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-1.5.0/go-mode-autoloads hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/go-mode-20180327.830/go-mode-autoloads
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-0.10.0/ivy-pkg hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-20180719.1037/ivy-pkg
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-0.10.0/ivy hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-20180719.1037/ivy
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-0.10.0/colir hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-20180719.1037/colir
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-0.10.0/ivy-autoloads hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-20180719.1037/ivy-autoloads
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-0.10.0/ivy-overlay hides /nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/ivy-20180719.1037/ivy-overlay
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/seq-2.20/seq hides /nix/store/f8dskldv8dh8pqrwbglrb0vqsnnmri0w-emacs-26.1/share/emacs/26.1/lisp/emacs-lisp/seq
/nix/store/4c7459zcdym0b5w7khng8snsdrmnlbkd-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.5/let-alist hides /nix/store/f8dskldv8dh8pqrwbglrb0vqsnnmri0w-emacs-26.1/share/emacs/26.1/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug message rmc puny seq seq-25 byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell pcomplete comint
ansi-color ring elec-pair time-date tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 208693 9261)
 (symbols 48 20513 1)
 (miscs 40 53 212)
 (strings 32 30090 2243)
 (string-bytes 1 842562)
 (vectors 16 35772)
 (vector-slots 8 721835 10258)
 (floats 8 48 98)
 (intervals 56 471 0)
 (buffers 992 13))