Skip to content

HyWiki Mode

HyWikiWords are automatically highlighted and active when the global minor mode, hywiki-mode, is enabled. The hywiki-mode variable is always in one of three states:

  1. :pages’ - HyWikiWords are active only with pages within hywiki-directory.
  2. :all’ - HyWikiWords are active within all text and programming buffers
  3. nil’ - the mode is disabled, HyWikiWords are disabled.

You can interactively set this mode for the current Emacs session using the HyWiki/ModeSet/ {C-h h h m} menu. Programmatically, you would use (hywiki-mode :all) to enable it globally.

In a new Emacs session when Hyperbole is enabled via its global minor mode, hyperbole-mode, hywiki-mode starts in whatever state has been stored in the hywiki-default-mode custom variable, whose default value is ‘:pages’. If you enable hywiki-mode by interactively toggling it on and hywiki-default-mode is either ‘:pages’ or ‘:all’, then hywiki-mode is set to that default value.

In summary, to enable hywiki-mode globally for the current Emacs session, interactively use {C-h h h m a}; programmatically, use (hywiki-mode :all). To enable it globally for all future Emacs sessions, add this line to your Emacs initialization file: (customize-save-variable 'hywiki-default-mode :all).

Within programming modes, HyWikiWords are highlighted and hyperlinked within comments only. For programming modes in which you want HyWikiWords recognized everywhere, add them to the custom setting, hywiki-highlight-all-in-prog-modes (default = '(lisp-interaction-mode)).

Use (hywiki-active-in-current-buffer-p) to determine if HyWikiWord hyperlinks are currently active in a buffer or not. Regardless of this flag, HyWikiWords are ignored within Org links so that they work normally.

HyWikiWords are automatically disabled in major modes with the ‘special’ property that manipulate specialized data, such as Dired Mode, unless the mode is included in the list value of the customization variable, hypb:include-major-modes. Many special modes are included there by default such as email and news readers.

You can disable HyWikiWords in specific major modes by adding the mode to the list value of the customization variable, hypb:exclude-major-modes. Changes to this value affect files with the associated major modes the next time they are read into buffers.