From 93dfc2820cd6f0ae6aeb2e36021dcb6114a5e415 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sun, 17 Nov 2013 20:41:19 +0000 Subject: [PATCH] Re: [PATCH] emacs: do not put quoted reply in primary selection --- ea/2a093b803e7a590575eef27e3925ccb22434ae | 119 ++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 ea/2a093b803e7a590575eef27e3925ccb22434ae diff --git a/ea/2a093b803e7a590575eef27e3925ccb22434ae b/ea/2a093b803e7a590575eef27e3925ccb22434ae new file mode 100644 index 000000000..16c339eda --- /dev/null +++ b/ea/2a093b803e7a590575eef27e3925ccb22434ae @@ -0,0 +1,119 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 8FF5F431FD4 + for ; Sun, 17 Nov 2013 12:41:47 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id SbPtB3-+cL4K for ; + Sun, 17 Nov 2013 12:41:40 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E99AD431FAF + for ; Sun, 17 Nov 2013 12:41:39 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1Vi99l-00030w-0D; Sun, 17 Nov 2013 20:41:21 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1Vi99k-00035J-LO; Sun, 17 Nov 2013 20:41:20 +0000 +From: Mark Walters +To: Tomi Ollila , + Jameson Graef Rollins , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: do not put quoted reply in primary selection +In-Reply-To: +References: <1384689849-9388-1-git-send-email-markwalters1009@gmail.com> + <87siuu95uy.fsf@servo.finestructure.net> + +User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sun, 17 Nov 2013 20:41:19 +0000 +Message-ID: <878uwmvk0g.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 116b825651404d31647c9062f25b1151 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 17 Nov 2013 20:41:47 -0000 + + +On Sun, 17 Nov 2013, Tomi Ollila wrote: +> On Sun, Nov 17 2013, Jameson Graef Rollins wrote: +> +>> On Sun, Nov 17 2013, Mark Walters wrote: +>>> In current emacs (24.3) select-active-regions is set to t by +>>> default. The reply insertion code sets the region to the quoted +>>> message to make it easy to delete (kill-region or C-w). These two +>>> things combine to put the quoted message in the primary selection. +>>> +>>> This is not what the user wanted and is a privacy risk (accidental +>>> pasting of the quoted message). We can avoid some of the problems +>>> by let-binding select-active-regions to nil. This fixes if the +>>> primary selection was previously in a non-emacs window but not if +>>> it was in an emacs window. To avoid the problem in the latter case +>>> we deactivate mark. +>>> +>>> One key test (which fails under many simpler "fixes") is: open emacs +>>> 24.3 with notmuch, open 2 windows (viewing different notmuch buffers), +>>> highlight some text in one, and then reply to a message in the +>>> other. In many of my earlier attempts to fix this big this test fails. +>> +>> I'm very happy to report that I reply to this message with an unpolluted +>> paste buffer! Kudos Mark! +>> +>>> Anyway, this is the best I can manage! +>> +>> Too modest for such an achievement. +>> +>> +10 +> +> This works for me too (and tests pass). + +That's great. + +> I don't see how this could break thinks, So I think this is important +> enough th be included in 0.17 + + +I think the only thing that could break is the ability to cut the quoted +message with kill-region/ctrl-w. That is probably minor enough that we +do not need to worry too much. + +Best wishes + +Mark -- 2.26.2