Quantcast
Channel: Active questions tagged help - Emacs Stack Exchange
Viewing all articles
Browse latest Browse all 40

Which command is triggered by a button?

$
0
0

When one wants to know which command is triggered by a keybinding, there is C-h k.

Is there a way to know which command is triggered by a click on a button?

For example, in notmuch-hello, I would like to know which command is triggered when I click on clear (Recent searches) to create a keybinding.

C-h k+ click on clear only says that it invokes a widget, not what command the widget triggers.

There were several key-sequences:

at that spot runs the command widget-button-click
at that spot runs the command mouse-set-point

They're all described below.

at that spot runs the command widget-button-click(found in notmuch-hello-mode-map), which is an interactivebyte-compiled Lisp function in ‘wid-edit.el’.

It is bound to and .

(widget-button-click EVENT)

Invoke the button that the mouse is pointing at.

at that spot runs the command mouse-set-point (found inglobal-map), which is an interactive byte-compiled Lisp function in‘mouse.el’.

It is bound to and C-M-.

(mouse-set-point EVENT &optional PROMOTE-TO-REGION)

Move point to the position clicked on with the mouse. This should bebound to a mouse click event type. If PROMOTE-TO-REGION is non-nil andevent is a multiple-click, select the corresponding element aroundpoint, with the resulting position of point determined by‘mouse-select-region-move-to-beginning’.

Probably introduced at or before Emacs version 22.1.

C-h o notmuch-hello-mode-map:

notmuch-hello-mode-map is a variable defined in ‘notmuch-hello.el’.

Its value is shown below.

Keymap for "notmuch hello" buffers.

This variable may be risky if used as a file-local variable.

Value:

(keymap (keymap  (4 . notmuch-hello-mode-transient)  (15 . notmuch-hello-mode-transient)  (32 . mda-pre-key)  (120 . notmuch-bury-or-kill-this-buffer)  (remap keymap     (notmuch-tag-undo . undo))) (keymap  (13 . widget-button-press)  (down-mouse-1 . widget-button-click)  (down-mouse-2 . widget-button-click)  (backtab . widget-backward)  (S-tab . widget-backward)  (27 keymap      (9 . widget-backward))  (9 . widget-forward)) keymap (remap keymap    (undo . notmuch-tag-undo)) (106 . notmuch-search-transient) (71 . notmuch-poll-and-refresh-this-buffer) (27 keymap     (61 . notmuch-refresh-all-buffers)) (61 . notmuch-refresh-this-buffer) (103 . notmuch-refresh-this-buffer) (109 . notmuch-mua-new-mail) (117 . notmuch-unthreaded) (122 . notmuch-tree) (116 . notmuch-search-by-tag) (115 . notmuch-search) (113 . notmuch-bury-or-kill-this-buffer) (118 . notmuch-version) (63 . notmuch-help))

Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>