www.delorie.com/gnu/docs/hyperbole/hyperbole_19.html   search  
 
Buy GNU books!


Hyperbole User Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Action Types

Action types provide action procedures that specify button behavior. The arguments needed by an action type are prompted for at button creation time. When a button is activated, the stored arguments are fed to the action type's action body to achieve the desired result. Hyperbole handles all of this transparently.

Standard action types in alphabetical order include:

annot-bib
Follows internal ref KEY within an annotated bibliography, delimiters=[].

completion
Inserts completion at point into minibuffer or other window. Unless at end of buffer or if completion has already been inserted, then deletes completions window.

eval-elisp
Evaluates a Lisp expression LISP-EXPR.

exec-kbd-macro
Executes KBD-MACRO REPEAT-COUNT times. KBD-MACRO may be a string of editor command characters or a function symbol. Optional REPEAT-COUNT nil means execute once, zero means repeat until error.

exec-shell-cmd
Executes a SHELL-CMD string asynchronously. Optional non-nil second argument INTERNAL-CMD means do not display the shell command line executed. Optional non-nil third argument KILL-PREV means kill last output to shell buffer before executing SHELL-CMD.

exec-window-cmd
Executes an external window-based SHELL-CMD string asynchronously.

hyp-config
Inserts Hyperbole configuration info at end of optional OUT-BUF or current.

hyp-request
Inserts Hyperbole mail list request help into optional OUT-BUF or current.

hyp-source
Displays a buffer or file from a line beginning with 'hbut:source-prefix'.

kbd-key
Executes the function binding for KEY-SEQUENCE, delimited by {}. Returns t if a KEY-SEQUENCE has a binding, else nil.

link-to-buffer-tmp
Displays a BUFFER in another window. Link is generally only good for current Emacs session. Use 'link-to-file' instead for a permanent link.

link-to-directory
Displays a DIRECTORY in Dired mode in another window.

link-to-doc
Displays online version of a document given by DOC-ID, in other window. If the online version of a document is not found in doc-id-indices, an error is signalled.

link-to-ebut
Performs action given by another button, specified by KEY and KEY-FILE.

link-to-elisp-doc
Displays documentation for FUNC-SYMBOL.

link-to-file
Displays a PATH in another window scrolled to optional POINT. With POINT, buffer is displayed with POINT at the top of the window.

link-to-file-line
Displays a PATH in another window scrolled to LINE-NUM.

link-to-kcell
Displays FILE with kcell given by CELL-REF at the top of the window. CELL-REF may be a kcell's display label or its permanant idstamp. If FILE is nil, the current buffer is used. If CELL-REF is nil, the first cell in the view is shown.

link-to-kotl
Displays at the top of another window the referent pointed to by LINK. LINK may be of any of the following forms, with or without delimiters:
 
  < pathname [, cell-ref] >
  < [-!&] pathname >
  < @ cell-ref >

See documentation for kcell:ref-to-id for valid cell-ref formats.

link-to-Info-node
Displays an Info NODE in another window. NODE must be a string of the form '(file)nodename'.

link-to-mail
Displays mail msg with MAIL-MSG-ID from MAIL-FILE in other window. See documentation for the variable hmail:init-function for information on how to specify a mail reader to use.

link-to-regexp-match
Finds REGEXP's Nth occurrence in FILE and displays location at window top. Returns t if found, signals an error if not.

link-to-rfc
Retrieves and displays an Internet rfc given by RFC-NUM. RFC-NUM may be a string or an integer. Requires ange-ftp or efs for remote retrievals.

link-to-string-match
Finds STRING's Nth occurrence in FILE and displays location at window top. Returns t if found, nil if not.

man-show
Displays man page on TOPIC, which may be of the form <command>(<section>).

rfc-toc
Computes and displays summary of an Internet rfc in BUF-NAME. Assumes point has already been moved to start of region to summarize. Optional OPOINT is point to return to in BUF-NAME after displaying summary.

text-toc
Jumps to the text file SECTION referenced by a table of contents entry at point.

www-url
Follows a link given by URL. The variable, action-key-url-function, can be used to customize the url browser that is used.

The use of action types provides a convenient way of specifying button behavior without the need to know how to program. Expert users who are familiar with Emacs Lisp, however, may find that they often want to tailor button actions in a variety of ways not easily captured within a type system. In such cases, hui:ebut-prompt-for-action should be set non-nil. This will cause Hyperbole to prompt for an action to override the button's action type at each explicit button creation. For those cases where the action type is sufficient, a nil value should be entered for the action. An action may be any Lisp form that may be evaluated.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003