From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Duncan Findlay via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55883: [PATCH] Update X Primary Selection with active regions Date: Thu, 9 Jun 2022 23:18:01 -0700 Message-ID: Reply-To: Duncan Findlay Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000bbe5b105e111e875" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26595"; mail-complaints-to="usenet@ciao.gmane.io" To: 55883@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 08:29:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzY9J-0006lp-7Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 08:29:37 +0200 Original-Received: from localhost ([::1]:51598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzY9H-0007D7-Nx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 02:29:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzY8k-0007Bf-Oh for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 02:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzY8k-0001H3-GR for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 02:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzY8k-0006Ch-Cr for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 02:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Duncan Findlay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 06:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165484251423790 (code B ref -1); Fri, 10 Jun 2022 06:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jun 2022 06:28:34 +0000 Original-Received: from localhost ([127.0.0.1]:48490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzY8E-0006BX-9U for submit@debbugs.gnu.org; Fri, 10 Jun 2022 02:28:33 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzXyt-0005rk-AH for submit@debbugs.gnu.org; Fri, 10 Jun 2022 02:18:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzXyn-0008K4-Qw for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 02:18:50 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzXyl-0008JI-VM for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 02:18:45 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id o16so1404260wra.4 for ; Thu, 09 Jun 2022 23:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Er6AxIuiWBdBMy1lXbR51LNeFwH3OJLfl33SwmpG0KM=; b=PeFoaxc8dllTWGiJhOPhtfio08tDT2/KrOmOneADqa55ne1LH1bXzzBlrfxhnJEa4I 7HHKCip+tamMTMo4WB9HBc+mB7wQEm/NbRbka0C/qAA8ViTBUCxMG/zeWvwX5wnNbQt8 p0eqKh/gjhq7euxi9nLhifW9paf54AT3M/bYfzSnKT73SJl3lWptwgjcnwyo/ZSOPM+L unudaUMYLvd1xV0F8pFdJjy12uEaj5Fi4ezvwe8N8eGLz7wKlIFlNymKc+QLat8lZpnT s73VhHKumaGpzPauhatYGMxfa940ECfgY3oT84uQKDPWX0n3c+Co4OlhIzoG2xZALkIc 2zPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Er6AxIuiWBdBMy1lXbR51LNeFwH3OJLfl33SwmpG0KM=; b=kxfEATZvo2Tdv2xOMoD9KHhGcVbITcbCtdb50oH3SAOvZygNBrAnS2mIDArm/i3yxa Qv/gQ3PJI/00zum9l7LN/LUgzRYJyT74yE/qTsxspiQD5+ow7SZSnYrq8OyfKpZBnjEj u0sIvYSYg00u95+y3OGaLHKPM+w4EcTflTzH77UHtLw2aJw1h/ZHYrK2VDw5Rw+C7wjo UpPLRSdgnJaUFTBmzlTpzyGKkwtc1vu0IFm5/GZOXctci3lxYMKB7igdrl7HlDUOvsLA P0iwCQ9BA2oMQyR3Jn7kTB5R3ONQUbn7x76jCkFht8twOeNxPFl/6Hyshotg6uIxh/To y/uw== X-Gm-Message-State: AOAM5317cXzkhqbajT0vRBMQx2jgRQXhF0BgqxWYzk0j+9/E43ijT+rG 8XNwI7l0G7SrsS20ivJpRy+FpWQYcAHWVue305uB+egsnPYvSg== X-Google-Smtp-Source: ABdhPJxHo1FUn48lFmONVUzhXdipDzQ/EP+VDJZ6Be8hyqLJgPppG+sqIYsL+eAqMgGKmXSOj7QWFM5iBvy/H3YS4Oc= X-Received: by 2002:a5d:59a5:0:b0:218:3ffb:e6ea with SMTP id p5-20020a5d59a5000000b002183ffbe6eamr25207101wrr.715.1654841918831; Thu, 09 Jun 2022 23:18:38 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=duncf@google.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 10 Jun 2022 02:28:28 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234187 Archived-At: --000000000000bbe5b105e111e875 Content-Type: text/plain; charset="UTF-8" Severity: wishlist Tags: patch Attached are two patches to allow users that use xterm's OSC 52 clipboard support to have their primary selection updated with the active region, to better match the behavior of running Emacs in X locally. This behavior is enabled automatically for supported terminals, and is controlled by the existing `select-active-regions' variable. Previous discussion: https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00126.html This should be covered by a corporate copyright assignment on file. --000000000000bbe5b105e111e875 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Use-display-selections-p-for-selecting-active-region.patch" Content-Disposition: attachment; filename="0001-Use-display-selections-p-for-selecting-active-region.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l481m63x0 RnJvbSA1ZGVlNWE0NGZkMGQzYWQ1N2JhN2U0MGZkNWIwNTQyZDcwMTYwYzE0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEdW5jYW4gRmluZGxheSA8ZHVuY2ZAZ29vZ2xlLmNvbT4KRGF0 ZTogRnJpLCAyMCBNYXkgMjAyMiAwMDoxNzo1MSAtMDcwMApTdWJqZWN0OiBbUEFUQ0ggMS8yXSBV c2UgYGRpc3BsYXktc2VsZWN0aW9ucy1wJyBmb3Igc2VsZWN0aW5nIGFjdGl2ZSByZWdpb24KCmBk aXNwbGF5LXNlbGVjdGlvbnMtcCcgaXMgZG9jdW1lbnRlZCBhcyB0aGUgcHJlZmVycmVkIHdheSB0 byBkZXRlcm1pbmUKY2FwYWJpbGl0aWVzLCBvdmVyIGB3aW5kb3ctc3lzdGVtJy4gIFRoaXMgYWxs b3dzIHN1cHBvcnRlZCB0ZXh0CnRlcm1pbmFscyB0byBpbmRpY2F0ZSBzdXBwb3J0IGZvciB0aGVz ZSBzZWxlY3Rpb25zLgoKKiBzcmMva2V5Ym9hcmQuYyAoY29tbWFuZF9sb29wXzEpOiBSZXBsYWNl IGNhbGwgdG8gYHdpbmRvdy1zeXN0ZW0nCndpdGggYGRpc3BsYXktc2VsZWN0aW9ucy1wJyB3aGVu IGRlY2lkaW5nIHdoZXRoZXIgdG8gdXBkYXRlIHByaW1hcnkKc2VsZWN0aW9uLgotLS0KIHNyYy9r ZXlib2FyZC5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WxlY3Rpb24iKTsKIAogICAvKiBUaGUgcHJpbWFyeSBzZWxlY3Rpb24uICAqLwot LSAKMi4zNi4xLjQ3Ni5nMGM0ZGFhMjA2ZC1nb29nCgo= --000000000000bbe5b105e111e875 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-Support-select-active-regions-with-xterm.patch" Content-Disposition: attachment; filename="0002-Support-select-active-regions-with-xterm.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l481maqq1 RnJvbSAyNWJiMTg3OTExZTA0NDRjNWUxNjE4NjUwYTA2MWYwYmUzMTdiZWU3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEdW5jYW4gRmluZGxheSA8ZHVuY2ZAZ29vZ2xlLmNvbT4KRGF0 ZTogVGh1LCAyIEp1biAyMDIyIDIwOjIzOjQ0IC0wNzAwClN1YmplY3Q6IFtQQVRDSCAyLzJdIFN1 cHBvcnQgYHNlbGVjdC1hY3RpdmUtcmVnaW9ucycgd2l0aCB4dGVybQoKVGhpcyBhbGxvd3MgRW1h Y3MgdG8gc2F2ZSB0aGUgYWN0aXZlIHJlZ2lvbiB0byB0aGUgdXNlcidzIHByaW1hcnkKc2VsZWN0 aW9uIG9uIHN1cHBvcnRlZCB0ZXJtaW5hbHMuICBUaGlzIGJlaGF2aW9yIGlzIGNvbnRyb2xsZWQg YnkgdGhlCmV4aXN0aW5nIGBzZWxlY3QtYWN0aXZlLXJlZ2lvbnMnIHZhcmlhYmxlLgoKKiBsaXNw L2ZyYW1lLmVsIChkaXNwbGF5LXNlbGVjdGlvbnMtcCk6IEZvciB0ZXh0IHRlcm1pbmFscywgcmV0 dXJuCnRlcm1pbmFsIHBhcmFtZXRlciBgZGlzcGxheS1zZWxlY3Rpb25zLXBgIHRvIGluZGljYXRl IHNlbGVjdGlvbgpzdXBwb3J0LgoqIGxpc3AvdGVybS94dGVybS5lbCAoeHRlcm0tLWluaXQtYWN0 aXZhdGUtc2V0LXNlbGVjdGl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