From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: X selection access in xterm (OSC 52) Date: Sun, 15 Mar 2015 18:33:38 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11348e68ec5959051157f8b2 X-Trace: ger.gmane.org 1426444439 5259 80.91.229.3 (15 Mar 2015 18:33:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2015 18:33:59 +0000 (UTC) Cc: Emacs developers , Yuri Khan To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 15 19:33:57 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YXDMK-0008Rj-D1 for ged-emacs-devel@m.gmane.org; Sun, 15 Mar 2015 19:33:56 +0100 Original-Received: from localhost ([::1]:44399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXDMJ-0001Kb-M7 for ged-emacs-devel@m.gmane.org; Sun, 15 Mar 2015 14:33:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXDM6-0001KV-OU for emacs-devel@gnu.org; Sun, 15 Mar 2015 14:33:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXDM5-0003pD-E6 for emacs-devel@gnu.org; Sun, 15 Mar 2015 14:33:42 -0400 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:36452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXDM5-0003p7-1f for emacs-devel@gnu.org; Sun, 15 Mar 2015 14:33:41 -0400 Original-Received: by lamx15 with SMTP id x15so23715333lam.3 for ; Sun, 15 Mar 2015 11:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=NRCDT26MVgC3jXM5dON2UOz7olm2JltShEF6GCFj3Ko=; b=faiaeo7MQGh9QyGj9+uy6uKCJ2u9I2+88BFUIXlMfzeKH85WwMFjFnBqOeI+yWlg9n 0yVtkl0UBUk2urUOH2D6Hi3NJ+0hL02wIQ31CTcKxsyh4rvKZ5P2b4fZY5MYDXRvt9IS fl90OM8XfVU3Gjx1nN3cKGRColsplQFubbNxWuq+C3LQj8vejdNUGGG+OLPAA7X0+x3s rF23i1GgE9T+ndLTDkuiVEkDzJoDXMk3Y+n9FOnhawkMvMEjrjZiQnubkbtkNjiAYczq l1z/dc9yIddceNSanyQVd8ScV5J0oeLfSg4cWpI0qHAsbzGBUTDnHtlH9sTuWWiKLUu/ Ul3w== X-Received: by 10.152.225.167 with SMTP id rl7mr52692129lac.54.1426444419616; Sun, 15 Mar 2015 11:33:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183884 Archived-At: --001a11348e68ec5959051157f8b2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stefan Monnier schrieb am Fr., 13. M=C3=A4rz 201= 5 um 23:08 Uhr: > >>> Indeed, sounds good. Can someone prepare a patch for that feature? > >> I'm on it. > > Thanks. I don't see your name in copyright.list. Did you sign the > copyright paperwork yet? If not, then please fill the form below and > email it as instructed so the FSF can send you the relevant paperwork > to sign. > I work for Google, so this should be covered by the general agreement between Google and the FSF. > > > Taken from > > https://github.com/chromium/hterm/blob/64b3819692526f41eb960f6c9444c2 > c58e658f79/etc/osc52.el. > > Can you figure out who are the authors of that file, so we can get their > copyright cleared? > According to the GitHub commit log, rginda is the only contributor. He's also a Googler and approved of the patch. > > > This is an xterm escape sequence to save text to the X clipboard. > [...] > > + interprogramCut -- if supported, Xterm saves yanked text to the X > selection" > > Is it the "clipboard" or the "selection"? > It should probably be "X Window selection" because both the primary selection and the clipboard can be accessed. > > > + (setq interprogram-cut-function > > + (if (string-prefix-p "screen" (getenv "TERM")) > > + #'xterm--screen-interprogram-cut > > + #'xterm--interprogram-cut))) > > Please don't change interprogram-cut-function, since this breaks down if > you use a single Emacs session with both GUI and text frames (and with > potentially various different terminal kinds). > > Instead use gui-method-declare for gui-set-selection (new in Emacs-25). > Thanks, I'll modify the patch accordingly tomorrow. > > Also, do I understand it correctly, that this only handles transfers in > one direction (i.e. pushing Emacs's selection to the X server, but not > fetching the X server's selection for use in Emacs)? > > > Yes. IIUC pasting has always been supported, either via the slow path of character-by-character insertion, or the bracketed paste functionality. --001a11348e68ec5959051157f8b2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Stefan Monnier <monnier@iro.umontreal.ca> sc= hrieb am Fr., 13. M=C3=A4rz 2015 um 23:08=C2=A0Uhr:
>>> Indeed, sounds good.=C2=A0 Can someone prepare a pa= tch for that feature?
>> I'm on it.

Thanks.=C2=A0 I don't see your name in copyright.list.=C2=A0 Did you si= gn the
copyright paperwork yet?=C2=A0 If not, then please fill the form below and<= br> email it as instructed so the FSF can send you the relevant paperwork
to sign.

I work for Google, so this sho= uld be covered by the general agreement between Google and the FSF.
=C2=A0

> Taken from
> https://github.com/chr= omium/hterm/blob/64b3819692526f41eb960f6c9444c2c58e658= f79/etc/osc52.el.

Can you figure out who are the authors of that file, so we can get their copyright cleared?

According to the Git= Hub commit log, rginda is the only contributor. He's also a Googler and= approved of the patch.
=C2=A0

> +=C2=A0 (setq interprogram-cut-function
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (string-prefix-p "screen" (= getenv "TERM"))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #'xterm--screen-interpr= ogram-cut
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #'xterm--interprogram-cut)))
Please don't change interprogram-cut-function, since this breaks down i= f
you use a single Emacs session with both GUI and text frames (and with
potentially various different terminal kinds).

Instead use gui-method-declare for gui-set-selection (new in Emacs-25).
=

Thanks, I'll modify the patch accordin= gly tomorrow.
=C2=A0

Also, do I understand it correctly, that this only handles transfers in
one direction (i.e. pushing Emacs's selection to the X server, but not<= br> fetching the X server's selection for use in Emacs)?



Yes. IIUC pasting has always been supp= orted, either via the slow path of character-by-character insertion, or the= bracketed paste functionality.=C2=A0
--001a11348e68ec5959051157f8b2--