Subject: bug#20760: 24.4; Middle click on flyspell-highlighted but correct word does mouse-yank-primary

From: Reuben Thomas <[email-masked]>
Date: Sun, 07 Jun 2015 18:18:09 +0100

When a flyspell-marked word is added to the dictionary, or to the
buffer-local LocalWords list, other instances of the word in the buffer
are not immediately unmarked.

However, if one clicks mouse-2 on such a word, the expected flyspell
menu does not pop up; instead, mouse-2 reverts to its default action
(typically, mouse-yank-primary).

To see this effect, type for example M-x flyspell-mode:

foxb foxz foxb

in a buffer, then mouse-2 on the first “foxb”, and “Accept for session”.
The second “foxb” remains highlighted, but mouse-2 on it runs
mouse-yank-primary, even though the word is highlighted on mouseover.

There’s another, similar oddity, which is that clicking on a repeated,
highlighted word, such as the second “this” in:

this this

gives the message “<mouse-2> is undefined”, which looks like a
semi-successful attempt to correct the above-mentioned problem in
another guise.

In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2014-11-21 on skwd, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.2 LTS

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LC_MONETARY: en_GB.UTF-8
  value of $LC_NUMERIC: en_GB.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  magit-auto-revert-mode: t
  diff-auto-refine-mode: t
  org-indent-mode: t
  window-margin-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  shell-dirtrack-mode: t
  buffer-face-mode: t
  flyspell-mode: t
  goto-address-mode: t
  smart-quotes-mode: t
  show-paren-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  icomplete-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-whitespace-mode: t
  ido-everywhere: t
  dtrt-indent-mode: t
  global-auto-complete-mode: t
  eldoc-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> z <right> <left> <backspace> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> C-_ C-_ C-_ <end> <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> 
<double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> 
<double-mouse-1> <triple-down-mouse-1> <triple-mouse-1> 
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-3> 
<mouse-3> <down-mouse-2> <help-echo> <down-mouse-2> 
<help-echo> <down-mouse-2> <help-echo> <down-mouse-2> 
<help-echo> <down-mouse-2> <help-echo> <help-echo> 
<down-mouse-2> <down-mouse-4> <mouse-4> <down-mouse-5> 
<mouse-5> <double-down-mouse-5> <double-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <help-echo> <down-mouse-2> <down-mouse-1> 
<mouse-1> <help-echo> <down-mouse-2> <mouse-2> C-_ 
<down-mouse-5> <mouse-5> <double-down-mouse-5> <double-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <down-mouse-5> 
<mouse-5> <double-down-mouse-5> <double-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <help-echo> 
<down-mouse-1> <mouse-1> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <help-echo> <down-mouse-2> 
<help-echo> <down-mouse-2> <help-echo> <down-mouse-2> 
<mouse-2> <help-echo> C-_ <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <up> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<help-echo> <down-mouse-2> <help-echo> <down-mouse-2> 
<help-echo> <help-echo> <up> <up> <up> <up> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <up> <left> <up> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <help-echo> 
<down-mouse-1> <mouse-1> C-x C-s M-x r e p o r t - 
e m a c s - b u g <return>

Recent messages:
Mark set
byte-code: End of buffer [3 times]
Mark set
End of buffer [30 times]
Auto-saving...done
Saving file /home/rrt/Work/Parsec/Dropbox (Parsec)/ProjectCamgenShare/Phase4/Reuben/Daybook.org...
Wrote /home/rrt/.emacs.d/undo-tree/.!home!rrt!Work!Parsec!Dropbox (Parsec)!ProjectCamgenShare!Phase4!Reuben!Daybook.org.~undo-tree~
Wrote /home/rrt/Work/Parsec/Dropbox (Parsec)/ProjectCamgenShare/Phase4/Reuben/Daybook.org
Initializing asynchronous export process
Wrote /home/rrt/Work/Parsec/Dropbox (Parsec)/ProjectCamgenShare/Phase4/Reuben/Daybook.org

