Subject: 24.4.50; garbage characters when pasting in an OS X terminal

From: Glyph <[email-masked]>
Date: Sun, 27 Apr 2014 00:47:37 -0700

I'm using snapshot builds from http://emacsformacosx.com/.  Somewhere
between the 4/13 snapshot and the 4/24 snapshot, "paste" in an OS X
terminal (running with -nw) results in garbage characters on either side
of the paste.

For example, if I paste the URL, it looks like
200~http://emacsformacosx.com/201~, or causes jumping around within the
buffer (for example, when filing this bug, it jumped to the beginning of
the buffer and pasted the URL and the "201~" before the From:).

In GNU Emacs 24.4.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2014-04-26 on bob.porkrind.org
Repository revision: [email-masked]
Configured using:
`configure --host=x86_64-apple-darwin --build=i686-apple-darwin
--with-ns'

Configured features:
ACL LIBXML2 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  quick-hack-emacs-lisp-mode: t
  shell-dirtrack-mode: t
  helm-match-plugin-mode: t
  helm-occur-match-plugin-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  global-rainbow-delimiters-mode: t
  rainbow-delimiters-mode: t
  obb-mode: t
  which-function-mode: t
  show-paren-mode: t
  server-mode: t
  icomplete-mode: t
  tooltip-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ ? 1 ; 2 c ESC [ 2 0 0 ~ h t t p : / / e m a c 
s f o r m a c o s x . c o m / ESC [ 2 0 1 ~ C-_ C-_ 
C-_ C-_ ESC x e m a c s b DEL - b u g C-n RET

Recent messages:
Loading paren...done
Loading which-func...done
Loading /Users/glyph/Settings/Emacs/bootstrap/customizations.el (source)...done
Loading /Users/glyph/Settings/Emacs/firstparty/quickhack-autoload.el (source)...done
Loading /Users/glyph/Settings/Emacs/firstparty/flyflakes-autoload.el (source)...done
ad-handle-definition: `tramp-read-passwd' got redefined
Pymacs loading ropemacs...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Nowhere to go back to. [2 times]
Undo! [4 times]

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils help-at-pt xterm ropemacs
pymacs rx python-patches python quickhack glyph-setup adaptive-wrap
helm-C-x-b helm-imenu helm-command helm-elisp helm-eval eldoc helm-mode
helm-cmd-t helm-files image-dired tramp tramp-compat tramp-loaddefs
trampver shell pcomplete format-spec dired-x dired-aux ffap thingatpt
helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptative
helm-info helm-net browse-url xml url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core
gnus-util mm-util mail-prsvr password-cache url-vars mailcap helm-plugin
bookmark pp helm-help helm-match-plugin helm-grep helm-regexp grep
helm-external helm-utils dired helm-locate helm helm-config helm-aliases
auto-complete-config auto-complete edmacro kmacro popup pelican-mode
backandforth advice help-fns rainbow-delimiters column-marker easy-mmode
obb-mode cl-macs combinator cl cl-loaddefs cl-lib epytext
goto-definition gv info easymenu package time-date jka-compr
tango-dark-theme which-func imenu paren server avoid icomplete linum
cus-start cus-load flymake compile comint ansi-color ring 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
cocoa ns multi-tty emacs)

Memory information:
((conses 16 215726 5957)
(symbols 48 31136 0)
(miscs 40 58 122)
(strings 32 54984 6179)
(string-bytes 1 1481420)
(vectors 16 21509)
(vector-slots 8 504251 2686)
(floats 8 157 651)
(intervals 56 364 18)
(buffers 960 14))