From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Slow paste Date: Mon, 30 Dec 2013 14:52:19 -0600 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6B60776A-5ADA-40D7-8E13-6F3157BC5CBF"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Trace: ger.gmane.org 1388436766 27229 80.91.229.3 (30 Dec 2013 20:52:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 20:52:46 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 30 21:52:51 2013 Return-path: Envelope-to: geh-help-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 1VxjpS-00065R-QM for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 21:52:51 +0100 Original-Received: from localhost ([::1]:59763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxjpS-0001YR-48 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 15:52:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vxjp9-0001YC-Lf for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 15:52:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vxjp1-0001wV-7t for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 15:52:31 -0500 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:60664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vxjp1-0001wR-2g for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 15:52:23 -0500 Original-Received: by mail-ob0-f173.google.com with SMTP id gq1so12116064obb.32 for ; Mon, 30 Dec 2013 12:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=HgJUIY7GTz2CT7KzH7qqQP5082dQgp6gUeE0AIargSI=; b=TV7ji0RfPhzZmvmabMYNDXlAQmZNlI/jEKy/Ku2lELzbpB2bNcRfHGefz4SnaVBXhU ptgDHIOJpZltY+8Ex1wHEEhR/EQcwHPtp2OvEv9QKRq0CSCQmiXofLuwdbybxkTXSp7t VGh9qEz3VozIEtPlfJxIZy0COCXxR4EelEOIih6bMwvNOEvpL6bMw9PPzSdhP+Anafj8 LrfusxlQ1J0Gk850YUW6uvcX3dZXtWoFVTL+enUpxHr/EraUK7X3InRJOfX92T6X3aok HmBhWK5s4wbzJ4hOvRUMzkPiLJlSuHqbGYOdqwtsIsKpbcoktqLBIKtNhJw4mb2AvdsN CjAA== X-Received: by 10.60.83.17 with SMTP id m17mr2134608oey.62.1388436742328; Mon, 30 Dec 2013 12:52:22 -0800 (PST) Original-Received: from magicbook.austin.ibm.com ([32.97.110.54]) by mx.google.com with ESMTPSA id h4sm64886849oel.3.2013.12.30.12.52.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Dec 2013 12:52:21 -0800 (PST) X-Mailer: Apple Mail (2.1510) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95208 Archived-At: --Apple-Mail=_6B60776A-5ADA-40D7-8E13-6F3157BC5CBF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, I think I finally have enough info to ask a decent question. This is = quasi a bug report but I'm starting off here. I've mentioned this before. I have a Mac (10.8.5) running JollysFastVNC = (1.48) viewing a RealVNC server (5.0.1) on AIX (6.1 TL08 SP03) running = emacs (24.3). I believe it started when emacs 24 was being developed but I'm not sure. = I know the issue existed in 24.2 and did not exist in emacs 23 that I = was using but I don't recall which subversion that was. I've turned on TRACE_SELECTION in xselect.c and I've also duplicated = those macros in keyboard.c and process.c. When I start emacs -q I get = this output: 10748140: get_input_pending returning 0 10748140: last check: read_kdb=3D-1 NILP(wait_for_cell):1 10748140: get_input_pending returning 0 10748140: no_avail:0 10748140: pselect 2 followed by a half second pause. This is the normal polling of the = input (I guess its normal). I go to a Mac window, select some text, = then hit command-C to copy it into the cut buffer, then select the VNC = window (where emacs is already the active window) and hit control-Y to = paste. I get: 10748140: get_input_pending returning 1 10748140: get_input_pending returning 1 10748140: Get selection UTF8_STRING, type _EMACS_TMP_ 10748140: Start waiting 5 secs for SelectionNotify 10748140: last check: read_kdb=3D0 NILP(wait_for_cell):0 10748140: Received SelectionNotify 10748140: get_input_pending returning 0 10748140: no_avail:0 10748140: pselect 2 followed by a 5 second pause, then I get 10748140: Got event =3D 1 10748140: Reading selection data 10748140: Read 7 bytes from property _EMACS_TMP_ 10748140: Delete property _EMACS_TMP_ and then I see the text show up in the emacs window. I *think* what is = "wrong" here is in this case, get_input_pending is actually pulling the = text out and via the SelectionNotify handler placing the text into = reading_selection_reply but then returns zero because, at that point in = time, there is no input to be read. Thus this if test, is not true: if ((read_kbd || !NILP (wait_for_cell)) && detect_input_pending ()) I'm thinking that after detect_input_pending is called in = wait_reading_process_output, another two lines like this: if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; should be added before the if (!no_avail) line (around line 4612 in the = copy I am looking at. I made this change in my copy and so far, it seems to work. Perry Smith --Apple-Mail=_6B60776A-5ADA-40D7-8E13-6F3157BC5CBF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJSwd0DAAoJEIPoMwNgGirl2+AH/j9qnwK8Sz1Ykg6LPJ9hhRGd yzaj1YKd7DVfCVM+D+JtoQnxwYq5OW4nZycLLJc9iSXR4iGS09mqaPecfhbSKmR8 PEMsLm+ugJ85mf6F7V8y4HPjRG+qv/RuuT+XqVc3NMcF7Ma3IlTrp7hpmHbQIOl6 d1t+xkZeCUrygPsImLBQcYl/cbeuSpnfyL+/bt17eK+Qzi3qdleGHZhierYNjlns MthjNGia/c1oIYFOQVacduQU1uZw/ACQX+q81+a0mArKAB54Y3lkHvN9FwUc7s+G rhCnzazqUBUViRDrprhkv285OtEVnhhkL80z44BuUp2HT6TtpcKXzpIkhD1HFgE= =9D5G -----END PGP SIGNATURE----- --Apple-Mail=_6B60776A-5ADA-40D7-8E13-6F3157BC5CBF--