Subject: 24.3.93; term-suppress-hard-newline breaks command history

From: Russell Black <[email-masked]>
Date: Mon, 15 Sep 2014 23:43:45 +0000

In ansi-term, when term-suppress-hard-newline is t, attempting to navigate a command history containing commands long enough to wrap places the terminal in a funny state.  Here is a command that reproduces the bug:

emacs -Q --eval '(progn (setq term-suppress-hard-newline t) (ansi-term "/bin/sh") (kmacro-call-macro nil nil nil (kbd "echo SPC ESC 500 a RET Now SPC press SPC up SPC and SPC down SPC to SPC navigate SPC history")))'

In GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS apple-appkit-1265.21)
of 2014-09-15 on *.rbnews.com
Windowing system distributor `Apple', version 10.3.1265
Configured using:
`configure --with-ns'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-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

Recent input:
C-x b <return> M-x r e p o r t - e m a c s - b u 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 emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils edmacro cl-loaddefs cl-lib kmacro term
disp-table easymenu ehelp ring time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 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 make-network-process
dbusbind cocoa ns multi-tty emacs)

Memory information:
((conses 16 77539 5468)
(symbols 48 18367 0)
(miscs 40 45 145)
(strings 32 12201 4787)
(string-bytes 1 348380)
(vectors 16 10153)
(vector-slots 8 385572 7771)
(floats 8 56 77)
(intervals 56 185 4)
(buffers 960 12))