unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
@ 2014-06-30 22:13 Barry OReilly
  2014-06-30 22:34 ` Michael Heerdegen
  2014-07-01  1:24 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Barry OReilly @ 2014-06-30 22:13 UTC (permalink / raw)
  To: 17887

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

To reproduce on latest emacs-24 branch:

  mkdir /tmp/foo.d
  emacs -Q /tmp

Dired mode creates links out of the directory names, such as foo.d.
C-h k then mouse-1 (ie left) click on a link. See:

  <mouse-2> (translated from <down-mouse-2> <mouse-2>) at that spot runs
  the command mouse-yank-primary, which is an interactive compiled Lisp

But if you C-h k then mouse-1 click where there is no link, see:

  <down-mouse-1> (translated from <down-mouse-1> <down-mouse-1>) at that
  spot runs the command mouse-drag-region, which is an interactive

Though this doesn't create an issue in Dired, it is causing another
Emacs package I use (unreleased) to paste text instead of doing what
it used to do in Emacs 24.3, which is to show its own context menu.

Why would C-h k mouse-1 say anything about mouse-2?

In GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2014-06-27 on REDACTED
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description:    Ubuntu 12.04.4 LTS

[-- Attachment #2: Type: text/html, Size: 1192 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-06-30 22:13 bug#17887: Regression: mouse-1 click on link does mouse-2 instead Barry OReilly
@ 2014-06-30 22:34 ` Michael Heerdegen
  2014-06-30 23:27   ` Barry OReilly
  2014-07-01  1:24 ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2014-06-30 22:34 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 17887

Hi Barry,

I'm not sure whether there was any change related to that, but AFAIK,
what you describe is expected.  See (info "(elisp) Clickable Text"), and
especially `mouse-1-click-follows-link`.

Would it solve your problem when your mode (locally) binds
`mouse-1-click-follows-link` to nil?

Michael.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-06-30 22:34 ` Michael Heerdegen
@ 2014-06-30 23:27   ` Barry OReilly
  2014-06-30 23:42     ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Barry OReilly @ 2014-06-30 23:27 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 17887

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

> Would it solve your problem when your mode (locally) binds
> `mouse-1-click-follows-link` to nil?

No, in this case mouse-1 does nothing but relocate point.

I Git bisected the regression to:

25573f61f9eaf1631c03d16486ffc17fd9b18503 is the first bad commit
commit 25573f61f9eaf1631c03d16486ffc17fd9b18503
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Fri Mar 8 23:15:53 2013 -0500

    Separate mouse-1-click-follows-link from mouse-drag-region.
    * lisp/mouse.el (mouse--down-1-maybe-follows-link): New function.
    (key-translation-map): Use it to implement mouse-1-click-follows-link.
    (mouse-drag-line, mouse-drag-track): Remove mouse-1-click-follows-link
code.
    (mouse--remap-link-click-p): Remove.
    * src/keyboard.c (access_keymap_keyremap): Accept nil return value from
    functions to mean "no change".
    * src/keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
    (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
    from Elisp via unread-command-events.

[-- Attachment #2: Type: text/html, Size: 1225 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-06-30 23:27   ` Barry OReilly
@ 2014-06-30 23:42     ` Michael Heerdegen
  2014-06-30 23:54       ` Barry OReilly
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2014-06-30 23:42 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 17887

Barry OReilly <gundaetiapo@gmail.com> writes:

> > Would it solve your problem when your mode (locally) binds
> > `mouse-1-click-follows-link` to nil?
>
> No, in this case mouse-1 does nothing but relocate point.

Which is what mouse-1 normally does.  I don't understand where there is
a bug.

Michael.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-06-30 23:42     ` Michael Heerdegen
@ 2014-06-30 23:54       ` Barry OReilly
  0 siblings, 0 replies; 7+ messages in thread
From: Barry OReilly @ 2014-06-30 23:54 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 17887

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

> I don't understand where there is a bug.

In Emacs 24.3:

  Left click: brings up the minor mode's context menu
  Middle click: pastes ("yanks" in Emacs terminology)

In Emacs 24.3.90:

  Left click: pastes ("yanks" in Emacs terminology)
  Middle click: pastes ("yanks" in Emacs terminology)

[-- Attachment #2: Type: text/html, Size: 401 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-06-30 22:13 bug#17887: Regression: mouse-1 click on link does mouse-2 instead Barry OReilly
  2014-06-30 22:34 ` Michael Heerdegen
@ 2014-07-01  1:24 ` Stefan Monnier
  2014-08-21  1:45   ` Barry OReilly
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2014-07-01  1:24 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 17887

> Though this doesn't create an issue in Dired, it is causing another
> Emacs package I use (unreleased) to paste text instead of doing what
> it used to do in Emacs 24.3, which is to show its own context menu.

The translation from mouse-1 to mouse-2 (controlled on the user-side by
mouse-1-click-follows-link) depends on the presence of a follow-link
property or binding (see Elisp manual for details).

> Why would C-h k mouse-1 say anything about mouse-2?

Because the place where the mouse-1 click happened has a `follow-link'
property or binding which tells Emacs that this is a place where mouse-1
could be turned into a mouse-2 (depending on
mouse-1-click-follows-link).

So you should try and figure out why there is such a `follow-link'
property or binding at a place where you don't want the
mouse-1-to-mouse-2 translation to take place.

And yes, the implementation of the feature was changed, so your problem
was apparently masked in previous versions of Emacs and is now exposed.


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17887: Regression: mouse-1 click on link does mouse-2 instead
  2014-07-01  1:24 ` Stefan Monnier
@ 2014-08-21  1:45   ` Barry OReilly
  0 siblings, 0 replies; 7+ messages in thread
From: Barry OReilly @ 2014-08-21  1:45 UTC (permalink / raw)
  Cc: 17887-done

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

This problem went away at some point between emacs-24.3.92 and today's head
of the emacs-24 branch. debbugs.gnu.org/18212 ? Closing.

[-- Attachment #2: Type: text/html, Size: 209 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-21  1:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 22:13 bug#17887: Regression: mouse-1 click on link does mouse-2 instead Barry OReilly
2014-06-30 22:34 ` Michael Heerdegen
2014-06-30 23:27   ` Barry OReilly
2014-06-30 23:42     ` Michael Heerdegen
2014-06-30 23:54       ` Barry OReilly
2014-07-01  1:24 ` Stefan Monnier
2014-08-21  1:45   ` Barry OReilly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).