Subject: Re: bug#11355: 24.1.50; Middle click on flyspell-mode fixes a word, but also paste text

From: emacs user <[email-masked]>
Date: Fri, 27 Apr 2012 19:59:39 -0700 (PDT)

On Thursday, April 26, 2012 10:59:47 PM UTC-4, Daniel de Angelis Cordeiro wrote:
> Yes. :(
> 
> I followed these steps:
> 
> 1. run `emacs -Q /tmp/non-existent-file.tex`;
> 2. wrote some text;
> 3. copied it (with alt+w);
> 4. run M-x flyspell-mode;
> 5. middle click in a misspelled word;
> 6. right click on one of the suggestions presented by the spell checker;
> 
> The expected result: the word should be replaced with the suggestion
> chose from the list
> Actual result: the corrected word, with the copied text in the middle
> of the word (the text is pasted in the middle of the word, on the
> point where I clicked with the middle button of the mouse).
> 
> 
> Thanks for your time,
> Daniel
> 
> 2012/4/26 Chong Yidong 
> > Daniel de Angelis Cordeiro  writes:
> >
> >> This is a minor (but annoying) bug.
> >> In order to correct a mispelled word in Flyspell-mode one must click
> >> with the middle-mouse button. Starting with emacs 24, the middle-click
> >> fixes the word but also pastes some text that was copied before. :(
> >
> >> In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.1)
> >>  of 2012-04-23 on charichuelo, modified by Debian
> >
> > I can't reproduce it either on current trunk (24.1.50) or the emacs-24
> > branch (24.0.95), (x86_64-unknown-linux-gnu, GTK+ Version 3.2.0).  Do
> > you see this bug happening with emacs -Q?

thanks for reporting this.  I have been seeing this bug for a long time now on the latest emacs from trunk, and also reported it, with a hopefully reproducible procedure starting with 
emacs -Q, please see
http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-10/msg00552.html
I'd be happy to test solutions or provide more info.
cheers, E