all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Matthew Woodcraft <matthew@woodcraft.me.uk>
Cc: 18212@debbugs.gnu.org
Subject: bug#18212: 24.3.92; Left-click on a button is treated as mouse-2
Date: Thu, 07 Aug 2014 09:08:21 -0400	[thread overview]
Message-ID: <jwv61i48n8a.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87vbq5nypa.fsf@golux.woodcraft.me.uk> (Matthew Woodcraft's message of "Wed, 06 Aug 2014 21:35:29 +0100")

> If click with my left mouse button (normally mouse-1) on "button" text,
> Emacs appears to think I clicked mouse-2 (normally the middle button).

This is normal: it's because of mouse-1-click-follows-link and because
the button has the `follow-link' property.

> Recipe to reproduce:

> emacs -Q --exec "(global-set-key (kbd \"<down-mouse-2>\") 'clipboard-yank)" --exec "(info)"

> Left-click on one of the hyperlinks.

> Emacs says
>   Buffer is read-only: #<buffer *info*>
> rather than following the hyperlink.

But that is indeed a bug.  I guess the button should locally bind
`down-mouse-2' to override the global binding.

But, in any case I recommend you bind clipboard-yank to `mouse-2' rather
than to `down-mouse-2' since you otherwise get a "double yank" behavior
(a mouse-2 click will first run clipboard-yank because of the
down-mouse-2 binding and then will run mouse-yank-primary because it's
bound to mouse-2).


        Stefan





  parent reply	other threads:[~2014-08-07 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 20:35 bug#18212: 24.3.92; Left-click on a button is treated as mouse-2 Matthew Woodcraft
2014-08-06 23:59 ` Glenn Morris
2014-08-07 13:08 ` Stefan Monnier [this message]
2014-08-07 18:36 ` Stefan Monnier
2014-08-07 21:02   ` Matthew Woodcraft
2014-08-08  2:28     ` Stefan Monnier
2014-08-08 18:38       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=jwv61i48n8a.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=18212@debbugs.gnu.org \
    --cc=matthew@woodcraft.me.uk \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.