Stefan Monnier schrieb am Fr., 13. März 2015 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.