GNU bug report logs -
#36879
26.2; OSC 52 paste in term/xterm.el not working
Previous Next
Reported by: daniel <at> ekloef.se (Daniel Eklöf)
Date: Wed, 31 Jul 2019 17:17:02 UTC
Severity: normal
Tags: patch
Found in version 26.2
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 36879 <at> debbugs.gnu.org (full text, mbox):
> Emacs uses BEL (C-g) as INTR char, which means that not
> only is special effort required to avoid having it quit the current
> elisp code -- this could have been done using inhibit-quit -- but when
> the pty receives the BEL from XTerm, it immediately discards unread
> characters and raises SIGINT.
I did figure Emacs, at the very least, handled BEL differently, but I
wasn't aware the PTY would discard unread characters. Thanks for
clarifying.
> Thus, it's very much a race: the only way it could ever work would be
> if Emacs has been able to read the entire reply except the BEL, and be
> sitting inside (read-char) when the BEL reaches the pty. Needless to
> say, this is rather unlikely.
Never happened during my tests :)
> Since XTerm parrots our choice of string terminator (BEL or ST), this
> suggests a simpler solution: just use ST, and the trouble with BEL is
> no more. Unfortunately the code has provisions for screen/tmux, where
> the entire request is wrapped in a DCS request:
>
> ESC P ... ESC \
>
> which means that we cannot use ST as terminator in that case.
I came to the same conclusion, and wrote a proof-of-concept patch that
replaced BEL with ST, and verified that yes, that does indeed work. In
XTerm as well as in my not-fancy terminal. (I didn't bother removing
support for screen though, making it both a broken patch, and cruder
than yours :) )
(Förresten, hej Mattias! Det var lite oväntat...)
--
Daniel
This bug report was last modified 5 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.