Skip to content

Global Buttons

Sometimes it is useful to activate buttons without regard to the information with which you are working. In such instances, you use global buttons, which are buttons that may be activated or otherwise operated upon by typing their names/labels when they are prompted for, rather than selecting the buttons within a buffer. In contrast, activation of explicit buttons depends upon the information on your screen since they are accessible only from within their particular buffers.

If you want a permanent link to a file section that you can follow at any time, you can use a global button. Or what about an Emacs keyboard macro that you use frequently? Create a global button with an action type of exec-kbd-macro button and an easy to type name. Then you can activate it whenever the need arises.

Global buttons are managed with the Hyperbole Gbut/ menu accessed with {C-h h g}. The Create item, {C-h h g c}, prompts for a global button name, an action type, and the action’s associated arguments, such as a file to which to link. It then creates the button. To activate the button, use the Act menu item, {C-h h g a}. Type the button’s name, press {RET}, and then Hyperbole prompts you for its action type and associated arguments. {C-h h g e} to edit an existing global button. To remove a button, use the Delete menu item, {C-h h g d}; see Deletion.

To create a global button that links to point in one of your Emacs windows, use the Link menu item, {C-h h g l}.

By default this will create a global explicit link button. Give it a prefix argument to create a global implicit link button.

With a single window visible on-screen or a single window within your current frame, this will prompt you for a button name or label (temporarily showing you your global/personal button file) and then will insert a button that links to the current point within that window.

If you have exactly two Emacs windows in your current frame or exactly two windows visible across two Emacs frames, then the link referent will be to the point in the other, non-selected window.

With more than two windows on screen, Hyperbole will prompt you to choose the referent window and its associated point to which to link. If the Ace Window package is installed and active, this will be used to choose the window via keyboard; otherwise, you will be prompted to select it by mouse.

Global buttons are actually explicit buttons stored at the end of your personal button file, see Button Files. You can always go into that file and activate, edit or annotate these buttons with comments.

Emacs has a built-in feature similar to Global Buttons called Bookmarks. Bookmarks store places in files or link to URLs, so they are more limited than Hyperbole’s global buttons and cannot utilize all of Hyperbole’s capabilities for performing actions. Hyperbole has an action type, link-to-bookmark, for using an Emacs bookmark as a Hyperbole button referent. See Bookmarks in the Emacs Manual, for details on bookmarks.