Subject: bug#24639: 26.0.50; Terminal paste doesn't work right in term char mode

From: Philipp Stephani <[email-masked]>
Date: Fri, 07 Oct 2016 19:19:28 +0000

Eli Zaretskii <[email-masked]> schrieb am Fr., 7. Okt. 2016 um 21:05 Uhr:

> > From: Philipp <[email-masked]>
> > Date: Fri, 07 Oct 2016 20:02:45 +0200
> >
> > emacs -nw -Q -f term
> >
> > RET to start the terminal.  Make sure it's in char mode.  Select
> > some text in another X window.  Go back to the Emacs term buffer, press
> > middle click, then press RET.
> > Expected behavior: Selected text gets inserted and interpreted as shell
> > command.
> > Actual behavior in Emacs 24.3: Expected behavior.
> > Actual behavior in Emacs built from master branch: Selected text gets
> > inserted, but not interpreted as shell command (i.e. nothing happens
> > after pressing RET).
> >
> > This appears to be a regression, possibly caused by
> > bracketed-paste-mode.
>
> Does it help to disable the bracketed-paste-mode in term.el?
>

Yes, uncommenting (xterm--init-bracketed-paste-mode) in term/xterm.el fixes
the issue. Maybe M-x term should temporarily bracketed paste mode when in
char mode.