Load-path shadows:
/home/rrt/.emacs.d/el-get/xrdb-mode/xrdb-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/xrdb-mode
/home/rrt/.emacs.d/el-get/csv-mode/csv-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/csv-mode
/home/rrt/.emacs.d/el-get/quack/quack hides /usr/share/emacs24/site-lisp/emacs-goodies-el/quack
/home/rrt/.emacs.d/el-get/markdown-mode/markdown-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/markdown-mode
/home/rrt/.emacs.d/el-get/filladapt/filladapt hides /usr/share/emacs24/site-lisp/emacs-goodies-el/filladapt
/home/rrt/.emacs.d/el-get/graphviz-dot-mode/graphviz-dot-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/graphviz-dot-mode
/home/rrt/.emacs.d/el-get/browse-kill-ring/browse-kill-ring hides /usr/share/emacs24/site-lisp/emacs-goodies-el/browse-kill-ring
/home/rrt/.emacs.d/el-get/apache-mode/apache-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/apache-mode
/usr/share/emacs/24.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/rrt/.local/share/emacs/site-lisp/lilypond-mode hides /usr/share/emacs/site-lisp/lilypond-mode
/home/rrt/.local/share/emacs/site-lisp/lilypond-what-beat hides /usr/share/emacs/site-lisp/lilypond-what-beat
/usr/share/emacs/24.4/site-lisp/cdargs hides /usr/share/emacs/site-lisp/cdargs
/home/rrt/.emacs.d/el-get/cmake-mode/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/home/rrt/.local/share/emacs/site-lisp/lilypond-init hides /usr/share/emacs/site-lisp/lilypond-init
/home/rrt/.local/share/emacs/site-lisp/lilypond-song hides /usr/share/emacs/site-lisp/lilypond-song
/home/rrt/.local/share/emacs/site-lisp/lilypond-indent hides /usr/share/emacs/site-lisp/lilypond-indent
/home/rrt/.local/share/emacs/site-lisp/lilypond-font-lock hides /usr/share/emacs/site-lisp/lilypond-font-lock
/home/rrt/.local/share/emacs/site-lisp/whitespace hides /usr/share/emacs/24.4/lisp/whitespace
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.4/lisp/textmodes/rst
/home/rrt/.emacs.d/el-get/flymake/flymake hides /usr/share/emacs/24.4/lisp/progmodes/flymake
/home/rrt/.emacs.d/el-get/cperl-mode/cperl-mode hides /usr/share/emacs/24.4/lisp/progmodes/cperl-mode

Features:
(shadow sort mail-extr emacsbug sgml-mode eieio-opt ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html ox-ascii
ox-publish ox smerge-mode magit-key-mode magit view grep epa epg
diff-mode git-rebase-mode git-commit-mode log-edit message sendmail
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log dired-aux tramp-cache tramp-sh
tramp tramp-compat tramp-loaddefs trampver misearch multi-isearch
mule-util latexenc preview prv-emacs latex tex-style yaml-mode tern
url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
url-gw json js3-mode imenu js3-parse js3-browse js3-highlight js3-ast
js3-messages js3-scan js3-util js3-vars cc-langs js3-externs org-element
org-indent org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m
adaptive-wrap window-margin font-latex plain-tex tex-buf tex dbus xml
crm tex-mode shell gitignore-mode conf-mode face-remap flyspell ispell
goto-addr smart-quotes flymake compile paredit info tex-site
sws-mode-autoloads server paren savehist minibuf-eldef icomplete
autorevert filenotify desktop frameset cus-start cus-load iimage org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint
ansi-color ob-core ob-eval org-compat org-macs org-loaddefs format-spec
find-func cal-menu calendar cal-loaddefs go-mode url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap ffap thingatpt url-parse auth-source gnus-util mm-util
mail-prsvr password-cache url-vars dired-x bug-reference-github
bug-reference vc-git undo-tree diff whitespace locate yasnippet derived
po-mode php-mode etags ring cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs speedbar sb-image ezimage
dframe init-paredit ido-hacks ido magit-autoloads geiser-load geiser
flymake-point filladapt dtrt-indent csv auto-complete-config
auto-complete edmacro kmacro popup init-eldoc eldoc-extension cl-macs
advice eldoc .loaddefs eieio byte-opt eieio-core el-get
el-get-autoloading el-get-list-packages el-get-dependencies el-get-build
el-get-status pp el-get-methods el-get-fossil el-get-svn el-get-pacman
el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar
el-get-hg el-get-go el-get-git-svn el-get-fink el-get-emacswiki
el-get-http el-get-notify help-mode easymenu el-get-emacsmirror
el-get-github el-get-git el-get-elpa package epg-config el-get-darcs
el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get
el-get-recipes el-get-byte-compile el-get-custom el-get-core autoload
help-fns lisp-mnt bytecomp byte-compile cconv cl gv cl-loaddefs cl-lib
dired user-site-loaddefs debian-el debian-el-loaddefs emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el
dpkg-dev-el-loaddefs devhelp time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 759041 77846)
 (symbols 48 57796 0)
 (miscs 40 12815 3026)
 (strings 32 204871 11478)
 (string-bytes 1 6491246)
 (vectors 16 71135)
 (vector-slots 8 1939329 75454)
 (floats 8 363 825)
 (intervals 56 21205 11512)
 (buffers 960 58)
 (heap 1024 103512 11169))

-- 
http://rrt.sc3d.org/