GNU bug report logs - #16315
Slow paste

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Perry Smith <pedzsan@HIDDEN>; dated Wed, 1 Jan 2014 15:43:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jan 2014 15:42:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 10:42:54 2014
Received: from localhost ([127.0.0.1]:56193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VyNwb-0007fx-Gy
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2014 10:42:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49487)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNwY-0007fo-IG
 for submit <at> debbugs.gnu.org; Wed, 01 Jan 2014 10:42:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNwP-0002D0-UT
 for submit <at> debbugs.gnu.org; Wed, 01 Jan 2014 10:42:50 -0500
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,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:51773)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNwP-0002Cw-Qs
 for submit <at> debbugs.gnu.org; Wed, 01 Jan 2014 10:42:41 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51189)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNwH-0005mO-C4
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jan 2014 10:42:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNw8-0002AL-UQ
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jan 2014 10:42:33 -0500
Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:62992)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pedzsan@HIDDEN>) id 1VyNw8-0002A2-Ow
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jan 2014 10:42:24 -0500
Received: by mail-qc0-f171.google.com with SMTP id c9so12950701qcz.30
 for <bug-gnu-emacs@HIDDEN>; Wed, 01 Jan 2014 07:42:24 -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=NtoF3MTiKWwMzkSSHU0jaeSqkH9Nqe7IxsF9WBDpw5I=;
 b=XG00uncotrSEBIZQSm+tq4yOM92VgRd1E0pDdbkuZfg1uaUWFsDAOC0IcaHyxi9ZLc
 WJem1nnfCjp3+fRC2R6MQY3ADdpo3sAdxVVqtWmS6wlW/h4hH5FXNcwTSxOijllYLOZt
 HLMZdxCY7pAPoVlSEsPf1Y9pZJR0K7+gmZgH+apmxVbIeILH9d/hZMSZ6iDjFOGmL8CC
 oIXgQQflI2t0xeaBzpbN26u+GC4rUPKQcmxgoYO3KU/caGL9Ghr6B8AwP4v5HFRVcLc+
 Cr7vS7ouweWQJvxpO17isx3O3YCur2O7SaVGNho4y7bTe19aHuTwNLYP0vOg2wYzcD7E
 lu1A==
X-Received: by 10.49.98.35 with SMTP id ef3mr134873452qeb.30.1388590944109;
 Wed, 01 Jan 2014 07:42:24 -0800 (PST)
Received: from magicbook.local ([64.128.19.234])
 by mx.google.com with ESMTPSA id p20sm76081852qay.0.2014.01.01.07.42.22
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Wed, 01 Jan 2014 07:42:23 -0800 (PST)
From: Perry Smith <pedzsan@HIDDEN>
Content-Type: multipart/signed;
 boundary="Apple-Mail=_059F83E6-75F2-4EC4-8313-27DF93888082";
 protocol="application/pgp-signature"; micalg=pgp-sha1
Subject: Slow paste
Message-Id: <72CCD5AC-959C-4E7E-B54C-7CD1632BD2E5@HIDDEN>
Date: Wed, 1 Jan 2014 09:42:20 -0600
To: bug-gnu-emacs@HIDDEN
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
X-Mailer: Apple Mail (2.1510)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


--Apple-Mail=_059F83E6-75F2-4EC4-8313-27DF93888082
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

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).

When I copy from a Mac window and paste into emacs (yank), there is a =
long delay.  When I started seriously testing, it was always 5 seconds =
but I have memories that sometimes it was much longer.  I'm calling =
these memories "false" at this point.

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=_059F83E6-75F2-4EC4-8313-27DF93888082
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

iQEcBAEBAgAGBQJSxDdcAAoJEIPoMwNgGirlxCcH+weCLsXgW8GVNkp502eTk5CF
/3+zX+pYz8arAe0aWAOtJfn7BRBDlpchZV6VsKoihzItndHkCnrbd3D7eRD65pxr
/Y0AM+GgyMRsqXuyP1VVxLMkKxZLDD0PZ3tcGTbmuyiPGyLbnVwLVPlu5IZsh28D
uAdEp7p8V6rtrnj14gt6LhRwTNhNQiV3UtB3DZJ+GcwduzxiQ9XzC8J0TPzd2Q5u
tKQ9Pv6fImr2m47FC7mcNPm8db5ype9QNc/82pj/LvrCESU5G1NDaL8ThrPMca+K
taz2h+b5q5+kQkdFSsFXeEUAnIfNv5P6kHIHYQC7HsGHToC6l6F4vb9DU2tZ/fs=
=dbRQ
-----END PGP SIGNATURE-----

--Apple-Mail=_059F83E6-75F2-4EC4-8313-27DF93888082--




Acknowledgement sent to Perry Smith <pedzsan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16315; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.