GNU bug report logs -
#17633
24.3.91; mouse-drag-line: Symbol's function definition is void: mouse--remap-link-click-p
Previous Next
Reported by: Christopher Schmidt <ch <at> ristopher.com>
Date: Thu, 29 May 2014 17:46:02 UTC
Severity: important
Found in version 24.3.91
Done: Christopher Schmidt <ch <at> ristopher.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17633 in the body.
You can then email your comments to 17633 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Thu, 29 May 2014 17:46:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Schmidt <ch <at> ristopher.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 May 2014 17:46:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -q
# Drag the mode line with the mouse.
mouse-drag-line: Symbol's function definition is void: mouse--remap-link-click-p
This is a regression.
In GNU Emacs 24.3.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
Repository revision: 117171 eliz <at> gnu.org-20140529164749-nz9x3hi1ipkv9cfk
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Thu, 29 May 2014 18:49:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
> emacs -q
> # Drag the mode line with the mouse.
> mouse-drag-line: Symbol's function definition is void: mouse--remap-link-click-p
Indeed, we have a call to that function, while I removed it a year ago.
Not sure how I managed not to notice that call. I do wonder tho: do you
have a recipe to reproduce the problem?
I tried to hit the bug, but wasn't able to (even after reading the code
and trying to infer the circumstances that would lead to it).
This is a piece of code that we should probably revisit, so having such
a recipe would help me understand how the code works.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Thu, 29 May 2014 19:08:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> I do wonder tho: do you have a recipe to reproduce the problem? I
> tried to hit the bug, but wasn't able to (even after reading the code
> and trying to infer the circumstances that would lead to it).
>> emacs -q
>> # Drag the mode line with the mouse.
That is my recipe.
FWIW there is another major bug:
emacs -q
# Click the mode line's buffer identification string ("*GNU Emacs*")
button-activate: Symbol's function definition is void: nil
This bug only occurs when point is on a character with a keymap. emacs
seems to use the keymap of the character at point rather than the one of
the character that was actually clicked at.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Thu, 29 May 2014 20:34:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
>>> emacs -q
>>> # Drag the mode line with the mouse.
> That is my recipe.
Hmm.... when I try that, I get a frame with a single window, so I can
try to drag the mode line, but it won't budge. And I don't get
any error.
So, I tried to add a C-x 2. I can then move the mode line, but then
again, I don't get any error.
Oh, wait, right, I see it now: I had used "emacs -Q" rather than "emacs -q".
Thanks.
> FWIW there is another major bug:
> emacs -q
> # Click the mode line's buffer identification string ("*GNU Emacs*")
> button-activate: Symbol's function definition is void: nil
> This bug only occurs when point is on a character with a keymap. emacs
> seems to use the keymap of the character at point rather than the one of
> the character that was actually clicked at.
Can you make it a separate bug-report?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Thu, 29 May 2014 20:48:01 GMT)
Full text and
rfc822 format available.
Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> FWIW there is another major bug:
>
>> emacs -q
>> # Click the mode line's buffer identification string ("*GNU Emacs*")
>> button-activate: Symbol's function definition is void: nil
>> This bug only occurs when point is on a character with a keymap.
>> emacs seems to use the keymap of the character at point rather than
>> the one of the character that was actually clicked at.
>
> Can you make it a separate bug-report?
AFAICS both issues are manifestations of the same bug because both of
them only come up if point is on a character with a dedicated keymap.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sat, 31 May 2014 12:36:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> AFAICS both issues are manifestations of the same bug because both of
> them only come up if point is on a character with a dedicated keymap.
Indeed, I installed the patch below which seems to fix them.
Can you confirm it fixes the problems you've seen?
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2014-05-31 01:01:19 +0000
+++ lisp/ChangeLog 2014-05-31 12:32:03 +0000
@@ -1,5 +1,8 @@
2014-05-31 Stefan Monnier <monnier <at> iro.umontreal.ca>
+ * mouse.el (mouse-posn-property): Ignore posn-point for mode-line
+ clicks (bug#17633).
+
* leim/quail/latin-pre.el ("latin-2-prefix"): Use ",," rather than ", "
for the single comma, since ", " is *very* common in normal French text
(bug#17643).
=== modified file 'lisp/mouse.el'
--- lisp/mouse.el 2014-05-18 22:53:27 +0000
+++ lisp/mouse.el 2014-05-31 12:30:47 +0000
@@ -658,7 +658,10 @@
(str (posn-string pos)))
(or (and str
(get-text-property (cdr str) property (car str)))
- (and pt
+ ;; FIXME: mouse clicks on the mode-line come with a position in
+ ;; (nth 5). Maybe we should change the C code instead so that
+ ;; mouse-clicks don't include a position there!
+ (and pt (not (memq (posn-area pos) '(mode-line header-line)))
(get-char-property pt property w))))
(get-char-property pos property)))
Reply sent
to
Christopher Schmidt <ch <at> ristopher.com>
:
You have taken responsibility.
(Sat, 31 May 2014 12:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Schmidt <ch <at> ristopher.com>
:
bug acknowledged by developer.
(Sat, 31 May 2014 12:56:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 17633-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> AFAICS both issues are manifestations of the same bug because both of
>> them only come up if point is on a character with a dedicated keymap.
>
> Indeed, I installed the patch below which seems to fix them. Can you
> confirm it fixes the problems you've seen?
The problems are gone now. Thanks a lot!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sat, 31 May 2014 13:01:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Sat, 31 May 2014 08:34:28 -0400
>
> 2014-05-31 Stefan Monnier <monnier <at> iro.umontreal.ca>
>
> + * mouse.el (mouse-posn-property): Ignore posn-point for mode-line
> + clicks (bug#17633).
> +
> * leim/quail/latin-pre.el ("latin-2-prefix"): Use ",," rather than ", "
> for the single comma, since ", " is *very* common in normal French text
> (bug#17643).
>
> === modified file 'lisp/mouse.el'
> --- lisp/mouse.el 2014-05-18 22:53:27 +0000
> +++ lisp/mouse.el 2014-05-31 12:30:47 +0000
> @@ -658,7 +658,10 @@
> (str (posn-string pos)))
> (or (and str
> (get-text-property (cdr str) property (car str)))
> - (and pt
> + ;; FIXME: mouse clicks on the mode-line come with a position in
> + ;; (nth 5). Maybe we should change the C code instead so that
> + ;; mouse-clicks don't include a position there!
> + (and pt (not (memq (posn-area pos) '(mode-line header-line)))
> (get-char-property pt property w))))
> (get-char-property pos property)))
Can you explain the problem in more detail? I'm afraid I don't
understand the problem with mouse clicks on mode line.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sat, 31 May 2014 14:57:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> Can you explain the problem in more detail? I'm afraid I don't
> understand the problem with mouse clicks on mode line.
I think the real fix (which I intend to install into trunk) is the
one below: including `point' in a mouse-click is simply incorrect since
the current position of point has nothing to do with the mouse event.
Stefan
=== modified file 'src/keyboard.c'
--- src/keyboard.c 2014-05-30 04:12:08 +0000
+++ src/keyboard.c 2014-05-31 13:42:02 +0000
@@ -5266,9 +5266,7 @@
&object, &dx, &dy, &width, &height);
if (STRINGP (string))
string_info = Fcons (string, make_number (charpos));
- textpos = (w == XWINDOW (selected_window)
- && current_buffer == XBUFFER (w->contents))
- ? PT : marker_position (w->pointm);
+ textpos = Qnil;
xret = wx;
yret = wy;
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sat, 31 May 2014 16:45:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 17633 <at> debbugs.gnu.org
> Date: Sat, 31 May 2014 10:55:54 -0400
>
> > Can you explain the problem in more detail? I'm afraid I don't
> > understand the problem with mouse clicks on mode line.
>
> I think the real fix (which I intend to install into trunk) is the
> one below: including `point' in a mouse-click is simply incorrect since
> the current position of point has nothing to do with the mouse event.
But why does it hurt to include the window's point in the click?
Other kinds of click on non-text parts do include some kind of
position, so why is this one a problem?
Btw, your patch won't compile, because 'textpos' is not a Lisp object.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sat, 31 May 2014 20:12:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> But why does it hurt to include the window's point in the click?
Because mouse-posn-property then checks the text-property at point.
> Other kinds of click on non-text parts do include some kind of
> position, so why is this one a problem?
Usually those positions are at least somewhat related to the position of
the mouse. But indeed mouse-posn-property should probably ignore the
posn-point info for the other non-text parts.
> Btw, your patch won't compile, because 'textpos' is not a Lisp object.
Yes, it was just to show the intention.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sun, 01 Jun 2014 02:42:01 GMT)
Full text and
rfc822 format available.
Message #40 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 17633 <at> debbugs.gnu.org
> Date: Sat, 31 May 2014 16:11:02 -0400
>
> > But why does it hurt to include the window's point in the click?
>
> Because mouse-posn-property then checks the text-property at point.
It shouldn't do that. This sounds like a problem with
mouse-posn-property rather than with make_lispy_position.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sun, 01 Jun 2014 14:20:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 17633 <at> debbugs.gnu.org (full text, mbox):
>> > But why does it hurt to include the window's point in the click?
>> Because mouse-posn-property then checks the text-property at point.
> It shouldn't do that. This sounds like a problem with
> mouse-posn-property rather than with make_lispy_position.
In the case of fringe clicks, I agree that these events's
buffer-position info is worthwhile and that mouse-posn-property should
ignore it, but in the case of mode-line clicks, the click is completely
unrelated to the particular position of point at that moment, os
including that info is just asking for trouble,
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sun, 01 Jun 2014 14:59:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 17633 <at> debbugs.gnu.org
> Date: Sun, 01 Jun 2014 10:18:57 -0400
>
> >> > But why does it hurt to include the window's point in the click?
> >> Because mouse-posn-property then checks the text-property at point.
> > It shouldn't do that. This sounds like a problem with
> > mouse-posn-property rather than with make_lispy_position.
>
> In the case of fringe clicks, I agree that these events's
> buffer-position info is worthwhile and that mouse-posn-property should
> ignore it, but in the case of mode-line clicks, the click is completely
> unrelated to the particular position of point at that moment, os
> including that info is just asking for trouble,
It's not necessarily unrelated. Imagine some feature that wants to
change the effect of such a click depending on point. There's nothing
especially hilarious about that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17633
; Package
emacs
.
(Sun, 01 Jun 2014 21:14:01 GMT)
Full text and
rfc822 format available.
Message #49 received at 17633 <at> debbugs.gnu.org (full text, mbox):
> It's not necessarily unrelated. Imagine some feature that wants to
> change the effect of such a click depending on point. There's nothing
> especially hilarious about that.
No, but there's no need for point to be included in the click event.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 30 Jun 2014 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.