--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id CC93B431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 18 Sep 2013 08:06:11 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id kGP3IkDmrghx for <notmuch@notmuchmail.org>;\r
+ Wed, 18 Sep 2013 08:06:03 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1BF2F431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 18 Sep 2013 08:06:03 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 08F151000B2;\r
+ Wed, 18 Sep 2013 18:05:57 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: emacs reply fills X clipboard with reply message body\r
+In-Reply-To: <m2y56uirtf.fsf@guru.guru-group.fi>\r
+References: <87vc1y6fbr.fsf@servo.finestructure.net>\r
+ <m2y56uirtf.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.16+86~g2d126a3 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 18 Sep 2013 18:05:56 +0300\r
+Message-ID: <m238p2jhkb.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 18 Sep 2013 15:06:12 -0000\r
+\r
+On Wed, Sep 18 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+\r
+> On Wed, Sep 18 2013, Jameson Graef Rollins <jrollins@finestructure.net> w=\r
+rote:\r
+>\r
+>> I've just started noticing that when I reply to messages from the emacs\r
+>> UI, my X clipboard is filled with the body of the reply message,\r
+>> displacing whatever was in there previously. I'm not sure if this is\r
+>> related to my personal emacs configuration, or some non-ideal way we're\r
+>> inserting body parts in replies. However, even if it is a configuration\r
+>> issue in my emacs, I suspect that there should be a better way to insert\r
+>> the reply body such that there's not even a possibility that it would\r
+>> leak into the users X clipboard, regardless of emacs settings. Any\r
+>> thoughts?\r
+\r
+I tracked this to notmuch-mua-reply -> message-cite-original -> mml-quote-r=\r
+egion\r
+\r
+\r
+In emacs "24.3.50.1" when I set mark, move point and do M-x\r
+mml-quote-region -- and then press middle mouse button, the text between\r
+point & mark are pasted.\r
+\r
+In emacs "23.4.1" this does not happen...\r
+\r
+mml-quote-region looks like:\r
+\r
+(defun mml-quote-region (beg end)\r
+ "Quote the MML tags in the region."\r
+ (interactive "r")\r
+ (save-excursion\r
+ (save-restriction\r
+ ;; Temporarily narrow the region to defend from changes\r
+ ;; invalidating END.\r
+ (narrow-to-region beg end)\r
+ (goto-char (point-min))\r
+ ;; Quote parts.\r
+ (while (re-search-forward\r
+ "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" nil =\r
+t)\r
+ ;; Insert ! after the #.\r
+ (goto-char (+ (match-beginning 0) 2))\r
+ (insert "!")))))\r
+\r
+\r
+So, some magic emacs feature ?\r
+\r
+Attempted to shadow this by setting x-select-enable-* values\r
+to nil but no effect...\r
+\r
+\r
+Does others experience the same behaviour. Am I missing something here ?\r
+\r
+>\r
+> env -u DISPLAY emacs -f notmuch ;)\r
+>\r
+>\r
+> .. OK, I'm marking this as a bug -- I witness the same behaviour.\r
+>\r
+> Originally I thought this relates directly to the fact that mark\r
+> is set at the end of quoted text and (point) is at the beginning of\r
+> buffer -- so that simple c-w can be used to remove the contents in\r
+> case desired... but the X paste provides the original text, not the\r
+> quoted one.\r
+>\r
+> Someone=E2=84=A2 has to dig (deeper) into the code for this...\r
+>\r
+>> jamie.\r
+>\r
+> Tomi\r
+\r
+Tomi\r