From unknown Mon Jun 23 13:08:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36879 <36879@debbugs.gnu.org> To: bug#36879 <36879@debbugs.gnu.org> Subject: Status: 26.2; OSC 52 paste in term/xterm.el not working Reply-To: bug#36879 <36879@debbugs.gnu.org> Date: Mon, 23 Jun 2025 20:08:55 +0000 retitle 36879 26.2; OSC 52 paste in term/xterm.el not working reassign 36879 emacs submitter 36879 daniel@ekloef.se (Daniel Ekl=C3=B6f) severity 36879 normal tag 36879 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 13:16:25 2019 Received: (at submit) by debbugs.gnu.org; 31 Jul 2019 17:16:26 +0000 Received: from localhost ([127.0.0.1]:53018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hssDB-0005Zv-Ah for submit@debbugs.gnu.org; Wed, 31 Jul 2019 13:16:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:38299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsrvF-0004zr-T6 for submit@debbugs.gnu.org; Wed, 31 Jul 2019 12:57:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55994) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsrvE-0007kq-6I for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 12:57:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsrvC-00066M-J6 for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 12:57:52 -0400 Received: from mail.ekloef.se ([193.105.134.189]:54290) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsrvC-000612-2g for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 12:57:50 -0400 From: daniel@ekloef.se (Daniel =?utf-8?Q?Ekl=C3=B6f?=) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564592263; bh=I8Ru0ihtOZuRUeqcPj2Jt3ryKUl9eLe8YV62Bn0EwR4=; h=From:To:Subject:Date:From; b=r3mr4omNa4+GtgPHafelpPMJ0Z0+8qTUH1lbmEQXcykbJuRBQNcOUt5zb5mImlzeV HkuATRohfHgg131xCIGtYS+gqvpx+2Qyo70LfzsJFknARxjuHKm+3t0qlbOtsRbHs8 k5wrNTyF6bbtc4cskdg08v3ZhXjYiUB5wvh5ZSAalTEkeVUaI8b52UfUBOeRIHgB2Z 9BbUfq7htHrVkUYV2U4tWo6oUzmZPrIoDKxsDT9lTh8NJhNLfHitRzLFXBdUgALSPC HdUjS92edFsF5Sh16ZTWuivE4VkZeb3xmRM7wKzd+UCABRaBaUd8bGjrvrgDAq+S9E kMul7oC1M73bw== To: bug-gnu-emacs@gnu.org Subject: 26.2; OSC 52 paste in term/xterm.el not working Date: Wed, 31 Jul 2019 18:57:32 +0200 Message-ID: <87lfwecfb7.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 193.105.134.189 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 31 Jul 2019 13:16:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) I'm trying to use the OSC 52 paste feature of term/xterm.el. There's a comment in term/xterm.el that says it has to be explicitly enabled. I did so by adding 'getSelection' to 'xterm-extra-capabilities'. I have tried this in xterm-347, and in my own terminal emulator. Now, when pasting, I see the OSC 52 escape sequence being sent to the terminal, and Emacs seems to get the reply, sort of. In xterm, nothing appears to happen, except that the modeline quickly flashes "Quit". Please note that xterm *is* sending the reply (verified by manually sending the OSC 52 request). There's also no timeout in Emacs so I'm confident it did read the reply. In my own terminal emulator, Emacs seems to be stuck in a keyboard input sequence; the modeline shows "C-y ESC \-". The most likely reason for the difference in observed behavior is that xterm terminates the OSC 52 reply with BEL (it echoes the terminator from the OSC 52 request, which in Emacs' case is BEL), while my terminal emulator terminates with an ST sequence, "\e\\". Other than the terminator, the byte sequence sent from my terminal emulator is exactly the same as sent by xterm. Note: this is on the stable 26.2 release. But the responsible function, term/xterm.el:gui-backend-get-selection, appears to be identical in latest master. Have I configured something wrong? Or is this a bug? Regards, Daniel In GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu) of 2019-05-25 built on svetlemodry System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set [2 times] Quit [2 times] Making completion list... [2 times] Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --without-x --without-sound --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS LIBSYSTEMD Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US.UTF-8 value of $LANG: sv_SE.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: show-paren-mode: t display-line-numbers-mode: t which-function-mode: t global-whitespace-mode: t global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t semantic-mode: t global-company-mode: t company-mode: t global-flycheck-mode: t flycheck-mode: t winner-mode: t cl-old-struct-compat-mode: t xterm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-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 Load-path shadows: /usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/26.2/lisp/md4 /usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/26.2/lisp/hex-util /usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/26.2/lisp/net/ntlm /usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/26.2/lisp/net/hmac-def /usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/26.2/lisp/net/sasl-digest /usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/26.2/lisp/net/sasl /usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/26.2/lisp/net/hmac-md5 /usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/26.2/lisp/net/sasl-ntlm /usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/26.2/lisp/net/sasl-cram Features: (shadow sort flyspell ispell mail-extr emacsbug add-log term/xterm xterm paren display-line-numbers which-func imenu elec-pair company-oddmuse company-keywords company-etags etags xref project company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb .emacs systemd url-parse url-vars conf-mode mu4e-alert time ht s alert notifications dbus xml mu4e desktop frameset mu4e-speedbar speedbar sb-image dframe mu4e-main mu4e-view cal-menu calendar cal-loaddefs thingatpt browse-url comint ansi-color gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido rfc2368 smtpmail auth-source sendmail mu4e-mark mu4e-message flow-fill mu4e-proc mu4e-utils doc-view jka-compr image-mode mu4e-lists mu4e-vars message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache gnus-util rmail tool-bar rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader hl-line fringe mu4e-meta whitespace midnight semantic/bovine/gcc semantic/dep semantic/db-mode semantic/db eieio-base semantic/idle semantic/format ezimage image semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio eieio-core cl-macs eieio-loaddefs mode-local cedet company pcase flycheck regexp-opt cl-extra json map find-func help-mode rx easymenu subr-x seq byte-opt gv bytecomp byte-compile cconv dash edmacro kmacro windmove winner ring cl-seq smart-mode-line-dark-theme smart-mode-line advice rich-minority cl-loaddefs cl-lib zenburn-theme epa derived epg epg-config xt-mouse disp-table mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded 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 threads dbusbind inotify multi-tty make-network-process emacs) Memory information: ((conses 16 260142 13833) (symbols 48 36419 1) (miscs 40 82 206) (strings 32 77860 5282) (string-bytes 1 2421895) (vectors 16 34057) (vector-slots 8 684478 5244) (floats 8 283 667) (intervals 56 386 104) (buffers 992 13)) -- Daniel From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 13:24:12 2019 Received: (at 36879) by debbugs.gnu.org; 31 Jul 2019 17:24:12 +0000 Received: from localhost ([127.0.0.1]:53035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hssKi-0005ph-7c for submit@debbugs.gnu.org; Wed, 31 Jul 2019 13:24:12 -0400 Received: from mail.ekloef.se ([193.105.134.189]:41192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hssKg-0005pZ-Pj for 36879@debbugs.gnu.org; Wed, 31 Jul 2019 13:24:11 -0400 Date: Wed, 31 Jul 2019 19:24:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564593847; bh=7xN4Tu3D+xKWCAzqygDe/i3s08h1o7hDd+9W75JiD5Q=; h=Date:Subject:To:From:From; b=jQ6j2etGGMvaWiouvw2Q/NTpPfNevpRv5f+g7LnX6jlpnAF/XS63wYg72HEKqJFHx 6IMOkdynh6+cPEG5bF9OTZnRgLBXxVwJGgzMKqvPWcCdmU1l/0J37ZosiWs19Vdslv ijtHb9GVNMpJ5/Syju9jmjiiPcdsCNpao59iynacpVOuCToWbz71/8hD7oKPwvUKjw iQvAUB1Rlzer9tMoI3RmN3+TumuuLel+7HWGJ6v8JLSzWf7tCo3a2KsrMFYLKZjQZj M+ld2S5vlmPAI5+nO7rjMJzbf+JmporDTiq3+ZKrBuBlnFzQTKGZ9jdESBcORjwdSL 6k93/l+8ptCVw== User-Agent: K-9 Mail for Android MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Autocrypt: addr=daniel@ekloef.se; keydata= mQINBFar7foBEAC2U2/ZVrYzWHivfkr4MJwyaU4oXTMZPJ74uH92OI5A9sg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wE7U1r 83MAEQEAAYkCHwQYAQgACQUCVqvt+gIbDAAKCRC3+nDQlTYJ3xLIEACnCb89hPNTtaNCCGvuDStp F0bn/Bhd1+5NrvdAtb4mdvt8IywfDCu65yNAI54dHqpoUzUxDdhXfSrCMWsXN1Wq6d51VqY/IgY3 17RlG4YM5FuG0oRJta2/CoeSfap3azhfbzQID/ttVnoFo9oQ77ELvrU/sdRnYw74WmCVLUctyvCe /lKvL7shmjo1FbPmfbjuZPkjLY6Nybz+RPFjsVc03ts/JcZkYtEoOEa408wk9oWDaEKdeDwUL4mg sg/aKIxgtDebecBhBKxUwI3jEJPoN5a6Qz4h8nrCae8zT2U/BwA76h9vGE2v2XIi3EAwCQIN140m +80NNRGUUU2mfU8H+PNXe2H7rkSkw7w5rIlXPo00jlHtUDsLb+CszIQ0yaZce09VOTr6xGRGW4sD sO6oeMHUO3FpJ7liwG1VcxpNtmgV5d39qxzEA2N7OFhTwtjwWJySqK2Mvdjdw8Gw6t0iOFNomI3T U8l/mSWKlw3ZK45p/V4LoHCnMn6V23fc+z3tltU2sAUJTv+6pHFMCYbdEh+jayGTWaq40i+MYzxe vwVTRxMgckPyeEHulZ9wvqscydShGVGGsCzQqK/ZOo+t8cYQUOI2virk9B/TS40qudy7xNpHkrsC sWK/GNPQvbUGhvjBs3fV4Nf6KYuHSFpMQbzRlbC+tuKBze/w0HvkhQ== Subject: To: 36879@debbugs.gnu.org From: =?ISO-8859-1?Q?Daniel_Ekl=F6f?= Message-ID: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,TVD_SPACE_RATIO autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: s/modeline/minibuffer Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ekloef.se] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.0 TVD_SPACE_RATIO No description available. X-Debbugs-Envelope-To: 36879 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) s/modeline/minibuffer From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 07:41:14 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 11:41:14 +0000 Received: from localhost ([127.0.0.1]:58382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsPS-0007rg-8F for submit@debbugs.gnu.org; Sat, 03 Aug 2019 07:41:14 -0400 Received: from mail200c50.megamailservers.eu ([91.136.10.210]:40106 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsPO-0007rO-Lc; Sat, 03 Aug 2019 07:41:12 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564832467; bh=RdGfUCYHZTzzdm7jP62eeVsKzg1yTwEgzyYOFA03u18=; h=Subject:From:To:Cc:Date:From; b=kxiR+3yu/GASVhxjKu+IuETRmGBEWMLwx7y+2GFSioCnfueC/FrDwRenXmK+d0Nhn fNOdyE7Z/lKojkUvi5rKN/5hEZ60FNxLr2h9i3WXV+jh1sgFFquLnYdF140F8MttPa xAkKCzd1ETKheYMKD61xnYxutGEXLz4ZZFTdF1EE= Feedback-ID: mattiase@acm.or Received: from dhcppc1 (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x73Bf4pt026103; Sat, 3 Aug 2019 11:41:05 +0000 Message-ID: Subject: Re: 26.2; OSC 52 paste in term/xterm.el not working From: Mattias =?ISO-8859-1?Q?Engdeg=E5rd?= To: Daniel =?ISO-8859-1?Q?Ekl=F6f?= Date: Sat, 03 Aug 2019 13:41:03 +0200 Content-Type: multipart/mixed; boundary="=-XZmm+3SXyx3fkhaaNTqv" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 X-CTCH-RefID: str=0001.0A0B0209.5D4572D3.0039, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Yv8hubQX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=wkyQ0Q5jOQTqGCvxqjwA:9 a=QEXdDO2ut3YA:10 a=N54-gffFAAAA:8 a=4jBuBnNKD2FfzIo8FL4A:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=B2y7HmGcmWMA:10 a=ph5w4yLSdFjXOi-gCIMA:9 a=6l0D2HzqY3Epnrm8mE3f:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=UDnyf2zBuKT2w-IlGP_r:22 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-XZmm+3SXyx3fkhaaNTqv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit tags 36879 patch quit Daniel Eklöf skrev: >Have I configured something wrong? Or is this a bug? I don't think you did anything wrong; I can reproduce the bug (in XTerm; I don't have your fancy emulator). The question is rather, how did this code ever work in the first place? As you observed, when XTerm sends the reply, it uses BEL as terminator. 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. 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. We could tell the tty not to discard the queue upon INTR by setting the NOFLSH flag, but (1) I don't know how portable that is, (2) it's not what we normally want when C-g is used interactively, and (3) it would still process the BEL out-of-order with respect to earlier chars. Attached is a rather heavy-handed patch which temporarily changes the quit-char to something unlikely while sending the OSC 52 request and reading the reply. It also allows the reply to be terminated by ESC \ (ST) as well. 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. However, I haven't been able to make this facility work with tmux at all, and with screen only by reverting 4183482f4d (bug#20356) AND explicitly setting TERM=screen (the default is screen.xterm-256color). In addition, changing quit-char can be visually annoying; it causes reinitialisation of the entire tty, something you don't want every time you press C-y. Perhaps it's fine to drop screen support from this particular function? I attached another, alternative patch that does that instead. --=-XZmm+3SXyx3fkhaaNTqv Content-Disposition: attachment; filename="heavy.patch" Content-Type: text/x-patch; name="heavy.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSB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yAgICAgICAgOzsgQy1nIG1heSBiZSBz ZW50IGZyb20gdGhlIHRlcm1pbmFsIGFzIGEgc3RyaW5nIHRlcm1pbmF0b3IsCisgICAgICAgIDs7 IGFuZCB0aGUgcmVzdWx0aW5nIFNJR0lOVCAod2hpY2ggb2NjdXJzIHdoZW4gdGhlIGludGVycnVw dAorICAgICAgICA7OyBjaGFyIGlzIHJlY2VpdmVkIGJ5IHRoZSB0dHksIG5vdCB3aGVuIHdlIHJl YWQgaXQpIHdvdWxkCisgICAgICAgIDs7IGZsdXNoIHVucmVhZCBjaGFycyBmcm9tIHRoZSB0dHkg aW5wdXQgcXVldWUuCisgICAgICAgICh1bndpbmQtcHJvdGVjdAorICAgICAgICAgICAgKHByb2du CisgICAgICAgICAgICAgIChzZXQtcXVpdC1jaGFyID9cMzc3KQorICAgICAgICAgICAgICAoeHRl cm0tLXF1ZXJ5CisgICAgICAgICAgICAgICAoY29uY2F0ICh3aGVuIHNjcmVlbiAiXGVQIikgcXVl cnkgIj9cYSIgKHdoZW4gc2NyZWVuICJcZVxcIikpCisgICAgICAgICAgICAgICAobGlzdCAoY29u cyBxdWVyeQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA7OyBSZWFkIGRhdGEgdXAgdG8gdGhlIHN0cmluZyB0ZXJtaW5h dG9yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBlaXRoZXIgU1QgKEVTQyBcKSBv ciBCRUwuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsZXQgKGNoYXIgbGFzdCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAod2hpbGUgKGFuZCAoc2V0cSBjaGFyIChyZWFk LWNoYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBuaWwgbmlsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgeHRlcm0tcXVlcnktdGltZW91dCkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKG5vdCAob3IgKGVxIGNoYXIgP1xhKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgKGVxIGNoYXIgP1xc KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGVxIGxhc3QgP1xlKSkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh3 aGVuIGxhc3QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGluc2VydCBsYXN0 KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGxhc3QgY2hhcikpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHdoZW4gKGVxIGNoYXIgP1xhKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGluc2VydCBsYXN0KSkpKSkpCisgICAgICAgICAg ICAgICAnbm8tYXN5bmMpKQorICAgICAgICAoc2V0LXF1aXQtY2hhciBvbGQtcXVpdC1jaGFyKSkp CiAgICAgICAoYmFzZTY0LWRlY29kZS1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50LW1heCkpCiAg ICAgICAoZGVjb2RlLWNvZGluZy1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50LW1heCkgJ3V0Zi04 LXVuaXggdCkpKSkKIAotLSAKMi4yMS4wCgo= --=-XZmm+3SXyx3fkhaaNTqv Content-Disposition: attachment; filename="light.patch" Content-Type: text/x-patch; name="light.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBkYTEyMmRhNTI3M2E1N2IyNWVkZmUzZTg4ODVlYTIyNTBiODhiZjVkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/TWF0dGlhcz0yM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XJ5Ci0gICAgICAgKGNvbmNhdCAod2hlbiBzY3JlZW4gIlxlUCIpIHF1ZXJ5ICI/ XGEiICh3aGVuIHNjcmVlbiAiXGVcXCIpKQotICAgICAgIChsaXN0IChjb25zIHF1ZXJ5IChsYW1i ZGEgKCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICh3aGlsZSAobGV0ICgoY2hhciAocmVh ZC1jaGFyKSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5sZXNzIChl cSBjaGFyID9cYSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGluc2Vy dCBjaGFyKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0KSkpKSkpCisg ICAgICAgOzsgVXNlIFNUIGFzIHF1ZXJ5IHRlcm1pbmF0b3IgdG8gZ2V0IFNUIGFzIHJlcGx5IHRl cm1pbmF0b3IgKGJ1ZyMzNjg3OSkuCisgICAgICAgKGNvbmNhdCBxdWVyeSAiP1xlXFwiKQorICAg ICAgIChsaXN0IChjb25zIHF1ZXJ5CisgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoKQorICAg ICAgICAgICAgICAgICAgICAgOzsgUmVhZCBkYXRhIHVwIHRvIHRoZSBzdHJpbmcgdGVybWluYXRv ciwgU1QuCisgICAgICAgICAgICAgICAgICAgICAobGV0IChjaGFyIGxhc3QpCisgICAgICAgICAg ICAgICAgICAgICAgICh3aGlsZSAoYW5kIChzZXRxIGNoYXIgKHJlYWQtY2hhcgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaWwgbmlsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHh0ZXJtLXF1ZXJ5LXRpbWVvdXQp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobm90IChhbmQgKGVxIGNoYXIg P1xcKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIGxh c3QgP1xlKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVuIGxhc3QKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgIChpbnNlcnQgbGFzdCkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgKHNldHEgbGFzdCBjaGFyKSkpKSkpCiAgICAgICAgJ25vLWFzeW5jKQogICAgICAgKGJhc2U2 NC1kZWNvZGUtcmVnaW9uIChwb2ludC1taW4pIChwb2ludC1tYXgpKQogICAgICAgKGRlY29kZS1j b2RpbmctcmVnaW9uIChwb2ludC1taW4pIChwb2ludC1tYXgpICd1dGYtOC11bml4IHQpKSkpCi0t IAoyLjIxLjAKCg== --=-XZmm+3SXyx3fkhaaNTqv-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 07:52:33 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 11:52:33 +0000 Received: from localhost ([127.0.0.1]:58393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsaO-0001qC-Sw for submit@debbugs.gnu.org; Sat, 03 Aug 2019 07:52:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsaM-0001pv-KA for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 07:52:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1htsaF-0005iW-Lo; Sat, 03 Aug 2019 07:52:23 -0400 Received: from [176.228.60.248] (port=2840 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1htsaE-0000OD-UJ; Sat, 03 Aug 2019 07:52:23 -0400 Date: Sat, 03 Aug 2019 14:52:13 +0300 Message-Id: <83d0hmeaaa.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 03 Aug 2019 13:41:03 +0200) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working References: <87lfwecfb7.fsf@mini.la.casa> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 03 Aug 2019 13:41:03 +0200 > Cc: Philipp Stephani , > Stefan Monnier , 36879@debbugs.gnu.org > > The question is rather, how did this code ever work in the first > place? As you observed, when XTerm sends the reply, it uses BEL as > terminator. 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. You are saying that TTY frames cannot handle inhibit-quit correctly? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 08:02:12 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 12:02:12 +0000 Received: from localhost ([127.0.0.1]:58403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsjj-00026W-W1 for submit@debbugs.gnu.org; Sat, 03 Aug 2019 08:02:12 -0400 Received: from mail202c50.megamailservers.eu ([91.136.10.212]:46152 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsjg-00026M-LD for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 08:02:11 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564833727; bh=e2M3K7lgnXhXwKaTAmXuxRm+3lZZ8BQJYZCSOsEEHuU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=rfbKW1OJ+1DNnjvfCQkteeOt9hUycsd6L9hk/Fnt4BEeNUV3Za2trcMfSTvUIa6Q7 HcrcUJXRd06G9gseuUiwLtZU4RDCoM2KL1X3pgZTBNZa8XOrICRlXJQzkT3lVvIW8R dQCveR55FkinXtBj6WYAqkP9JW8Hf+VWdodx5kkM= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x73C23Kp004976; Sat, 3 Aug 2019 12:02:04 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83d0hmeaaa.fsf@gnu.org> Date: Sat, 3 Aug 2019 14:02:02 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0204.5D4577BE.0035, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Yv8hubQX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=iKADNYS5VLkrxImcSl4A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 aug. 2019 kl. 13.52 skrev Eli Zaretskii : >=20 > You are saying that TTY frames cannot handle inhibit-quit correctly? Right; it works if the input is from a slowly typing user, but a burst = that includes BEL is likely to be read incorrectly. A more modern approach would be to not have C-g as interrupting char in = the TTY at all, but that's a bit more work. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 08:09:09 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 12:09:09 +0000 Received: from localhost ([127.0.0.1]:58407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsqS-0002HU-RF for submit@debbugs.gnu.org; Sat, 03 Aug 2019 08:09:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htsqR-0002HH-0c for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 08:09:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1htsqL-0006OJ-49; Sat, 03 Aug 2019 08:09:01 -0400 Received: from [176.228.60.248] (port=3860 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1htsqI-00039Q-Ge; Sat, 03 Aug 2019 08:08:59 -0400 Date: Sat, 03 Aug 2019 15:08:49 +0300 Message-Id: <83blx6e9im.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 3 Aug 2019 14:02:02 +0200) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 3 Aug 2019 14:02:02 +0200 > Cc: daniel@ekloef.se, phst@google.com, monnier@iro.umontreal.ca, > 36879@debbugs.gnu.org > > 3 aug. 2019 kl. 13.52 skrev Eli Zaretskii : > > > > You are saying that TTY frames cannot handle inhibit-quit correctly? > > Right; it works if the input is from a slowly typing user, but a burst that includes BEL is likely to be read incorrectly. Where is the code that discards input if it arrives quickly and includes C-g? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 08:26:42 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 12:26:42 +0000 Received: from localhost ([127.0.0.1]:58434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htt7S-0002jE-0F for submit@debbugs.gnu.org; Sat, 03 Aug 2019 08:26:42 -0400 Received: from mail1427c50.megamailservers.eu ([91.136.14.27]:54774 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htt7P-0002iz-HU for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 08:26:40 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564835193; bh=x2Fj06muCBSx0poWRUy/+SnDxH/3b8PEjXrNGQFgA/Y=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=QDRYmeJn/5GDUmbDU1PsAmwI4DtiIM+hUbsGkHnoL6QUB33gd7oyppKUDAPK0ffky aoEJ0DJTi17X2zeuhrYrlJ1OuTAgMh32HwMHoLWe0ujSqG9zcW7FjGktymfuyUh0Ki mCck7w+LbaSccU5LuO5mFmU39U+p+Sz2k1uzcRws= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x73CQTSc002728; Sat, 3 Aug 2019 12:26:31 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83blx6e9im.fsf@gnu.org> Date: Sat, 3 Aug 2019 14:26:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> <83blx6e9im.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020D.5D457D79.0004, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Mqx8FVSe c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=z3anjXfOHm-ckZ5bqywA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 aug. 2019 kl. 14.08 skrev Eli Zaretskii : >=20 > Where is the code that discards input if it arrives quickly and > includes C-g? In the kernel. When it receives the INTR char, it flushes any unread = chars, unless NOFLSH is set. You can try it out in your shell: $ sleep 10 abc^C $ ("abc" was discarded) $ stty noflsh $ sleep 10 xyz^C $ xyz ("xyz" was read by the shell) However, NOFLSH doesn't help us in Emacs. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 09:36:39 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 13:36:39 +0000 Received: from localhost ([127.0.0.1]:58571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuD9-0004cZ-03 for submit@debbugs.gnu.org; Sat, 03 Aug 2019 09:36:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuD7-0004cN-4r for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 09:36:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1htuD1-0005H6-5r; Sat, 03 Aug 2019 09:36:31 -0400 Received: from [176.228.60.248] (port=1289 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1htuD0-0005VV-Jw; Sat, 03 Aug 2019 09:36:31 -0400 Date: Sat, 03 Aug 2019 16:36:19 +0300 Message-Id: <838ssae5gs.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 3 Aug 2019 14:26:29 +0200) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> <83blx6e9im.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 3 Aug 2019 14:26:29 +0200 > Cc: daniel@ekloef.se, phst@google.com, monnier@iro.umontreal.ca, > 36879@debbugs.gnu.org > > However, NOFLSH doesn't help us in Emacs. Why not? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 09:40:12 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 13:40:12 +0000 Received: from localhost ([127.0.0.1]:58575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuGa-0004i0-K9 for submit@debbugs.gnu.org; Sat, 03 Aug 2019 09:40:12 -0400 Received: from mail.ekloef.se ([193.105.134.189]:42374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuGY-0004hm-Dv for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 09:40:11 -0400 References: DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564839606; bh=g0jQMjX7vQPNO1MEicxEMnX7OkcPHdXQVpxruo/EfTk=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=PjdOvNPTGi6l2YQ2jAjgaD6I/h5NyPteSlo+d/aQ60fJsd5/9HPu6r8TDXI748CEt bfdSTgkZwxGrf0gQsHNHoYexfN9lG8mSf1fROEYv+8EqtYHhj32+fmRg4pynYigdz+ M/yryiCwnfnbruqcdaQZ0xQ6PfSxef5gmmt+gBk0BZbY79jjQQQskXX3NKAdIX4giW 0RkFTWpjbtfbz1zPv/9xtr9AUeixDeOsGbFYPEF4XE4E9ei+eVgG/SEYbEwZLqVB01 E6nUdbSTOie8qpqudNuCpy5UftW5FPJB1POSVnE7NbSqcJySepcN8bPloDiyQ88gg3 3UEerYUjkc7xw== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: Date: Sat, 03 Aug 2019 15:40:06 +0200 Message-ID: <87o9169xl5.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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=C3=B6rresten, hej Mattias! Det var lite ov=C3=A4ntat...) -- Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 09:50:02 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 13:50:02 +0000 Received: from localhost ([127.0.0.1]:58579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuQ5-0004wG-KJ for submit@debbugs.gnu.org; Sat, 03 Aug 2019 09:50:01 -0400 Received: from mail.ekloef.se ([193.105.134.189]:42392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htuQ4-0004w2-2Z for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 09:50:00 -0400 References: DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564840197; bh=1p1ZmDVameCAeP4F/GPart5ZPZAkUj/H+Yi1bQpApnI=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=iUHwkGKYfODjj7CFg4swQL18LcwXhs2wc2/C3G0tEIRagMmJJ2idhFEHgGkzvvqbi 2ePnlGxfl4N3+TjuhdyrFc7ACnuJBR0MMUuJ1S6spJIgxZ/hTetuc9XOY54Vzkudyt A20pcl0RFHBcQ90JgIxsJLN7ZNQw/2IUvrevjLQde2zgi8SXXtmBWOXBwl7Dw3woCf jzdHUQGFXW7Qe7ib4zEuAoChJ68gMtjXmuXo9Un1EA1uVUqT1JFxZ/CF3ti7MJDPpk VETs03MtShEODM5AUgIkA3ql2E0WTNdXj06hiWluJCHGNlWyded/G6G8yUizVmFWFv n59gssuTVbekQ== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: Date: Sat, 03 Aug 2019 15:49:56 +0200 Message-ID: <87mugq9x4r.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Perhaps it's fine to drop screen support from this > particular function? I attached another, alternative patch that > does > that instead. My use case is bare metal terminal, no screen. I.e. I'm fine with this. (And yes, I realize this question wasn't primarily for me.) -- Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 10:32:20 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 14:32:20 +0000 Received: from localhost ([127.0.0.1]:59728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htv51-0001uv-RH for submit@debbugs.gnu.org; Sat, 03 Aug 2019 10:32:20 -0400 Received: from mail200c50.megamailservers.eu ([91.136.10.210]:59888 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htv4z-0001rq-2K for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 10:32:18 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564842735; bh=SH4ksuwPtf9QyIvbTB82l7PLRQa3gOHgqfkcRvrFVE8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=B3Yi0u+B04LupG/QUON3jdAESSj3meAXbkEy+QXFp+VExK+qEcHHek+bUQzNn3kfy GP0hHhJdZJn3StssWSkXk31B5bsfmXWN5+IW5j9hXa5I3OdOEZZA5v2JpkPzOp24Lf o8LfZzhm/pKIDRDYuhOzp0ak8HJSwPn3+FRXRcPI= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x73EW9Zh022682; Sat, 3 Aug 2019 14:32:11 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <838ssae5gs.fsf@gnu.org> Date: Sat, 3 Aug 2019 16:32:09 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> <83blx6e9im.fsf@gnu.org> <838ssae5gs.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0214.5D459AEF.001D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Yv8hubQX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=U6A_m_99syqBv3IpuBoA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 aug. 2019 kl. 15.36 skrev Eli Zaretskii : >=20 >> However, NOFLSH doesn't help us in Emacs. >=20 > Why not? Because we still wouldn't know where in the input stream the BEL should = be placed. By the time we have read the chars preceding it, more could = have arrived. Besides, flushing is usually what we want (mash the = keyboard, nothing happens, press C-g). If we want to receive a character reliably and in order, we cannot set = it up as an interrupt char in the TTY. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 13:00:08 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 17:00:09 +0000 Received: from localhost ([127.0.0.1]:59831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htxO4-0003qg-0U for submit@debbugs.gnu.org; Sat, 03 Aug 2019 13:00:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htxO1-0003mw-Ku for 36879@debbugs.gnu.org; Sat, 03 Aug 2019 13:00:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1htxNv-0007qr-I7; Sat, 03 Aug 2019 12:59:59 -0400 Received: from [176.228.60.248] (port=1853 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1htxNv-0004TI-1V; Sat, 03 Aug 2019 12:59:59 -0400 Date: Sat, 03 Aug 2019 19:59:45 +0300 Message-Id: <837e7udw1q.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 3 Aug 2019 16:32:09 +0200) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> <83blx6e9im.fsf@gnu.org> <838ssae5gs.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36879 Cc: phst@google.com, daniel@ekloef.se, monnier@iro.umontreal.ca, 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Sat, 3 Aug 2019 16:32:09 +0200 > Cc: daniel@ekloef.se, phst@google.com, monnier@iro.umontreal.ca, > 36879@debbugs.gnu.org > > 3 aug. 2019 kl. 15.36 skrev Eli Zaretskii : > > > >> However, NOFLSH doesn't help us in Emacs. > > > > Why not? > > Because we still wouldn't know where in the input stream the BEL should be placed. By the time we have read the chars preceding it, more could have arrived. Besides, flushing is usually what we want (mash the keyboard, nothing happens, press C-g). Then what is NOFLSH good for? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 17:00:46 2019 Received: (at 36879) by debbugs.gnu.org; 3 Aug 2019 21:00:46 +0000 Received: from localhost ([127.0.0.1]:60099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu18v-00062h-1e for submit@debbugs.gnu.org; Sat, 03 Aug 2019 17:00:45 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu18s-0005uZ-Pi; Sat, 03 Aug 2019 17:00:43 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0E3DE445CCE; Sat, 3 Aug 2019 17:00:37 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D2C78445CCA; Sat, 3 Aug 2019 17:00:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1564866031; bh=JTaoDu/DUi993gwwJLAbuY947lEGHfhcqSbrP0waSI4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GAc1s8AqLpjDaFH0wqlkaLNlnem8tm8ii+Ddr6/EyHKIcjKumUlKPtbLQpJ0jV58u XVl5cb9d02lUDXVuwfxW9LI8gYEV5Zd7w94376hixhWE29hxfMQKSc6A55+K07Ewnv hu+FiANFZB0bqW/Dj+uUWVetggfL4coUl+kZTOwW3Y6CFJtWYt8GF77C9gCKU1tJXR 4VdC2ly6r0a5Glie1Mr675lV93xTEZ6eLbZ9Dd5ULIAKCawR6ODZ0YcMB/N+F71ZZR 6nSZzfq7Edo/IjOEN8s/hD91mGnBvKb8Zs+Hv3PmGQ6qVB25nT2L1zdolaeyVYeax4 lPwY4YGPz/BsA== Received: from alfajor (unknown [78.192.50.77]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 07E3D120846; Sat, 3 Aug 2019 17:00:30 -0400 (EDT) From: Stefan Monnier To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working Message-ID: References: <87lfwecfb7.fsf@mini.la.casa> Date: Sat, 03 Aug 2019 17:00:22 -0400 In-Reply-To: ("Mattias \=\?windows-1252\?Q\?Engdeg\=E5rd\=22's\?\= message of "Sat, 03 Aug 2019 13:41:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Daniel =?windows-1252?Q?Ekl=F6f?= , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > The question is rather, how did this code ever work in the first > place? Here's what I remember from it: - I did test the code with the xterm that comes with Debian. I definitely remember making it work it in one direction (paste or yank, can't remember), not sure if I did get it to work in both directions at the time. - The feature is fundamentally dodgy from a security perspective. - This is the first case I hear of someone actually using that feature (or trying to) since it was added to Emacs. So I'm not sure it's worth the trouble supporting this, really: In many/most cases `xclip-mode` can be used instead, and is much more straightforward. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 04:19:14 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 08:19:14 +0000 Received: from localhost ([127.0.0.1]:60397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huBjW-0003Go-I4 for submit@debbugs.gnu.org; Sun, 04 Aug 2019 04:19:14 -0400 Received: from mail.ekloef.se ([193.105.134.189]:42680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huBjU-0003Gf-Ne for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 04:19:13 -0400 References: <87lfwecfb7.fsf@mini.la.casa> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564906747; bh=LpMyj0UOW7YVzR0fy6+QOt7eMbbbfcGxBTXGOsWSH2k=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=SigWEu+zp+L9VGHESCkf1vmxDwF6qlbqRMubRhaDZ2EE1VHhaES12JW4pBIEWfMzV bu6WdDQ9I2uSHwMPNPLYBoYq94k9jEQdF77XmzB14da/Kx8YARMsXtPQd6DLvky2rS 2bM+9M+KKX8MF9NA+BeIHruU4y+pRCqlMIPNYKi2gnwGNb8PTxi79XE4c8RGxC6EI9 tPL7FHPUxNQrPUJclYG62VYdT/pQtlp+5iux/RFWMDLFcOkteRpveY17BCzGJhxTc4 E7FSkdNtPPxzdZugTa6VY5IhIfYDV4R8XlsOTGlwgfk0Gat/g13E/THlQuuY+JSbs9 VOBH3tfRknqqw== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Stefan Monnier Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: Date: Sun, 04 Aug 2019 10:19:07 +0200 Message-ID: <877e7tqr5w.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > - I did test the code with the xterm that comes with Debian. > I definitely remember making it work it in one direction > (paste or > yank, can't remember), not sure if I did get it to work in > both > directions at the time. set-selection has always worked, at least for me. That one is also enabled by default in xterm.el (when an xterm supporting it is detected, I assume). > - The feature is fundamentally dodgy from a security > perspective. I'm probably missing something obvious, but how is talking to xclip more secure than talking to the terminal emulator? Or is the "security perspective" somewhere else? > So I'm not sure it's worth the trouble supporting this, really: > In many/most cases `xclip-mode` can be used instead, and is much > more straightforward. Except that xclip assumes x11. Would it not make sense to support a window protocol agnostic method? By supporting OSC 52, you support whatever clipboard mechanism the terminal emulator supports. Perhaps one could use the heavy weight solution (change quit char) when 'screen' is detected, but simply use ST in the non-screen case? (before I tried this, OSC 52, I was using https://github.com/bugaevc/wl-clipboard with my own Emacs "bindings" - yes, I'm on Wayland) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 05:44:38 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 09:44:38 +0000 Received: from localhost ([127.0.0.1]:60439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD49-0005Gp-UJ for submit@debbugs.gnu.org; Sun, 04 Aug 2019 05:44:38 -0400 Received: from mail156c50.megamailservers.eu ([91.136.10.166]:56154 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD48-0005Gg-0H for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 05:44:37 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564911874; bh=Cp7Pa8ap+aj5g6rQX0Do+eEUxjwpXgok2XHPExcxtr4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Gvc3QcKciLtDlkjX2KsMNOOTxv4vCOxLeOEEcF02wBjtz8JgF80ZX+Uqe+edBIvbY MGX0MtoV7AYuQc1O8hvx/cl0X93Ayc8W1ym3Y7mqJJSErRsxLLMtgHID9ogX3tmIwV nL4zhwdJb7dGhl4l8yMHTDBTDTe3hphq/clDGvnM= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x749iSeq025389; Sun, 4 Aug 2019 09:44:30 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <877e7tqr5w.fsf@mini.la.casa> Date: Sun, 4 Aug 2019 11:44:27 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> To: =?utf-8?Q?Daniel_Ekl=C3=B6f?= X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5D46A902.0007, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=U6m889ju c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=vP13R4J2DFLuIfofEuIA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=QEXdDO2ut3YA:10 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 4 aug. 2019 kl. 10.19 skrev Daniel Ekl=C3=B6f : >=20 > set-selection has always worked, at least for me. That one is also = enabled by default in xterm.el (when an xterm supporting it is detected, = I assume). Right, it lacks the technical problems of the copy-from-clipboard = direction, since no reply from the terminal is involved. > I'm probably missing something obvious, but how is talking to xclip = more secure than talking to the terminal emulator? Or is the "security = perspective" somewhere else? It's not a problem in Emacs, but by enabling OSC 52 in your terminal, an = adversary might arrange for a crafted string to be sent to it which = would surreptitiously inject malicious data into the clipboard, or = extract secrets from it. The OSC 52 reply itself could cause damage = under some circumstances, or the attacker could just hope for the victim = to paste a command into a shell prompt. > Except that xclip assumes x11. Would it not make sense to support a = window protocol agnostic method? By supporting OSC 52, you support = whatever clipboard mechanism the terminal emulator supports. I can definitely see how OSC 52 can be useful when there is only a = terminal connection to the machine running Emacs, and no out-of-band = conduit for the clipboard. The user needs to enable it actively both in = the terminal and in Emacs; it cannot be used by accident. > Perhaps one could use the heavy weight solution (change quit char) = when 'screen' is detected, but simply use ST in the non-screen case? The thought did cross my mind, but I thought I'd first enquire about the = screen usage, given that I only got it to work with screen, not tmux, = and then only after explicitly setting TERM. Perhaps Philipp Stephani who originally wrote the code could help us = here (sorry about dragging you into the discussion, Philipp). Under what = circumstances did you run it? (It was 4 years ago; it's understandable = if you don't remember much of it.) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 05:49:45 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 09:49:46 +0000 Received: from localhost ([127.0.0.1]:60444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD97-0005OS-MY for submit@debbugs.gnu.org; Sun, 04 Aug 2019 05:49:45 -0400 Received: from mail214c50.megamailservers.eu ([91.136.10.224]:33560 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huD95-0005OJ-JI for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 05:49:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1564912181; bh=suLdxPFzhj8mAhXQXn5pIMseilTZDoh/4s2pkhf0ln4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=TnrIYon34ZbpukI/yUA93z3cXE5oxOBzHGxrL9lRm/5+/04IXJLZESLt8ttXTaGRu EbML2kQ49y2JSMnX1E2+avqqlg8UTR0vy4h+oIwaHsdL8TxQyBxmPMjyBsUJIMx7PG RoiZNiRobBJhUlXWpwrzVd72vF7Jxp+isvRBzMYA= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x749nc0b001300; Sun, 4 Aug 2019 09:49:40 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <837e7udw1q.fsf@gnu.org> Date: Sun, 4 Aug 2019 11:49:38 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9BBEFE1E-5231-4C55-B869-86FDBDEE16C6@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <83d0hmeaaa.fsf@gnu.org> <171762D7-4D84-43A8-8E3C-2EDB66A643BE@acm.org> <83blx6e9im.fsf@gnu.org> <838ssae5gs.fsf@gnu.org> <837e7udw1q.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5D46AA35.0019, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Yv8hubQX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=oZiJO2jhGu6zzdLmIMgA:9 a=CjuIK1q_8ugA:10 a=ncZ9vwaUYPMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: =?utf-8?Q?Daniel_Ekl=C3=B6f?= , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 aug. 2019 kl. 18.59 skrev Eli Zaretskii : > Then what is NOFLSH good for? Your guess is as good as mine. After all, this is the Unix TTY layer we = are talking about. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 06:32:53 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 10:32:53 +0000 Received: from localhost ([127.0.0.1]:60484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huDor-0006Wx-EY for submit@debbugs.gnu.org; Sun, 04 Aug 2019 06:32:53 -0400 Received: from mail.ekloef.se ([193.105.134.189]:42776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huDop-0006Wb-D5 for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 06:32:51 -0400 References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564914767; bh=w+snkgaXVyprPFNgY9lXnoMnRA0/9XjVmhzRcP9B7Q0=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=fSTJTFim9RShyexjWbjU08+gqfgnuxx3Mphf+AFrzQ7PtZSCVV2WwKQ6ZodPIs0VK OYoFdvvgGF4u1sJq5FkQInuEaI5k/KLtJJDZdBqmlfY/Gicpf7R/bqDlRmb3Ak2zwp BrBUlapYT0ug1vHmsLjzvAzBnH96USXMD/P9HbUBSRwvnrbQqGPbxndjwJ1iJjUcum TKg8+u8H/SdeVXwtQu4fSxp+ER52/ZEBTO/RHMC2vK+agbuWoc0rUY/NaYmjzf8DCU GBk8Ku5QHMjLVJ5cs0Ef1xxNIhG8YQWTtNUflaaOzUJNYhkw/LvaXfEzTqHI1JcvTr TQhMS6FTfki+g== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> Date: Sun, 04 Aug 2019 12:32:47 +0200 Message-ID: <875zndqkz4.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > It's not a problem in Emacs, but by enabling OSC 52 in your > terminal, an adversary might arrange for a crafted string to be > sent to it which would surreptitiously inject malicious data > into the clipboard, or extract secrets from it. The OSC 52 reply > itself could cause damage under some circumstances, or the > attacker could just hope for the victim to paste a command into > a shell prompt. Right. I interpreted Stefan's statement as concerning Emacs, not OSC 52 itself. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 09:06:29 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 13:06:29 +0000 Received: from localhost ([127.0.0.1]:60761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGDV-0008O8-I6 for submit@debbugs.gnu.org; Sun, 04 Aug 2019 09:06:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGDS-0008NY-RP for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 09:06:27 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2624F102D99; Sun, 4 Aug 2019 08:46:24 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id ABC9E102D83; Sun, 4 Aug 2019 08:46:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1564922782; bh=UUVwWuO7eD+O88PA27hJaovzbuM60MQBO5zYSRdxh0s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BVW17ltgv5tVUmeXGmbfIsSwC1m6vygkQZMsrVQ2RLh7SnqzEAl/UUEGoaL1jbVUa 0KLq7PJ2fjnCbbaL43rJ9wmDOcNL0GAAc+fdQNRe8KghaOuzGj7bgMSFGkqZonXr0d /XjZUSOkyJfcZU9hV7sMW9zpqw2IPD9b9BRgXJSuxGBXQ5ZGv8Lp9VeM6VCjeBznkB xOtZKUORavlV+1WZeywdv6uO6Q5X6/i97SlLE5iB1Slt3aHShVDNiPbgkODw75I8sq y/Z12hlCOZO1tXr78WvGNqBQ9yg8Xk85IbgMFlMLxvInjf/Eg7akp2+2ifFz1ytv14 JihkgiWd3aJTA== Received: from alfajor (unknown [78.192.50.77]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 056DA120C58; Sun, 4 Aug 2019 08:46:21 -0400 (EDT) From: Stefan Monnier To: Daniel =?windows-1252?Q?Ekl=F6f?= Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working Message-ID: References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> Date: Sun, 04 Aug 2019 08:46:20 -0400 In-Reply-To: <877e7tqr5w.fsf@mini.la.casa> ("Daniel \=\?windows-1252\?Q\?Ekl\?\= \=\?windows-1252\?Q\?\=F6f\=22's\?\= message of "Sun, 04 Aug 2019 10:19:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Mattias =?windows-1252?Q?Engdeg=E5rd?= , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> - The feature is fundamentally dodgy from a security perspective. > I'm probably missing something obvious, but how is talking to xclip more > secure than talking to the terminal emulator? Or is the "security > perspective" somewhere else? I remember various attack vectors. They're not necessarily trivial to exploit, but it's still problematic (which is likely why it's disabled by default in Debian's build). >> So I'm not sure it's worth the trouble supporting this, really: >> In many/most cases `xclip-mode` can be used instead, and is much >> more straightforward. > Except that xclip assumes x11. I'm talking about xclip-mode, not xclip. > (before I tried this, OSC 52, I was using > https://github.com/bugaevc/wl-clipboard with my own Emacs "bindings" - yes, > I'm on Wayland) xclip-mode also has code to support wl-clipboard (I never tested it, tho). > Would it not make sense to support a window protocol agnostic method? > By supporting OSC 52, you support whatever clipboard mechanism the > terminal emulator supports. It has its advantages, of course. But also its downsides. The overlap with xclip-mode is fairly large, tho. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 09:06:31 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 13:06:31 +0000 Received: from localhost ([127.0.0.1]:60763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGDW-0008OF-R6 for submit@debbugs.gnu.org; Sun, 04 Aug 2019 09:06:31 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huGDU-0008Nj-Sw for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 09:06:29 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1EC0081172; Sun, 4 Aug 2019 08:47:37 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DB48A80D7D; Sun, 4 Aug 2019 08:47:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1564922855; bh=pcfb3rVHDKYAMb/U9AOXTq1r6OUEYc90j0eVW6KxLuo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SmVDmVyrMf/9lMHxJRbbN+3G4XPaUvlPPom/wFdOgmh3ZZ6tzsIol+hTi1HdsMauf eXvvZj2ig/XeM/7ZB55Oo39mSdZTGJXKStpx2MXJjji+h0dfP7fswInqb9pJ6ZvS7u Iy4kqtlHKzuR3j4gX0TIE0LnSsXYBGaqztJyzMDkYQ0TFHaT6pNoqqTFSogmZJlT49 VMNKqiEjLs/Wsg7y52bVcQmEfrFhDuFlqbooZOTJZop7n9FA7gTdE8H2JUNlQU6rbd MwBXHcngkffbmDgWr0oLuZGlR5grHWploJHJvub+taPS+3TEkia91lwD1PJ0Z3Bc0E xzuVJhxPL5hLQ== Received: from alfajor (unknown [78.192.50.77]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 26D7E1200CE; Sun, 4 Aug 2019 08:47:35 -0400 (EDT) From: Stefan Monnier To: Daniel =?windows-1252?Q?Ekl=F6f?= Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working Message-ID: References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> <875zndqkz4.fsf@mini.la.casa> Date: Sun, 04 Aug 2019 08:47:33 -0400 In-Reply-To: <875zndqkz4.fsf@mini.la.casa> ("Daniel \=\?windows-1252\?Q\?Ekl\?\= \=\?windows-1252\?Q\?\=F6f\=22's\?\= message of "Sun, 04 Aug 2019 12:32:47 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Mattias =?windows-1252?Q?Engdeg=E5rd?= , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Right. I interpreted Stefan's statement as concerning Emacs, not OSC > 52 itself. No, the security issues have to do with OSC-52 itself, IIRC. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 11:59:59 2019 Received: (at 36879) by debbugs.gnu.org; 4 Aug 2019 15:59:59 +0000 Received: from localhost ([127.0.0.1]:34162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huIvO-0006nY-Sl for submit@debbugs.gnu.org; Sun, 04 Aug 2019 11:59:59 -0400 Received: from mail.ekloef.se ([193.105.134.189]:42868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huIvM-0006nP-Kf for 36879@debbugs.gnu.org; Sun, 04 Aug 2019 11:59:57 -0400 References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1564934392; bh=Pr+Li3T/mLfjtKop3uKHo/DpsiHRIPgPoZLyDtcr3n4=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=SbmF80HZHfK4L+Fu0uTuPMwwUF+Hgv/gVcQEY+coyzGRc0yIkLgtabNlinq5j49QY RksNLeLW4CnNC6iwr12uSkOlxBvrPxjjyhWEM8gJYqiU/olsmUXOddDRd2yTxQ/N0r M/bp9XAYkS6LAKPWpHppZJh4LZfKj1yuMmviUFZTxEr4BlTw27yHHw8siBgHFiNGdx TUKHc46FqDIe2cBRWtF7E5nSZgpJqVBVBCivVNL89RLErHu81R7ufJcjUl9XmED0SU VDFkONAM6Jv60tltskXBy93WLw7jdHs5TZuFt/upYjgGzrDCt5n+Nclw5Z3IpJ8Jod OsjoM+hXKF60g== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Stefan Monnier Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: Date: Sun, 04 Aug 2019 17:59:52 +0200 Message-ID: <874l2wrkef.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I'm talking about xclip-mode, not xclip. > xclip-mode also has code to support wl-clipboard (I never tested > it, tho). I know you where, and I see it does, now. It didn't when I looked at it before. Thanks for the update, and thanks for adding support for it. Anyway, I think it's beyond clear _what_ the problem is. As to how, if at all, to fix it is not for me to say so I wont try. I'll be using some version of the patch(es) provided here and move on. Everybody, thanks for the help. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 07:41:36 2019 Received: (at 36879) by debbugs.gnu.org; 5 Aug 2019 11:41:36 +0000 Received: from localhost ([127.0.0.1]:34754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hubMu-00010N-1C for submit@debbugs.gnu.org; Mon, 05 Aug 2019 07:41:36 -0400 Received: from mail200c50.megamailservers.eu ([91.136.10.210]:35914 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hubMr-000102-H6 for 36879@debbugs.gnu.org; Mon, 05 Aug 2019 07:41:34 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1565005291; bh=SWQHSRNzdwF5pXBVWPpperi9oOslQ8qsa/Lm0l7uNdg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=N+qvtLBrj1YZJtmCsuX3AGrzdFE4QlNiNQ0tN4tjQH8kHjuaYPJhRjI46UmOKSTdy 6e5gVGsiixuSJ8+QfE9G1JwmY4aVTJypDeu+5CcAMFwqM0zH5KDbOVhnoJH3AEIKwf s/Akt7k6ekXMASO3Lbeyc0ot7duzDhULTwpgSDcI= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x75BfSD0023701; Mon, 5 Aug 2019 11:41:30 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <874l2wrkef.fsf@mini.la.casa> Date: Mon, 5 Aug 2019 13:41:28 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <78412F16-8E8D-4495-AF96-C55F81DB721E@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <874l2wrkef.fsf@mini.la.casa> To: =?utf-8?Q?Daniel_Ekl=C3=B6f?= X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0208.5D4815EB.0036, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Yv8hubQX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=m8FIbVCUGw68t4PqckIA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=QEXdDO2ut3YA:10 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 4 aug. 2019 kl. 17.59 skrev Daniel Ekl=C3=B6f : >=20 > Anyway, I think it's beyond clear _what_ the problem is. As to how, if = at all, to fix it is not for me to say so I wont try. I'll be using some = version of the patch(es) provided here and move on. Fine. How about we push the 'light' patch posted earlier, ditching = screen support for get-selection since it was painful to use anyway? = Unless anyone objects, of course. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 12:58:03 2019 Received: (at 36879) by debbugs.gnu.org; 5 Aug 2019 16:58:03 +0000 Received: from localhost ([127.0.0.1]:35801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hugJ8-0000Vh-Qk for submit@debbugs.gnu.org; Mon, 05 Aug 2019 12:58:03 -0400 Received: from mail.ekloef.se ([193.105.134.189]:43378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hugJ6-0000VF-R6 for 36879@debbugs.gnu.org; Mon, 05 Aug 2019 12:58:01 -0400 References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <874l2wrkef.fsf@mini.la.casa> <78412F16-8E8D-4495-AF96-C55F81DB721E@acm.org> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ekloef.se; s=mail; t=1565024276; bh=aISEafsh6ViM0h2QZ9gtVUyTqoWcwn6LSM5pqBxuBCw=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=XoV7W8fIonn2Vq9W/UH4Gn/8RDk0CTKzXqEzk+dFhq0QCpuySCtK0fuRheWvMvNOi fLKp9K5sV+vJAmYn1YwJDGpAP76vUegLPe8NeZt6KiP41y828YDAsgZrm9Sm2as6/b SL9V2MBdvMuLBq1PQUIrjDlL/Xsb0sbHnF+t5dXzVd7lwm1covHZC1xyRQg2Aw5DXt ovevVBp994zb64MjUl3xhYbG/4O4f566E9/ISC//eAEkglUzCceolom5NTPLq5Kj2b E+Z3d4MoeuoFBw0lZudmrKrWJv33wKvKqPiWh2VF32pNCYbvtw1eKGveIXwcSjly4K ZLSdXbI8iGhDg== User-agent: mu4e 1.2.0; emacs 26.2 From: Daniel =?utf-8?Q?Ekl=C3=B6f?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working In-reply-to: <78412F16-8E8D-4495-AF96-C55F81DB721E@acm.org> Date: Mon, 05 Aug 2019 18:57:56 +0200 Message-ID: <87zhknr1m3.fsf@mini.la.casa> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.ekloef.se X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Fine. How about we push the 'light' patch posted earlier, > ditching screen support for get-selection since it was painful > to use anyway? Unless anyone objects, of course. I'm obviously fine with that. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 05:37:25 2019 Received: (at 36879-done) by debbugs.gnu.org; 8 Aug 2019 09:37:26 +0000 Received: from localhost ([127.0.0.1]:39910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hverN-0001E2-Kv for submit@debbugs.gnu.org; Thu, 08 Aug 2019 05:37:25 -0400 Received: from mail1430c50.megamailservers.eu ([91.136.14.30]:44308 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hverK-0001Dn-Mz for 36879-done@debbugs.gnu.org; Thu, 08 Aug 2019 05:37:24 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1565257035; bh=n8pzjEFuYBm7nsuGXI3LL7m0m5XDvF5yf/T8gq8Q5Tw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=H35As+1c2eTAo5vE7CILXwqd+xqH6X4ZuyEsDYeK+lil6w/SHwPG+vG20ad9qG7M2 XAOF2RkVIZRYI92hI8hVdZS+KL8y2pPobkNF8MF41yGiDw+SvFb0Eiaxp7qockG96y +8L8WiM8fR1zkvHpgXE3lQzK2+DmSW1hFX3ElAxA= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x789bBlP005538; Thu, 8 Aug 2019 09:37:13 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87zhknr1m3.fsf@mini.la.casa> Date: Thu, 8 Aug 2019 11:37:10 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5C8B8CDB-AEFD-4FBF-9A7D-AB7C41B8D60B@acm.org> References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <874l2wrkef.fsf@mini.la.casa> <78412F16-8E8D-4495-AF96-C55F81DB721E@acm.org> <87zhknr1m3.fsf@mini.la.casa> To: =?utf-8?Q?Daniel_Ekl=C3=B6f?= X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020B.5D4BED4B.007F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Mqx8FVSe c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=kQ76zCmamccEIfmm8doA:9 a=QEXdDO2ut3YA:10 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 36879-done Cc: Philipp Stephani , Stefan Monnier , 36879-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 5 aug. 2019 kl. 18.57 skrev Daniel Ekl=C3=B6f : >=20 > I'm obviously fine with that. All right, the 'light' patch has now been pushed to master. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 15:32:47 2019 Received: (at 36879) by debbugs.gnu.org; 15 Aug 2019 19:32:47 +0000 Received: from localhost ([127.0.0.1]:52471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyLUN-0005eo-3d for submit@debbugs.gnu.org; Thu, 15 Aug 2019 15:32:47 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyLUL-0005eY-7p for 36879@debbugs.gnu.org; Thu, 15 Aug 2019 15:32:45 -0400 Received: by mail-ot1-f66.google.com with SMTP id f17so7525899otq.4 for <36879@debbugs.gnu.org>; Thu, 15 Aug 2019 12:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Xn8Tm1Mrq35YQ6NetiepXR+8roO6gQmqmhLuvrUWsfA=; b=st7FLME6CeZqqiKLbNCplVneTmCBy/FOn6zGnokic73XPZFwifcHYVqx3Is/IMRbla USEDhml6YusNbqyyDP2c1Stgpu02+VrsLn3+tMKO8LbPsGHq+r00qD0JQWfgh4YdsSZs zRtBJEhgyDCrE0e88qH4mVe97Usf121nGgsazltceHbhx5DPLVwJcox0vK3rfkjj8qKm RU6YZy8DPVS45JpBow3XaLvDbXjXPqtPtYrA25pSh9k6typmWwzF3ELm6TK5kecWpZub Jz3yPVRFXAEamaT7OnhaIPFZM3My5GY32Q+x6Un6ic/6Gidjg0KMVeuq7KZS3kqapeIX y45g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Xn8Tm1Mrq35YQ6NetiepXR+8roO6gQmqmhLuvrUWsfA=; b=ZaqDnLX+oDOPQ7rRqo+tjktaTfJI533vhXBGIX64KNgWhtrv6VmBPFnd4ysryzgr06 LXyfAuYAgwfQt8AcjCYKATV/lTgcJi5/1fId+gfBzBat2DtnyLm5+U2y1pTUOl+uwrjm /CVOSKqBjRwScae7HazFo/vkWhzyETSHBT8uKKDGXb2pGbLPWJFxckLm+YHANO/DZlHq 9xUbldh/10vJDqM71ore+FpnUCVtLNGN99RHMpVm3NALMdhMunATVH4Fhwgfd1DHbLGv NK5D3mmUHSn8KuTwPaIm9qqkda/vBWym2AL6v40ZNB5M1J4SkRrcp4xvPXSw17CLVLIb NwDQ== X-Gm-Message-State: APjAAAW/2ZUxAVcFl5j5l02KZVKggPCvYgfKPjeUiREVHQu/ttJY48cH sveEg2HkSNbEqxtVW5HcxxtnIstepw1A8tGmbT0= X-Google-Smtp-Source: APXvYqx4xYzyxhiHtZwVPFnhPAgv/9k/Iz0Ka/Hz1m+p+YS19/GrNRa06o8Ed19OC3dyWEiBy2UGWjqCGwqIYpdp4uw= X-Received: by 2002:a05:6830:1510:: with SMTP id k16mr4314352otp.174.1565897559364; Thu, 15 Aug 2019 12:32:39 -0700 (PDT) MIME-Version: 1.0 References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> In-Reply-To: <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> From: Philipp Stephani Date: Thu, 15 Aug 2019 21:32:27 +0200 Message-ID: Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , =?UTF-8?Q?Daniel_Ekl=C3=B6f?= , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am So., 4. Aug. 2019 um 11:45 Uhr schrieb Mattias Engdeg=C3=A5rd : > > I'm probably missing something obvious, but how is talking to xclip mor= e secure than talking to the terminal emulator? Or is the "security perspec= tive" somewhere else? > > It's not a problem in Emacs, but by enabling OSC 52 in your terminal, an = adversary might arrange for a crafted string to be sent to it which would s= urreptitiously inject malicious data into the clipboard, or extract secrets= from it. The OSC 52 reply itself could cause damage under some circumstanc= es, or the attacker could just hope for the victim to paste a command into = a shell prompt. > > > Except that xclip assumes x11. Would it not make sense to support a win= dow protocol agnostic method? By supporting OSC 52, you support whatever cl= ipboard mechanism the terminal emulator supports. > > I can definitely see how OSC 52 can be useful when there is only a termin= al connection to the machine running Emacs, and no out-of-band conduit for = the clipboard. The user needs to enable it actively both in the terminal an= d in Emacs; it cannot be used by accident. > > > Perhaps one could use the heavy weight solution (change quit char) when= 'screen' is detected, but simply use ST in the non-screen case? > > The thought did cross my mind, but I thought I'd first enquire about the = screen usage, given that I only got it to work with screen, not tmux, and t= hen only after explicitly setting TERM. > > Perhaps Philipp Stephani who originally wrote the code could help us here= (sorry about dragging you into the discussion, Philipp). Under what circum= stances did you run it? (It was 4 years ago; it's understandable if you don= 't remember much of it.) > I added OSC-52 support primarily to support HTerm/Chrome Secure Shell. HTerm supports copying via OSC-52, but not pasting due to the aforementioned security issues, cf. https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#Is= -OSC-52-aka-clipboard-operations_supported. I don't use HTerm that much any more, but OSC-52 support for copying was definitely quite useful. Copying is not a security issue (at least for the SSH use case) as the clipboard is always ephemeral anyway. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 17:28:29 2019 Received: (at 36879) by debbugs.gnu.org; 15 Aug 2019 21:28:29 +0000 Received: from localhost ([127.0.0.1]:52545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyNIK-00018C-P5 for submit@debbugs.gnu.org; Thu, 15 Aug 2019 17:28:29 -0400 Received: from mail1431c50.megamailservers.eu ([91.136.14.31]:57056 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyNIF-00017v-VG for 36879@debbugs.gnu.org; Thu, 15 Aug 2019 17:28:25 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1565904497; bh=WhUJuyGVYwLYKTww1wwaPJ5ho2+JUcZe+Ypz3MpYThY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KU4Yi8UyHT43eFlXWQjMRsbHxzq+gp70M2qPn0vyvlDHcGU7oralEksyXOQ/HsPF+ uJZfMvN5oMFL7RVNioN/UIXWDmSlE+kKM2aaSZf4QgE0JJavwRKw6Tvxlca3hxb851 wQRENImIChnUyXyyr8gONDVH3awNueRZdfqeVlqk= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x7FLSDNZ002088; Thu, 15 Aug 2019 21:28:15 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36879: 26.2; OSC 52 paste in term/xterm.el not working From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 15 Aug 2019 23:28:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lfwecfb7.fsf@mini.la.casa> <877e7tqr5w.fsf@mini.la.casa> <5E410D26-8917-4291-8202-C28FAE1CD0B2@acm.org> To: Philipp Stephani X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0215.5D55CE71.003D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Mqx8FVSe c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=Oh2cFVv5AAAA:8 a=Ai66NpgI_t6Cz8KeOZ0A:9 a=CjuIK1q_8ugA:10 a=7KeoIwV6GZqOttXkcoxL:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 36879 Cc: Philipp Stephani , =?utf-8?Q?Daniel_Ekl=C3=B6f?= , Stefan Monnier , 36879@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 15 aug. 2019 kl. 21.32 skrev Philipp Stephani : >=20 > I added OSC-52 support primarily to support HTerm/Chrome Secure Shell. > HTerm supports copying via OSC-52, but not pasting due to the > aforementioned security issues, cf. > = https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#I= s-OSC-52-aka-clipboard-operations_supported. > I don't use HTerm that much any more, but OSC-52 support for copying > was definitely quite useful. Copying is not a security issue (at least > for the SSH use case) as the clipboard is always ephemeral anyway. Thank you! It confirms that the paste code was never used much if at = all. The limitations of the chosen patch is then probably nothing to worry = about. From unknown Mon Jun 23 13:08:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Sep 2019 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator