GNU bug report logs -
#13560
24.2.92; tabulated-list header buttons are broken
Previous Next
Reported by: Jonas Bernoulli <jonas <at> bernoul.li>
Date: Sat, 26 Jan 2013 18:32:02 UTC
Severity: important
Tags: confirmed, help
Found in version 24.2.92
Fixed in version 24.2.93
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Starting with 24.2.92 clicking on a column button created by a
Tabulated-List mode derived mode does not sort correctly anymore.
When clicking the first time the order should not be reversed, but it
is. Clicking some more does not change the order, it stays reversed. I
looked into why this is so and noticed that the command the mouse event
is bound to is actually called twice.
Thinking that for some reason clicking on the button on the header-line
generates two events I modified tabulated-list-sort-button-map to only
contain a binding for [header-line mouse-1]. Then I clicked again with
the mouse button 1 and got the following warning in the echo area:
,----
| <header-line> <mouse-2> is undefined
`----
It mentions mouse-2 even though I pressed mouse-1. Also the message did
not appear in *Messages* and I could not get a backtrace after turning
on debug-on-error.
To check whether this is specific to Tabulated-List mode I tried the
following:
,----
| (setq header-line-format
| (propertize "button"
| 'keymap (let ((map (make-sparse-keymap)))
| (define-key map [header-line mouse-1]
| (lambda (e)
| (interactive "e")
| (message "%s" e)))
| map)))
`----
Here everything works as expected: I don't get a warning about mouse-2
not being undefined, the command is only called once and it reports that
mouse-1 was pressed.
Jonas
This bug report was last modified 12 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.