Subject: Re: bug#49253: 27.2; Emacs non-responsive when pasting into terminal-mode

From: Eli Zaretskii <[email-masked]>
Date: Sat, 16 Dec 2023 14:46:00 +0200

> Date: Mon, 11 Dec 2023 14:13:24 -0800
> From: Jared Finder <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
> 
> On 2023-12-11 08:10, Matt Bisson wrote:
> > TL;DR: It works!
> 
> Thank you for the testing!
> 
> Eli, I think the fully correct definition for term--xterm-paste is the 
> following, which has additional error checking:
> 
> (defun term--xterm-paste (event)
>    "Insert the text pasted in an XTerm bracketed paste operation."
>    (interactive "e")
>    (unless (eq (car-safe event) 'xterm-paste)
>      (error "term--xterm-paste must be found to xterm-paste event"))
>    (let ((str (nth 1 event)))
>      (unless (stringp str)
>        (error "term--xterm-paste provided event does not contain paste 
> text"))
>      (term-send-raw-string str)))

Thanks, installed on the emacs-29 branch, and closing the bug.