unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13560: 24.2.92; tabulated-list header buttons are broken
@ 2013-01-26 18:31 Jonas Bernoulli
  2013-01-27  2:52 ` Glenn Morris
  2013-01-28 17:11 ` Glenn Morris
  0 siblings, 2 replies; 10+ messages in thread
From: Jonas Bernoulli @ 2013-01-26 18:31 UTC (permalink / raw)
  To: 13560

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






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

end of thread, other threads:[~2013-01-31 16:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26 18:31 bug#13560: 24.2.92; tabulated-list header buttons are broken Jonas Bernoulli
2013-01-27  2:52 ` Glenn Morris
2013-01-28  1:36   ` Glenn Morris
2013-01-30  1:27     ` Glenn Morris
2013-01-30 16:05       ` martin rudalics
2013-01-30 17:18         ` Glenn Morris
2013-01-31 16:04           ` Jonas Bernoulli
2013-01-30 19:28       ` Stefan Monnier
2013-01-28 17:11 ` Glenn Morris
2013-01-29  3:11   ` Glenn Morris

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).