From 37a9c882b494d19684881ab2ce6ab095cecca530 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 19 Sep 2013 09:28:04 +0300 Subject: [PATCH] Re: emacs reply fills X clipboard with reply message body --- ad/24c8d6fc8a289b02789fa34c5510e008db45d3 | 149 ++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 ad/24c8d6fc8a289b02789fa34c5510e008db45d3 diff --git a/ad/24c8d6fc8a289b02789fa34c5510e008db45d3 b/ad/24c8d6fc8a289b02789fa34c5510e008db45d3 new file mode 100644 index 000000000..02701201c --- /dev/null +++ b/ad/24c8d6fc8a289b02789fa34c5510e008db45d3 @@ -0,0 +1,149 @@ +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 4552B431FBC + for ; Wed, 18 Sep 2013 23:28:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 4uTV3+x-hAdl for ; + Wed, 18 Sep 2013 23:28:15 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8F212431FAE + for ; Wed, 18 Sep 2013 23:28:14 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id CEF411000B2; + Thu, 19 Sep 2013 09:28:04 +0300 (EEST) +From: Tomi Ollila +To: Mark Walters , + Jameson Graef Rollins , + Notmuch Mail +Subject: Re: emacs reply fills X clipboard with reply message body +In-Reply-To: <87hadh934c.fsf@qmul.ac.uk> +References: <87vc1y6fbr.fsf@servo.finestructure.net> + <87hadh934c.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.16+86~g2d126a3 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +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: Thu, 19 Sep 2013 06:28:28 -0000 + +On Thu, Sep 19 2013, Mark Walters wrote: + +> 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. + +You found that it was select-active-regions what to try ... + +> 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. + +Yes, such duct-taping something is probably not the best approach; +we could use that as a "temporary" solution but you know what happens +with these "temporary" solutions. + +Also, doing these ad-hoc testing switching between emacs 23 & 24 and +something doing "mouse-draggin" or "shift-selection" (*) and other=20 +times C-SPC and then moving cursor (and forgetting which approach is +tried get things confusing). + +(*) mouse-dragging & shift-selection taken from the documentation string +of variable select-active-regions. It seems that 'only is the value=20 +I personally want to use there.... + +... have to try the 'only option -- and also disabling transient-mark-mode +-- how to do that is a question (the docstring is a bit confusing and it +seems although I have (transient-mark-mode t) it is enabled -- how to +know transient-mark-mode is enabled is also a bit of mystery to me :/ + + +Forget my mml-quote-reqion -comment in my previous mail. although the +diagnose was wrong the cure was working ;/ + + +> Best wishes +> +> Mark + +Tomi + +> +> +> +> +> On Wed, 18 Sep 2013, Tomi Ollila wrote: +>> On Wed, Sep 18 2013, Jameson Graef Rollins = +wrote: +>> +>>> 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 +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2