Action Buttons
Explicit buttons all use the same syntax and store their action data in a file separate from the button source file. Implicit buttons have no external data but use a unique syntax per implicit button type to recognize the action to run.
For times when you need a cross between the two, with a universal button syntax and all button data stored in the button source file, there are action buttons.
Action Buttons are a form of implicit buttons that can execute any existing action types, Emacs Lisp functions, Emacs Regression Tests (ERT tests) or display the values of Emacs Lisp variables and constants. Such buttons are delimited by angle brackets, < >, and come in four types:
action type invocations
These begin with an action type name (from the list displayed by {C-h h d t a RET}) and are followed by any needed arguments to form the action, e.g.
<link-to-file-line "${hyperb:dir}/hact.el" 40>function calls
These are similar to action type invocations but begin with an Emacs Lisp function name rather than an action type name, e.g.
<find-file-other-window "/tmp">Generally, such functions are invoked for their side-effects and their return value is silently ignored. But if a function is a boolean predicate whose name ends in ‘-p’, then the result is displayed in the minibuffer.
test executions
Each of these consists solely of the name of an ERT test defined with ert-deftest and surrounded by angle brackets, e.g.
<hbut-tests-ibut-insert-kbd-key>The above example runs a Hyperbole regression test when activated and shows the pass/fail result in a pop-up buffer.
variable displays
These consist of an Emacs Lisp variable name only. They display messages with their variable name and value, e.g.
<fill-column>If there is a function binding with the same name as the variable you wish to display, to prevent interpretation as a function call action button, precede the name with a $, e.g.
<$fill-column>With action buttons you need not remember any special syntax for each type of implicit button. You can freely embed them in any type of text and use the Action and Assist keys on them as you do with any other type of implicit button.
An action button is recognized only if the first name within the angle brackets is an existing action type or Emacs Lisp symbol. Otherwise, other implicit button types will be tested and may activate instead.
To activate a frequently used action button by name independent of your current buffer, simply add it to your global button file and precede it with a label {C-h h i l}. Then invoke it by label name with: {C-h h g a}.