From f36a84498eff8bc2deebf4f2476b9f1586f000e5 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Wed, 18 Sep 2013 23:28:03 +0100 Subject: [PATCH] Re: emacs reply fills X clipboard with reply message body --- 3c/c23758c744e00dda1228e2596de4e88ab7bf63 | 134 ++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 3c/c23758c744e00dda1228e2596de4e88ab7bf63 diff --git a/3c/c23758c744e00dda1228e2596de4e88ab7bf63 b/3c/c23758c744e00dda1228e2596de4e88ab7bf63 new file mode 100644 index 000000000..27d5a0ca2 --- /dev/null +++ b/3c/c23758c744e00dda1228e2596de4e88ab7bf63 @@ -0,0 +1,134 @@ +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 9F095431FAF + for ; Wed, 18 Sep 2013 15:28:24 -0700 (PDT) +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 2x7Dz0FcD3DB for ; + Wed, 18 Sep 2013 15:28:20 -0700 (PDT) +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 F0862431FAE + for ; Wed, 18 Sep 2013 15:28:19 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1VMQEA-0000PA-6T; Wed, 18 Sep 2013 23:28:08 +0100 +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 1VMQE9-000187-7A; Wed, 18 Sep 2013 23:28:05 +0100 +From: Mark Walters +To: Tomi Ollila , + Jameson Graef Rollins , + Notmuch Mail +Subject: Re: emacs reply fills X clipboard with reply message body +In-Reply-To: +References: <87vc1y6fbr.fsf@servo.finestructure.net> + +User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 18 Sep 2013 23:28:03 +0100 +Message-ID: <87hadh934c.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 9bae1ebdc45f48385485aecf1e9eca38 (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: Wed, 18 Sep 2013 22:28:24 -0000 + + +I have looked at this but haven't fully worked out what is going on. + +Tomi found (on irc) that putting a (select-active-regions nil) to line +212 of notmuch-mua.el solves the problem. + +My testing shows that putting a (let ((select-active-regions nil)) +around the lines 224-227 in notmuch-mua.el also solves the problem. + +However, when trying to narrow the problem I see some odd behaviour: if +you put the let just around the message-cite-original line then the +following happens: + +if the primary selection is in some non-emacs window (eg an xterm) then +the bug does not show up but if the primary selection is in the emacs +window and then you initiate the reply then the bug does show up.=20 + +We could just try one of the above two fixes but it could be papering +over something. + +Best wishes + +Mark + + + + +On Wed, 18 Sep 2013, Tomi Ollila wrote: +> On Wed, Sep 18 2013, Jameson Graef Rollins w= +rote: +> +>> I've just started noticing that when I reply to messages from the emacs +>> UI, my X clipboard is filled with the body of the reply message, +>> displacing whatever was in there previously. I'm not sure if this is +>> related to my personal emacs configuration, or some non-ideal way we're +>> inserting body parts in replies. However, even if it is a configuration +>> issue in my emacs, I suspect that there should be a better way to insert +>> the reply body such that there's not even a possibility that it would +>> leak into the users X clipboard, regardless of emacs settings. Any +>> thoughts? +> +> env -u DISPLAY emacs -f notmuch ;) +> +> +> .. OK, I'm marking this as a bug -- I witness the same behaviour. +> +> Originally I thought this relates directly to the fact that mark +> is set at the end of quoted text and (point) is at the beginning of +> buffer -- so that simple c-w can be used to remove the contents in +> case desired... but the X paste provides the original text, not the +> quoted one. +> +> Someone=E2=84=A2 has to dig (deeper) into the code for this... +> +>> jamie. +> +> Tomi +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2