From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#17357: 24.4.50; garbage characters when pasting in an OS X terminal Date: Sun, 27 Apr 2014 17:11:35 -0700 Message-ID: <535D9CB7.6070601@dancol.org> References: <10EFA706-8A14-4F49-81B2-403D770E1CCE@twistedmatrix.com> <535D4211.6030706@dancol.org> <716D74DC-50C1-4E79-B43B-5D595A051516@twistedmatrix.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BW5nXlBX20tbGeSOAbI7H0Xxub9RUve9D" X-Trace: ger.gmane.org 1398643940 2579 80.91.229.3 (28 Apr 2014 00:12:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2014 00:12:20 +0000 (UTC) Cc: 17357@debbugs.gnu.org To: Glyph Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 28 02:12:15 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WeZB8-0003OU-Ck for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Apr 2014 02:12:14 +0200 Original-Received: from localhost ([::1]:40965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeZB7-0007HK-Md for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Apr 2014 20:12:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeZB1-0007HE-8I for bug-gnu-emacs@gnu.org; Sun, 27 Apr 2014 20:12:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WeZAx-0000sf-1A for bug-gnu-emacs@gnu.org; Sun, 27 Apr 2014 20:12:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeZAw-0000sb-OI for bug-gnu-emacs@gnu.org; Sun, 27 Apr 2014 20:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WeZAw-0006rS-A9 for bug-gnu-emacs@gnu.org; Sun, 27 Apr 2014 20:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Apr 2014 00:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17357 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17357-submit@debbugs.gnu.org id=B17357.139864390326346 (code B ref 17357); Mon, 28 Apr 2014 00:12:02 +0000 Original-Received: (at 17357) by debbugs.gnu.org; 28 Apr 2014 00:11:43 +0000 Original-Received: from localhost ([127.0.0.1]:43349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WeZAc-0006qq-St for submit@debbugs.gnu.org; Sun, 27 Apr 2014 20:11:43 -0400 Original-Received: from dancol.org ([96.126.100.184]:42162) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WeZAZ-0006qf-6M for 17357@debbugs.gnu.org; Sun, 27 Apr 2014 20:11:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=K5LRI09D0pXN98hhYT0Eyqcw5STyqzjJLIpZvTBqsds=; b=h0xZtmWv/o03mTZOdOnyPb8KstxQez3QH31EUCqkULUuOluiAQZWN01rEp6cs73B4xd5feXQ43SVj9R5vs48cSdPTky7biaIHy9/cowc2vsvJ+udnTHPZIhwRmThWXW4K+G5/caAmAyNRsAzWzd2mutAuv4R+2IBiqctV3wNJkwC0VcacpTRdqAi06a0xq28pEhZ+xZQGRXL1pQ16UkNHCiPvlFW6SwID0RN+LhlkI38vjsyuInZRyJi6f2r0hXwlBVQPAfHObfWAx1lWuAHA9mpYya4HjWliBxwwo7Qm6NvOm230kvrP9FgACBsZpLV9c6XKF2pjoF5wqh4MpeTUQ==; Original-Received: from [2601:8:b200:2b6::2b1] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WeZAW-0000hh-Bn; Sun, 27 Apr 2014 17:11:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <716D74DC-50C1-4E79-B43B-5D595A051516@twistedmatrix.com> X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88344 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BW5nXlBX20tbGeSOAbI7H0Xxub9RUve9D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/27/2014 05:03 PM, Glyph wrote: >=20 > On Apr 27, 2014, at 10:44 AM, Daniel Colascione wro= te: >=20 >> On 04/27/2014 10:27 AM, Jan Dj=E4rv wrote: >>> 27 apr 2014 kl. 09:47 skrev Glyph : >>> >>>> >>>> I'm using snapshot builds from http://emacsformacosx.com/. Somewher= e >>>> between the 4/13 snapshot and the 4/24 snapshot, "paste" in an OS X >>>> terminal (running with -nw) results in garbage characters on either = side >>>> of the paste. >>>> >>>> For example, if I paste the URL, it looks like >>>> 200~http://emacsformacosx.com/201~, or causes jumping around within = the >>>> buffer (for example, when filing this bug, it jumped to the beginnin= g of >>>> the buffer and pasted the URL and the "201~" before the From:). >>>> >>>> >>> >>> I can't reproduce this. Did you start emacs with -Q? >>> What application did you copy from? >>> What key combination did you use to paste? >> >> That's the new bracketed paste system supoport. Dammit. Why do I only notice typos in my emails after I send them? > Emacs is correctly >> sending the terminal the sequence to enable bracketed paste mode, but >> isn't correctly the start sequence. I hope we don't have to make this >> feature conditional. >=20 > I did figure this out a couple of hours after I discovered the weird be= havior. Eh, at least I found an unrelated bug in the bracketed paste support as a result of your message. >> OP, what's in *Messages*? If you M-x trace-function-background >> xterm-paste, do you see messages in *trace-output*? What happens if yo= u >> manually type ESC [ 2 0 0 ~ ? >=20 > I can save you some trouble - bracketed paste support works fine, the t= erminal sends the right control codes :-). >=20 > The problem is that I had this key-binding in some emacs-lisp code I wr= ote a while ago: >=20 > (global-set-key [(meta \])] 'something) > (global-set-key [(meta \[)] 'something-else) Your numeric keypad bindings should have broken too. Also, we bind these keys in xterm-function-map. Shouldn't that map override global-map? > After removing those global key bindings, it works great. >=20 > It might be worth putting some nicer error-reporting around those > though, since M-] and M-[ are perfectly cromulent keys to want to bind > (and I still bind them, I just have an (if (not (eq window-system nil))= ) > around it now. I'd advise something a bit more subtle, in case you want to use emacs server with tty frames. --BW5nXlBX20tbGeSOAbI7H0Xxub9RUve9D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTXZy3AAoJEMAaIROpHW7If24P/3aXg58EIy3fG5UPU95nI+sM dzA7rm/pBRQPSOsDu5bbwSRIIBYHJK4dCEGkXqBV6GXz6A0d7uqKuzJRzJZKspEx A/IrjrEsaWSbSJZm7GVAGonb9lHJiTo5wYTYI/oxzu5mffqFoITxq1iq41LGuiev eU7MHW7TPhr5tU8OyxEI3NSXdj8/xiQSly6fo/fI8cGwGOTArZhVisCmVylc0I66 eRQwmb/hUOkkLWwURxZYlLGRDECxt+iZ2fsJONzaT2z4dTARksLVbYgIOrVwYhp3 /7Cbr7xOEWG1AnXGh0ItcJhkHCD49MFqUjZ+c75zc4QEZvyRTOXWffHk0tM6orpZ s+Vz7WfDrxIQSzvCYwYBKoki0O9cmHjQ8HogLeAS61UtybHxJPZHON2tsczUE4ZG QNUjkDDd0AFhUOKYitpj8m74FINyWcb0QeVrcxiL001fSqGFash27nNyQQs9sowa sZHKTOqdRlXgg02N1z19tPzuTJoVSE0fpxD2cP9dE8dhY8EOPl8zRxVgmcozn2Gp md13o8x8Y5dJO6nJr4p+pMJ/MU3IUiI4YK/91vDFDdFFYSzRRZrcmX5Xouh/ekV0 nayoV2fcbK/aRdzhxWPLdg023SA+PZz+OI9iN3HKm2VBk1NoYMhIRfs8hx8lvaeX 0GGyKjCM9QBS9bKroAg2 =AAea -----END PGP SIGNATURE----- --BW5nXlBX20tbGeSOAbI7H0Xxub9RUve9D--