unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Jameson Graef Rollins <jrollins@finestructure.net>,
	Mark Walters <markwalters1009@gmail.com>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: do not put quoted reply in primary selection
Date: Sun, 17 Nov 2013 21:42:40 +0200	[thread overview]
Message-ID: <m2eh6e7r2n.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87siuu95uy.fsf@servo.finestructure.net>

On Sun, Nov 17 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:

> On Sun, Nov 17 2013, Mark Walters <markwalters1009@gmail.com> 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). 

I don't see how this could break thinks, So I think this is important
enough th be included in 0.17 

> jamie.

Tomi

  reply	other threads:[~2013-11-17 19:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17 12:04 [PATCH] emacs: do not put quoted reply in primary selection Mark Walters
2013-11-17 19:37 ` Jameson Graef Rollins
2013-11-17 19:42   ` Tomi Ollila [this message]
2013-11-17 20:41     ` Mark Walters
2013-11-20  0:59 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2eh6e7r2n.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=jrollins@finestructure.net \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).