Skip to content

Buttons in Mail

Hyperbole supports embedding buttons within electronic mail messages composed in Emacs. An enhanced mail reader may then be used to activate the buttons within messages just like any other buttons. Because this involves complex changes to mail support functions, this feature is disabled by default. Use the Cust/Msg-Toggle-Ebuts minibuffer menu item to enable it.

Hyperbole supports the following mail readers: Rmail (see Reading Mail with Rmail in the GNU Emacs Manual), VM (see Introduction in the VM Manual) and MH-e. Button inclusion and activation within USENET news articles is also supported in the same fashion via the Gnus news reader if available at your site (see The Gnus Newsreader in the Gnus Manual). (The hmail.el file defines a generalized interface that can be used to hook in other mail or news readers if the necessary interface functions are written.)

All explicit buttons to be mailed must be created within the outgoing message buffer. There is no present support for including text from other buffers or files which contain explicit buttons, except for the ability to yank the contents of a message being replied to, together with all of its buttons, via the (mail-yank-original) command bound to {C-c C-y}. From a user’s perspective, buttons are created in precisely the same way as in any other buffer. They also appear just like any other buttons to both the message sender and the reader who uses the Hyperbole enhanced readers. Button operation may be tested any time before a message is sent. A person who does not use Hyperbole enhanced mail readers can still send messages with embedded buttons since mail composing is independent of any mail reader choice.

Hyperbole buttons embedded within received mail messages behave as do any other buttons. The mail does not contain any of the action type definitions used by the buttons, so the receiver must have these or she will receive an error when she activates the buttons. Buttons which appear in message Subject lines are copied to summary buffers whenever such summaries are generated. Thus, they may be activated from either the message or the summary buffers.

Nothing bad will happen if a mail message with explicit buttons is sent to a non-Hyperbole user. The user will simply see the text of the message followed by a series of lines of button data at its end. Hyperbole mail users never see this data in its raw form.

In order to alert readers of your mail messages that you can handle Hyperbole mail buttons, you can set the variable, smail:comment, to an expression that automatically inserts a comment into each outgoing message to announce this fact. See its documentation for technical details. By default, no comment is added. To have a comment line added to your outgoing message, add the following to to your ~/.emacs file before the point at which you load Hyperbole.

emacs-lisp
(setq smail:comment
 (format "Comments: GNU Hyperbole mail buttons accepted, v%s.\n"
          hyperb:version))

This will produce the following line in outgoing messages:

Comments: GNU Hyperbole mail buttons accepted, vX.X.X.

where the X’s indicate your Hyperbole version number. You can cut this out of particular messages before you send them when need be.

A final mail-related facility provided by Hyperbole is the ability to save a pointer to a received mail message by creating an explicit button with a link-to-mail action type. When prompted for the mail message to link to, if you press the Action Key within the message, the appropriate link parameters will be copied to the argument prompt, as described in Smart Key Argument Selection.