Re: emacs reply fills X clipboard with reply message body

Subject: Re: emacs reply fills X clipboard with reply message body

Date: Wed, 18 Sep 2013 23:28:03 +0100

To: Tomi Ollila, Jameson Graef Rollins, Notmuch Mail

Cc:

From: Mark Walters


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. 

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 <tomi.ollila@iki.fi> wrote:
> On Wed, Sep 18 2013, Jameson Graef Rollins <jrollins@finestructure.net> 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ā„¢ has to dig (deeper) into the code for this...
>
>> jamie.
>
> Tomi
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Thread: