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: Fri, 10 Jun 2022 18:59:47 -0700 Message-ID: References: <834k0t104u.fsf@gnu.org> Reply-To: Duncan Findlay Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000303c8d05e1226b58" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33554"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55883@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 11 10:31:02 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 1nzwWK-0008Xu-Gw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 10:31:00 +0200 Original-Received: from localhost ([::1]:59622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzwWJ-0006gU-3k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 04:30:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzwVP-0006ef-9d for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 04:30:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzwVP-0005t4-13 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 04:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzwVO-00049R-Q2 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 04:30: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: Sat, 11 Jun 2022 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 55883-submit@debbugs.gnu.org id=B55883.165493619715920 (code B ref 55883); Sat, 11 Jun 2022 08:30:02 +0000 Original-Received: (at 55883) by debbugs.gnu.org; 11 Jun 2022 08:29:57 +0000 Original-Received: from localhost ([127.0.0.1]:51824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzwVI-00048h-Cd for submit@debbugs.gnu.org; Sat, 11 Jun 2022 04:29:56 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:34484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzqQT-0001uL-Bx for 55883@debbugs.gnu.org; Fri, 10 Jun 2022 22:00:33 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id c21so658027wrb.1 for <55883@debbugs.gnu.org>; Fri, 10 Jun 2022 19:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lD7xJ0EYYqQm1DKMsiWDJJ/W9gD8Kf9l/OPdtDGwmFA=; b=bxIagmYtfPKJ8bPHjcH6pLq62JX/RghHybIxxjkLRPUTvtsrItETiWYnbAuNDfkrIU 0dutUKw8cMJyC0voJbFXlSq1odeYkIKtKIe8QVWmdwKN533+dSCED2dapEBACbkxSOcW CjXTZU2pHVSV6cgej1J+cQrI2i1i2ARN/xyR33fk5DF4WFdnKrPRF1GnfQMgPYuR/Czc sfpaYs0QUUwqP99sPqlOm28VaJBrQezSAnasnn5wLQdNYk+APo3TiR7C+LJfmyMnXmP2 XeY5/Zhkpdqa+71jo6aQcKwJJ4ujmQNuZocJrkpTLlBkaFk1JYpizfuopnp6tqpMuDFn MfEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lD7xJ0EYYqQm1DKMsiWDJJ/W9gD8Kf9l/OPdtDGwmFA=; b=O9BKNhhhA5NPArCkENeABG9usNYX8qjNaaFqzeVrSdSJkheKhACnftsaYco8s1mgPu yQzZB6eH2Q8VjEVgmnqt6cHq0shqTaorIwo46WQaxwUyoolcvLkRKttFpHlOawe7PYi5 6tFdQbNZKOcGgbSsMjppUDeQt2/8/xiv16svbTbP/gHjT+G2PfIcWvOxRTH8c2r+1Tgy CVzCIzx31VvpPsXFgZG/xiH0v2ZdROIkZPk3nj4RmuGYY0TuzjrLen3K7Otru1OEwkKe EOErF8ifp5OM+FCo5cfK2+lsxXP/DjM3dOaCosr9jQMKqoD1url0h3du6UHnTnMqX3Te 1+1A== X-Gm-Message-State: AOAM531uOXE2eDq2ZUJQx/mV3UfsoJ6L/J0ti8PgDv8BcCRB6HbsGXlr E3JMU/nt8v3L+zl0qpbFb6r2ou8A55R/zYr9AIly7g== X-Google-Smtp-Source: ABdhPJzVbuCKHbObiYwHB9nSPGF/PEjssrtjBDoUamjkMvh7RUzQqls/tOVY4Y2Wg7QGYIkAdfPzzAeJRHROLF9usOw= X-Received: by 2002:a5d:5581:0:b0:20f:fc51:7754 with SMTP id i1-20020a5d5581000000b0020ffc517754mr45666099wrv.413.1654912826979; Fri, 10 Jun 2022 19:00:26 -0700 (PDT) In-Reply-To: <834k0t104u.fsf@gnu.org> X-Mailman-Approved-At: Sat, 11 Jun 2022 04:29:55 -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:234255 Archived-At: --000000000000303c8d05e1226b58 Content-Type: text/plain; charset="UTF-8" Attached is an updated version that I believe addresses all the concerns raised on the mailing list. Given the changes don't split so cleanly into two any more, I've combined them into a single patch. Thanks! On Thu, Jun 9, 2022 at 11:52 PM Eli Zaretskii wrote: > > > Date: Thu, 9 Jun 2022 23:18:01 -0700 > > From: Duncan Findlay via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > 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 > > Thanks. > > However, the patches you posted seem to ignore the comments I made in > the above-mentioned discussions, specifically here: > > https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00134.html > > Did you send a wrong version of the patches, perhaps? --000000000000303c8d05e1226b58 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Support-select-active-regions-with-xterm.patch" Content-Disposition: attachment; filename="0001-Support-select-active-regions-with-xterm.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l4988c840 RnJvbSBiYzkwNmE4YTBjNjcxMjU4ODA0OTdjNDcyOWQ3OTQwZmE0YmE4YmY2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEdW5jYW4gRmluZGxheSA8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