File: hywiki.el.html

This is Hyperbole's markup-free personal Wiki system for note-taking
 and automatic wiki word highlighting and hyperlinking. It uses Org
 mode for note taking and adds automatic hyperlinking of HyWikiWords
 within Org files in hywiki-directory (default = "~/hywiki"), where
 a HyWikiWord is a capitalized word that contains upper and lowercase
 letters only and has a corresponding HyWikiWord.org wiki page file
 below hywiki-directory. HyWikiWords require no delimiters.

 HyWikiWords are also recognized in text buffers after the global
 minor mode, hywiki-mode(var)/hywiki-mode(fun) is enabled via {M-x hywiki-mode RET}. To
 create or jump to a HyWiki page, simply type o ut a potential
 HyWikiWord or move point onto one and press the Action Key {M-RET}.
 This will create the associated page if it does not exist. This
 also highlights any other instances of HyWikiWords across all
 visible Emacs windows. HyWiki is built for scalability and has been
 tested to be performant with 10,000 HyWikiWords.

 Once Hyperbole has been loaded and activated, HyWikiWords (with or
 without delimiters) are automatically highlighted and active in
 the following contexts:
   - HyWiki page buffers;
   - non-special text buffers, when hywiki-mode(var)/hywiki-mode(fun) is enabled;
   - comments and strings in programming buffers, when
     hywiki-mode(var)/hywiki-mode(fun) is enabled.

 As HyWikiWords are typed, highlighting occurs after a trailing
 whitespace or punctuation character is added, or when it is
 surrounded by a matching pair of characters such as curly braces
 or single square brackets. Since Org links use double square
 brackets and Org targets use double or triple angle brackets,
 HyWikiWords within these delimiters are ignored.

 You can also create Org links to HyWikiWords in any non-special text
 buffer by surrounding them with double square brackets and the
 'hy:' prefix, as in: [[hy:MyWikiWord]]. If you set
 hywiki-org-link-type-required to nil, then you don't need the
 prefix, e.g. [[MyWikiWord]]; existing HyWiki page names then will
 override Org's standard handling of such links. To prevent Org
 mode's binding of {M-RET} from splitting lines and creating new
 headlines when on a HyWikiWord whose page has not yet been
 created, set hsys-org-enable-smart-keys to t so that
 Hyperbole's Action Key does the right thing in this context.

 HyWikiWord links can also link to a section headline within a page
 by simply following the page name with a '#' character and then the
 section headline name. For example, if your Emacs page has a "Major
 Modes" section, then either Emacs#Major-Modes or [[hy:Emacs#Major
 Modes]] will work as a link to that section. Note that without the
 square bracket delimiters, you must convert spaces in section names
 to '-' characters. As long as the page exists, section links are
 highlighted regardless of whether associated sections exist or not.
 When activating a link with a section reference, you will get an
 error if the section does not exist.

 By default (hywiki-mode = :pages), HyWikiWords are
 auto-highlighted within HyWiki pages only. Outside of such pages,
 hywiki-mode(var)/hywiki-mode(fun) must be set to :all to enable auto-highlighting in
 programming and text modes. Auto-highlighting depends on pre- and
 post-command-hook settings. If an error occurs running one of
 these, the associated hook is removed. To restore the
 auto-highlight hooks use {C-u C-h h h m} to toggle hywiki-mode(var)/hywiki-mode(fun);
 this also enables auto-highlighting when hywiki-mode(var)/hywiki-mode(fun) is non-nil.

 The custom setting, hywiki-exclude-major-modes (default = nil), is
 a list of major modes to exclude from HyWikiWord auto-highlighting
 and recognition.

 Within programming modes, HyWikiWords are highlighted/hyperlinked
 within comments and double-quoted strings 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)).

 HyWiki adds two implicit button types to Hyperbole:
   hywiki-word - create and display HyWikiWord referents;
   hywiki-existing-word - display an existing HyWikiWord referent.

 hywiki-word is one of the lowest priority implicit button types
 so that it triggers only when other types are not recognized first.

 A HyWiki can be exported to HTML for publishing to the web via Org
 mode's publish a project feature. {M-x hywiki-publish-to-html RET}
 will and that's it! Add a prefix argument to force regeneration of all
 HyWiki pages, rather than only those that have been updated.

 The full set of HyWiki-specific Org publish properties are set in
 the variable hywiki-org-publish-project-alist. When the HyWiki
 code is loaded into Emacs, it automatically integrates these
 properties with Org's publishing framework, so when in a HyWiki
 page, you can use the standard {C-c C-e P p} current project publish
 command.

 There are a few publishing settings you can customize prior to
 loading Hyperbole's HyWiki code.

 HyWiki html files are saved in:
   (hywiki-org-get-publish-property :publishing-directory)
 Customize this directory with:
   {M-x customize-variable RET hywiki-org-publishing-directory RET}.

 HyWiki html files are generated by the function given by:
   (hywiki-org-get-publish-property :publishing-function)
 Customize the value of this function if necessary with:
   {M-x customize-variable RET hywiki-org-publishing-function RET}.

This section summarizes HyWikiWord Actions based on the

hywiki-referent-prompt-flag When nil When t
 -------------------------------------------------------------------------------------
 Action Key hywiki-word-create-and-display
   or HyWiki/Create Create Page and Display Create Referent and Display
 Assist Key hywiki-word-create-and-display
   or C-u HyWiki/Create Create Referent and Display Create Page and Display
 hywiki-word-create hywiki-create-page with Msg hywiki-create-referent with Msg
 C-u hywiki-word-create hywiki-create-referent with Msg hywiki-create-page with Msg

Defined variables (47)

hywiki--buffer-modified-tickUsed to determine if a command modifies a buffer or not.
hywiki--buttonize-character-regexpRegexp matching a single separating character following a HyWikiWord.
hywiki--buttonize-characters-cacheSingle string cache of Org-mode syntax table punctuation/symbol characters.
hywiki--close-open-hashtDelimiter htable with (close-delim-string . open-delim-char) key-value pairs.
hywiki--directory-checksumString checksum for ‘hywiki-directory’ page names.
hywiki--directory-mod-timeLast mod time for ‘hywiki-directory’ or nil if the value has not been read.
hywiki--open-close-hashtDelimiter htable with (open-delim-string . close-delim-char) key-value pairs.
hywiki--org-heading-regexpCache standard ‘org-complex-heading-regexp’ value.
hywiki--org-mode-syntax-tableStandard syntax table for Org mode buffers with HyWiki support.
hywiki--org-todo-regexpCache regular and custom Org todo keywords for ‘hywiki-directory’.
hywiki--referent-alistHyWiki alist generated from ‘hywiki--referent-hasht’ for storage in cache.
hywiki--referent-hashtHyWiki hash table for fast WikiWord referent lookup.
hywiki--word-and-buttonize-character-regexpRegexp matching HyWikiWord#section plus a valid word separating character.
hywiki-allow-plurals-flagNon-nil means plural HyWikiWords have the same referent as the singular form.
hywiki-allow-suffix-referent-typesList of referent type symbols that support # and :L line number suffixes.
hywiki-buffer-highlighted-stateState of HyWikiWords highlighting in the associated buffer.
hywiki-cache-default-fileStandard file name for storing cached data for a HyWiki.
hywiki-cache-fileCurrent HyWiki cache file, if any.
hywiki-default-modeCustomizable initial mode setting for HyWiki minor mode.
hywiki-directoryDirectory that holds all HyWiki pages in Org format.
hywiki-display-page-functionHyperbole function to display HyWiki page pathnames.
hywiki-exclude-major-modesList of major modes to exclude from HyWikiWord highlighting and recognition.
hywiki-file-suffixFile suffix string (including period) to use when creating HyWiki pages.
hywiki-highlight-all-in-prog-modesList of programming major modes to highlight HyWikiWords outside of comments.
hywiki-ignore-face-listSkip highlighting of HyWikiWords in regions which have any of these faces.
hywiki-modeNon-nil when the global hywiki minor mode is enabled.
hywiki-mode-hookHook run after entering or leaving ‘hywiki-mode’.
hywiki-mode-lighterString to display in mode line when the HyWiki global minor mode is enabled.
hywiki-mode-mapKeymap for ‘hywiki-mode’.
hywiki-non-character-commandsList of non-character commands.
hywiki-org-link-typeHyWiki string prefix type for Org links. Excludes trailing colon.
hywiki-org-link-type-requiredWhen t, [[hy:HyWiki Org links]] must start with ‘hywiki-org-link-type’:.
hywiki-org-publish-project-alistHyWiki-specific export properties added to ‘org-publish-project-alist’.
hywiki-org-publishing-broken-linksHyWiki Org publish option that determines how invalid links are handled.
hywiki-org-publishing-directoryDirectory where HyWiki pages are converted into html and published.
hywiki-org-publishing-functionHyWiki Org publish function used to export a HyWiki page to html.
hywiki-org-publishing-sitemap-titleHyWiki Org publish sitemap title.
hywiki-page-flagSet to t after finding a HyWiki page file, else nil.
hywiki-referent-menuMenu of HyWikiWord custom referent types of the form:
hywiki-referent-prompt-flagNon-nil means the Action Key and HyWiki/Create always prompt for referent type.
hywiki-word-faceHyperbole face for HyWikiWord highlighting.
hywiki-word-line-and-column-numbers-regexpGroup 2 is the 1-based line number.
hywiki-word-regexpRegexp that matches a HyWikiWord only.
hywiki-word-section-regexpRegexp that matches a non-delimited HyWikiWord #section extension.
hywiki-word-suffix-regexpRegexp matching any trailing part of a HyWikiWord reference.
hywiki-word-with-optional-suffix-exact-regexpExact match regexp for a HyWikiWord with an optional #section.
hywiki-word-with-optional-suffix-regexpRegexp for a HyWikiWord with an optional #section, :Lline-num, :Ccol-num.

Defined functions (195)

actypes::link-to-wikiword(REFERENCE)
hywiki--add-suffix-to-referent(SUFFIX REFERENT)
hywiki--buttonized-region-p()
hywiki--clear-buttonize-characters-cache(&rest _)
hywiki--export-completion-function(PROJECT-PLIST)
hywiki--export-preparation-function(PROJECT-PLIST)
hywiki--extend-region(START END)
hywiki--get-all-references(FUNCTION &optional START END)
hywiki--get-delimited-range-backward()
hywiki--get-delimited-range-forward()
hywiki--maybe-de/highlight-org-element-backward(FUNC)
hywiki--maybe-de/highlight-org-element-forward(FUNC)
hywiki--maybe-de/highlight-sexp(FUNC DIRECTION-NUMBER &optional SEXP-START SEXP-END)
hywiki--maybe-dehighlight-at-point()
hywiki--maybe-rehighlight-at-point()
hywiki--org-link-html-format(PATH-STEM SUFFIX DESC INFO)
hywiki--org-set-heading-regexp()
hywiki--pathname-reference-to-org-link(PATHNAME REFERENT DESCRIPTION)
hywiki--referent-reference-to-org-link(REFERENCE REFERENT DESCRIPTION)
hywiki--sitemap-file()
hywiki-active-in-current-buffer-p()
hywiki-add-activity(WIKIWORD)
hywiki-add-bookmark(WIKIWORD)
hywiki-add-command(WIKIWORD)
hywiki-add-find(WIKIWORD)
hywiki-add-global-button(WIKIWORD)
hywiki-add-hyrolo(WIKIWORD)
hywiki-add-info-index(WIKIWORD)
hywiki-add-info-node(WIKIWORD)
hywiki-add-key-series(WIKIWORD)
hywiki-add-org-id(WIKIWORD)
hywiki-add-org-roam-node(WIKIWORD)
hywiki-add-page(PAGE-NAME &optional FORCE-FLAG)
hywiki-add-path-link(WIKIWORD &optional FILE POS)
hywiki-add-referent(WIKIWORD REFERENT)
hywiki-add-sexpression(WIKIWORD)
hywiki-add-to-referent(WIKIWORD TEXT POSITION)
hywiki-at-range-delimiter()
hywiki-at-tags-p(&optional AT-TAG-FLAG)
hywiki-cache-default-file(&optional DIRECTORY)
hywiki-cache-edit(CACHE-FILE)
hywiki-cache-save(&optional SAVE-FILE)
hywiki-clear-referent-hasht()
hywiki-completion-at-point()
hywiki-completion-exit-function(&rest _)
hywiki-consult-backlink(REFERENCE)
hywiki-consult-grep(&optional REGEXP MAX-MATCHES PATH-LIST PROMPT)
hywiki-consult-page-and-headline(&optional PROMPT INITIAL)
hywiki-create-page(WIKIWORD &optional MESSAGE-FLAG)
hywiki-create-referent(WIKIWORD &optional MESSAGE-FLAG)
hywiki-create-referent-and-display(WIKIWORD &optional PROMPT-FLAG)
hywiki-delimited-p(&optional POS)
hywiki-directory-changed(OPTION SET-TO-VALUE OPERATION WHERE)
hywiki-directory-dired-edit()
hywiki-directory-edit()
hywiki-directory-get-checksum()
hywiki-directory-get-mod-time()
hywiki-directory-modified-p()
hywiki-directory-set-checksum()
hywiki-directory-set-mod-time()
hywiki-directory-treemacs-edit()
hywiki-display-activity(WIKIWORD ACTIVITY)
hywiki-display-bookmark(WIKIWORD BOOKMARK)
hywiki-display-command(WIKIWORD COMMAND)
hywiki-display-find(WIKIWORD FUNC)
hywiki-display-global-button(WIKIWORD GBUT-NAME)
hywiki-display-hyrolo(WIKIWORD SEARCH-FUNC)
hywiki-display-info-index(WIKIWORD ITEM-NAME)
hywiki-display-info-node(WIKIWORD NODE)
hywiki-display-key-series(WIKIWORD KEY-SERIES)
hywiki-display-org-id(WIKIWORD ORG-ID)
hywiki-display-org-roam-node(WIKIWORD REFERENT)
hywiki-display-page(&optional WIKIWORD FILE-NAME)
hywiki-display-path-link(WIKIWORD PATH)
hywiki-display-referent(&optional WIKIWORD PROMPT-FLAG)
hywiki-display-referent-type(WIKIWORD REFERENT)
hywiki-display-sexpression(WIKIWORD SEXPRESSION)
hywiki-find-page(&optional WIKIWORD)
hywiki-find-referent(&optional WIKIWORD PROMPT-FLAG)
hywiki-format-grep-to-reference(PAGE-AND-HEADLINE)
hywiki-format-reference-to-consult-grep(PAGE-AND-SECTION)
hywiki-get-buffer-page-name()
hywiki-get-buffers(HYWIKI-MODE-STATUS)
hywiki-get-buffers-in-windows(&rest FRAMES)
hywiki-get-buttonize-characters()
hywiki-get-delimited-region()
hywiki-get-existing-page-file(FILE-STEM-NAME)
hywiki-get-page-file(FILE-STEM-NAME)
hywiki-get-page-files()
hywiki-get-page-headings(PAGE)
hywiki-get-page-list()
hywiki-get-plural-wikiword(WIKIWORD)
hywiki-get-reference-positions(&optional START END)
hywiki-get-reference-range(REFERENCE)
hywiki-get-references(&optional START END)
hywiki-get-referent(WIKIWORD)
hywiki-get-referent-hasht()
hywiki-get-singular-wikiword(WIKIWORD)
hywiki-get-wikiword-list()
hywiki-help()
hywiki-highlight-on-yank(PROP-VALUE START END)
hywiki-highlight-page()
hywiki-highlight-word-get-range()
hywiki-highlight-word-move-range()
hywiki-highlighted-word-at(&optional RANGE-FLAG)
hywiki-ignore-command-hooks-p()
hywiki-in-page-p()
hywiki-insert-link(&optional ARG)
hywiki-kill-buffer-hook()
hywiki-let-directory(OPTION VALUE)
hywiki-make-referent-hasht()
hywiki-map-words(FUNC)
hywiki-maybe-at-wikiword-beginning()
hywiki-maybe-dehighlight-balanced-pairs()
hywiki-maybe-dehighlight-between-references()
hywiki-maybe-dehighlight-off-reference()
hywiki-maybe-dehighlight-on-reference()
hywiki-maybe-dehighlight-org-element-backward()
hywiki-maybe-dehighlight-org-element-forward()
hywiki-maybe-dehighlight-reference(&optional ON-REFERENCE)
hywiki-maybe-dehighlight-references(&optional REGION-START REGION-END)
hywiki-maybe-dehighlight-sexp(DIRECTION-NUMBER)
hywiki-maybe-directory-updated()
hywiki-maybe-highlight-balanced-pairs()
hywiki-maybe-highlight-between-references()
hywiki-maybe-highlight-off-reference()
hywiki-maybe-highlight-on-reference()
hywiki-maybe-highlight-org-element-backward()
hywiki-maybe-highlight-org-element-forward()
hywiki-maybe-highlight-reference(&optional ON-REFERENCE)
hywiki-maybe-highlight-references(&optional REGION-START REGION-END SKIP-LOOKUPS-UPDATE-FLAG)
hywiki-maybe-highlight-region(START END)
hywiki-maybe-highlight-region-reference(START END)
hywiki-maybe-highlight-sexp(DIRECTION-NUMBER)
hywiki-maybe-highlight-wikiwords-in-frame(FRAME &optional SKIP-LOOKUPS-UPDATE-FLAG)
hywiki-mode(&optional ARG)
hywiki-mode-around-advice(HYWIKI-MODE-FN &optional TO-MODE)
hywiki-mode-disable()
hywiki-mode-normalize(TO-MODE)
hywiki-non-hook-context-p()
hywiki-non-page-elt(VAL-KEY)
hywiki-org-directory-todo-regexp(DIR)
hywiki-org-export-function(&rest _)
hywiki-org-format-heading(HEADING &optional NO-TAGS NO-TODO NO-PRIORITY NO-COMMENT NO-STATS)
hywiki-org-get-heading-match-regexp(TITLE)
hywiki-org-get-publish-project()
hywiki-org-get-publish-property(PROPERTY)
hywiki-org-get-titles-from-headings(HEADINGS)
hywiki-org-link-complete(&optional ARG)
hywiki-org-link-export(LINK DESCRIPTION FORMAT INFO)
hywiki-org-link-store()
hywiki-org-maybe-add-title()
hywiki-org-set-publish-project()
hywiki-org-to-heading-instance(TITLE &optional N)
hywiki-page-exists-p(WORD)
hywiki-page-read(&optional PROMPT INITIAL)
hywiki-page-read-new(&optional PROMPT INITIAL)
hywiki-page-read-reference(&optional PROMPT INITIAL)
hywiki-potential-buffer-p()
hywiki-publish-to-html(&optional ALL-PAGES-FLAG)
hywiki-reference-to-org-link(REFERENCE &optional DESCRIPTION)
hywiki-reference-to-referent(REFERENCE &optional FULL-DATA)
hywiki-references-to-org-links()
hywiki-referent-exists-p(&optional REF START END)
hywiki-section-to-headline-reference()
hywiki-set-directory(OPTION VALUE)
hywiki-strip-org-link(LINK-STR)
hywiki-tags-view(&optional TODO-ONLY MATCH VIEW-BUFFER-NAME)
hywiki-validate-referent(REFERENT)
hywiki-word-activate(&optional ARG)
hywiki-word-add-completion-at-point()
hywiki-word-at(&optional RANGE-FLAG HASH-SIGN-ONLY-FLAG)
hywiki-word-at-point()
hywiki-word-consult-grep(WORD)
hywiki-word-create(WIKIWORD &optional ARG)
hywiki-word-create-and-display(WIKIWORD &optional PROMPT-FLAG)
hywiki-word-dehighlight-buffers(BUFFERS)
hywiki-word-dehighlight-in-buffers(BUFFERS)
hywiki-word-face-at-p(&optional POS)
hywiki-word-from-reference(REF)
hywiki-word-get-range()
hywiki-word-grep(WIKIWORD)
hywiki-word-highlight-buffers(BUFFERS)
hywiki-word-highlight-in-buffers(BUFFERS)
hywiki-word-highlight-in-current-buffer()
hywiki-word-highlight-in-frame(FRAME)
hywiki-word-highlight-post-command()
hywiki-word-highlight-post-self-insert()
hywiki-word-is-p(WORD)
hywiki-word-read(&optional PROMPT INITIAL)
hywiki-word-read-new(&optional PROMPT INITIAL)
hywiki-word-remove-completion-at-point()
hywiki-word-set-auto-highlighting(HYWIKI-FROM-MODE HYWIKI-TO-MODE)
hywiki-word-store-around-point()
hywiki-word-strip-suffix(PAGE-NAME)

Defined faces (1)

hywiki--word-faceFace for HyWikiWord highlighting.