Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 47 additions & 8 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
2026-06-14 Bob Weiner <rsw@gnu.org>

* hactypes.el (link-to-ibut): Fix infinite loop in <ilink:label> by preventing
ilinks from linking to other ilinks.

* test/hibtypes-tests.el (ibtypes::ilink-test): Update match to ilink error.

* hbut.el (ibut:label-set): Make 'label' arg optional. When omitted or nil,
reuse the existing label or if that is null, set it to "temp". This behavior
is used by the ibtypes: elink, glink, and ilink.
(hbut:act): Change from (< delim-text-start (point)) to
(<= delim-text-start (point)) since actions
can move point to the starting delimiter of a button.

2026-06-12 Bob Weiner <rsw@gnu.org>

* hbut.el (ebut:get): Allow a buffer name for 'buffer' argument and prioritize
'buffer' argument over 'key-src' argument.
hactypes.el (link-to-ebut, link-to-ibut): Rewrite to support links to buttons
in buffers without attached files.
(hactypes:link-to-file-interactively): Fix to handle buffer-type
'loc attribute.

* hibtypes.el (hlink:parse-label-and-file): Simplify using 'seq-position'
rather than a loop.
(hlink:parse-label-and-file): Rename to 'hlink:parse-label-and-loc'.

* hyrolo.el (hyrolo-file-list): Explain that dirs and file wildcards are
allowed. Point to doc of 'hyrolo-expand-path-list' for how entries are
expanded.

* hibtypes.el (klink, elink, ilink, glink): Move to be higher priority than
action buttons so are not overridden and misfired as an action button.
This manifested as an elink or glink matching to the action of a named
ilink.
man/hyperbole.texi (Implicit Button Types): Update priority ordering of
the above types.

2026-06-12 Mats Lidell <matsl@gnu.org>

* test/hibtypes-tests.el (ibtypes::elink-test):
Expand Down Expand Up @@ -29,6 +67,11 @@
optional args set to nil causing it to see different number of
arguments depending on whether the code is natively compiled or not.

2026-06-09 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-mode): Move doc of 'hywiki-mode' state values here,
from 'hywiki-default-mode', for ease of reference.

2026-06-07 Bob Weiner <rsw@gnu.org>

* hbut.el (ibut:to-text): Fix missing let of 'name-end' and assign a value.
Expand Down Expand Up @@ -70,10 +113,6 @@

* hbut.el (ibut:to-text): Error if 'lbl-key' is an empty string.

* hactypes.el: (link-to-ibut): Fix infinite loop in <ilink:label> links
by replacing 'hbut:act' call with a call to 'actype:act' which
utilizes the actype computed from the prior 'ibut:at-p' call.

2026-06-05 Mats Lidell <matsl@gnu.org>

* hui.el (kcell-view:label): Declare function.
Expand Down Expand Up @@ -5276,7 +5315,7 @@ value to be [[WikiWord]] not [[file:WikiWord.org][WikiWord]].
2024-10-05 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-kill-buffer-hook): Change to return t iff 'hywiki-directory'
change
changes.

2024-09-30 Bob Weiner <rsw@gnu.org>

Expand Down Expand Up @@ -5451,7 +5490,7 @@ value to be [[WikiWord]] not [[file:WikiWord.org][WikiWord]].

2024-09-01 Bob Weiner <rsw@gnu.org>

* man/dir (File): Narrow width to better fit with out Info entries.
* man/dir (File): Narrow width to better fit without Info entries.

* hyrolo.el (hyrolo-org-mode): Prioritize Org 9.7 folding-spec config
over earlier versions to fix a bug that used the wrong version.
Expand Down Expand Up @@ -5662,7 +5701,7 @@ value to be [[WikiWord]] not [[file:WikiWord.org][WikiWord]].
to 0 since just want to trigger redisplay.
(hywiki-publish-to-html): Retrieve HyWiki project by name.
(hywiki-directory): Change to a defcustom so can set this before
loading Hyperoble.
loading Hyperbole.
(hywiki-org-get-publish-property): (require 'ox-publish).
(hywiki-org-maybe-add-title): Add title to HyWiki pages without one
using the file or buffer name.
Expand All @@ -5676,7 +5715,7 @@ value to be [[WikiWord]] not [[file:WikiWord.org][WikiWord]].
properties so that changes trigger updates in 'org-publish-project-alist'.
(hywiki-org-maybe-add-title): Add to add the HyWikiWord as the
title for each HyWiki page.
(hywiki-org-make-publish-project-alist): Add :sitemap-title property..
(hywiki-org-make-publish-project-alist): Add :sitemap-title property.
(hywiki-org-publishing-sitemap-title): Add to set above property.
(hywiki-is-wikiword): Add not 'string-empty-p' test.
(hywiki-add-page): Add interactive spec.
Expand Down
22 changes: 14 additions & 8 deletions FAST-DEMO
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,26 @@ To learn how to create new kinds of implicit button and action types, see

** HyWiki

HyWiki 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.
HyWiki 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
directly below the directory given by the variable, `hywiki-directory'
(default = "~/hywiki"). 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.

To create a new HyWikiWord simply type it in an Org file in
`hywiki-directory' and then press {M-RET} with point on the word. This
will create an empty wiki page for that word. Add any text to this file
and save it to create the new HyWikiWord.

Use {M-RET} on the first line of the expression below to set a demo
HyWiki directory and turn on hywiki-mode so HyWikiWords are
highlighted outside of the HyWiki directory.

<progn (setq hywiki-directory (hpath:expand "${hyperb:dir}/hywiki/"))
(hywiki-mode 1)>
(hywiki-mode :all)>

Now all these wiki-words should be highlighted and can appear in any
text buffer and will be treated as hyperlinks. Simply press {M-RET}
Expand Down
35 changes: 35 additions & 0 deletions HY-NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@
* V9.0.2pre
===========================================================================

**GNU Hyperbole 9.0.2pre NEWS**

* **HyWiki**
* **Global Minor Mode**: The new `hywiki-mode` is a global minor mode that enables the highlighting and hyperlinking of **HyWikiWords** in any non-special text buffer and within the comments of programming buffers.
* **Section Linking**: HyWikiWord links now support internal section jumps using the **`#` character** (e.g., `WikiWord#Section-Name`), allowing direct navigation to specific Org headlines within a wiki page.
* **Web Publishing**: Added the `hywiki-publish-to-html` command (bound to `{C-h h h p}`) which utilizes Org mode’s publishing framework to export an entire HyWiki directory to HTML for web use.
* **Interactive Search**: Added `hywiki-consult-grep` (bound to `{C-h h h g}`) for interactive, live-narrowing searches across all HyWiki pages using the Consult package.
* **Customizable Highlighting**: Added `hywiki-word-highlight-flag` to toggle auto-highlighting and `hywiki-exclude-major-modes` to define a list of modes where HyWikiWord recognition should be disabled.
* **Link Requirements**: New variable `hywiki-org-link-type-required` allows users to control whether the `hy:` prefix is required for HyWikiWords when used inside Org-style double square brackets outside of the wiki directory.

* **Smart Keys**
* **Granular Org Integration**: The custom option `hsys-org-enable-smart-keys` now supports a new value, **`'buttons`**, which limits Hyperbole’s `M-RET` override to only apply when point is on a Hyperbole button, leaving other contexts to native Org mode behavior.
* **Org Table Toggle**: In the Koutliner, pressing the Action Key on a `|` character now toggles **`orgtbl-mode`** for cell-based table editing.
* **Modern Completion Support**: Smart Key argument selection is now fully integrated with the **Vertico and Consult** completion frameworks, allowing for modern interactive selection of buffers, files, and identifiers.
* **Python Tracebacks**: The Action Key now recognizes and jumps to source lines referenced in **Python pdb, traceback, or pytype errors** within any buffer.

* **Implicit Button Types**
* **Social Media References**: Added the `social-reference` type which automatically recognizes and links hashtags and usernames for platforms including **X (Twitter), Facebook, and Instagram**.
* **Social Default Service**: New variable `hibtypes-social-default-service` sets the default platform (initially "x") used when a hashtag or username is referenced without a specific service prefix.
* **Python Navigation**: Added `python-tb-previous-line` to handle instances where Python tracebacks place the source reference one line above the error description.
* **YouTube Interaction**: Added new action types `yt-play`, `yt-info`, and `yt-search` for specialized interaction with **YouTube videos** and metadata.

* **HyRolo**
* **Navigation Performance**: All movement commands within HyRolo match buffers (e.g., Next, Previous, Up) have been optimized to use **text properties** rather than overlays, ensuring instantaneous navigation even in buffers containing thousands of search results.
* **Interactive Filtering**: Added `hyrolo-consult-grep` and `hyrolo-helm-org-rifle` to the Rolo menu, permitting interactive full-text search and narrowing over the `hyrolo-file-list`.
* **Org Roam Integration**: HyRolo now includes convenience commands for searching **Org Roam nodes** via the Consult package, accessible through `hsys-org-roam-consult-grep`.

* **Miscellaneous**
* **Emacs Version Requirements**: While Hyperbole remains compatible with GNU Emacs 27.1, this release is optimized for and recommended for use with **GNU Emacs 28 or above**.
* **Path Variable Expansion**: The function `hpath:expand` has been enhanced to more robustly handle Hyperbole-specific suffixes like `#anchors` and `:line:col` in combination with environment and Lisp variables.


-------------


** ACE WINDOW PACKAGE INTEGRATION - fast window and buffer switching

*** OLD - After installing the ace-window package and loading Hyperbole, execute
Expand Down
125 changes: 75 additions & 50 deletions hactypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 23-Sep-91 at 20:34:36
;; Last-Mod: 5-Jun-26 at 08:42:07 by Bob Weiner
;; Last-Mod: 14-Jun-26 at 16:06:31 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -316,9 +316,9 @@ If `mail-user-agent' is `browse-url', do this in the default web browser."
(interactive "DDirectory to link to: ")
(hpath:find directory))

(defact link-to-ebut (key &optional key-file)
"Perform explicit button action specified by KEY and optional KEY-FILE.
Interactively, KEY-FILE defaults to the current buffer's file name."
(defact link-to-ebut (key &optional key-src)
"Perform explicit button action specified by KEY and optional KEY-SRC.
Interactively, KEY-SRC defaults to the current buffer's file name."
(interactive
(let (but-lbl
but-file)
Expand All @@ -341,17 +341,20 @@ Interactively, KEY-FILE defaults to the current buffer's file name."
(beep))
(ebut:label-to-key but-lbl))
but-file)))
(let (but
normalized-file)
(if key-file
(setq normalized-file (hpath:normalize key-file))
(setq normalized-file (hypb:buffer-file-name)))

(if (setq but (when normalized-file (ebut:get key nil normalized-file)))
(hbut:act but)
(let* ((key-src-buf-flag (or (bufferp key-src)
(and (stringp key-src) (get-buffer key-src))))
(but (if key-src-buf-flag
(ebut:get key key-src)
(ebut:get key nil key-src))))
(if but
(ebut:act but)
(unless key-src-buf-flag
(setq key-src (if key-src
(hpath:normalize key-src)
(hbut:get-key-src t))))
(hypb:error "(link-to-ebut): No button `%s' in `%s'"
(ebut:key-to-label key)
key-file))))
key-src))))

(defact link-to-elisp-doc (symbol)
"Display documentation for SYMBOL."
Expand All @@ -374,8 +377,8 @@ list item returned."
path-buf)
(unwind-protect
(let* ((default-directory (or (hattr:get 'hbut:current 'dir)
(file-name-directory
(or (hattr:get 'hbut:current 'loc) ""))
(and (stringp (hattr:get 'hbut:current 'loc))
(file-name-directory (hattr:get 'hbut:current 'loc)))
default-directory))
(file-path (or (car hargs:defaults) default-directory))
(file-point (cadr hargs:defaults))
Expand Down Expand Up @@ -482,9 +485,9 @@ LINE-NUM may be an integer or string."
col-num)))
(hpath:find-line path line-num col-num))))

(defact link-to-gbut (key &optional _key-file)
(defact link-to-gbut (key &optional _key-src)
"Perform an action given by an existing global button, specified by KEY.
Optional second arg, KEY-FILE, is not used but is for calling
Optional second arg, KEY-SRC, is not used but is for calling
compatibility with the `hlink' function."
(interactive
(let ((gbut-file (hpath:validate (hpath:substitute-value (gbut:file))))
Expand Down Expand Up @@ -534,10 +537,10 @@ the .info suffix in the format with parentheses."
(id-info string)
(hypb:error "(link-to-Info-node): Invalid Info node: `%s'" string)))

(defact link-to-ibut (name-key &optional but-src point)
"Activate implicit button given by NAME-KEY, optional BUT-SRC and POINT.
(defact link-to-ibut (name-key &optional key-src point)
"Activate implicit button given by NAME-KEY, optional KEY-SRC and POINT.
NAME-KEY must be a normalized key for an ibut <[name]>.
BUT-SRC defaults to the current buffer's file or if there is no
KEY-SRC defaults to the current buffer's file or if there is no
attached file, then to its buffer name. POINT defaults to the
current point.

Expand All @@ -560,36 +563,58 @@ on the implicit button to which to link."

(unless name-key
(hypb:error "(link-to-ibut): Point must be on an implicit button to create a link-to-ibut"))
(let (actype
but
normalized-file)
(if but-src
(unless (and (get-buffer but-src)
(not (hypb:buffer-file-name (get-buffer but-src))))
(setq normalized-file (hpath:normalize but-src)))
(setq normalized-file (hpath:normalize (hypb:buffer-file-name))))
(when but-src
(set-buffer (or (get-buffer but-src) (get-file-buffer normalized-file))))
(widen)
(when (or (not normalized-file) (hmail:editor-p) (hmail:reader-p))
(hmail:msg-narrow))
(when (integerp point)
(goto-char (min point (point-max))))
(setq but (ibut:to-text name-key))
(cond (but
(setq actype (actype:def-symbol (hattr:get but 'actype)))
(if (eq actype 'link-to-ibut)
(hypb:error "(link-to-ibut): Failed to find implicit button named `%s' in `%s'"
(ibut:key-to-label name-key)
(or but-src (buffer-name)))
(apply #'actype:act (hattr:get but 'actype)
(hattr:get but 'args))))
(name-key
(hypb:error "(link-to-ibut): No implicit button named `%s' found in `%s'"
(ibut:key-to-label name-key)
(or but-src (buffer-name))))
(t
(hypb:error "(link-to-ibut): Link reference is null/empty")))))

(let* ((key-src-buf-flag (or (bufferp key-src)
(and (stringp key-src) (get-buffer key-src))))
(but (if key-src-buf-flag
(ibut:get name-key key-src)
(ibut:get name-key nil key-src)))
actype
;; normalized-file
)
(if but
(progn (setq actype (actype:def-symbol (hattr:get but 'actype)))
(if (eq actype 'link-to-ibut)
(hypb:error "(link-to-ibut): No button `%s' in `%s'"
(ibut:key-to-label name-key)
(or key-src (buffer-name)))
(ibut:act but)))
(unless key-src-buf-flag
(setq key-src (if key-src
(hpath:normalize key-src)
(hbut:get-key-src t))))
(hypb:error "(link-to-ibut): No button `%s' in `%s'"
(ibut:key-to-label name-key)
key-src))))


;; (if key-src
;; (unless (and (get-buffer key-src)
;; (not (hypb:buffer-file-name (get-buffer key-src))))
;; (setq normalized-file (hpath:normalize key-src)))
;; (setq normalized-file (hpath:normalize (hypb:buffer-file-name))))
;; (when key-src
;; (set-buffer (or (get-buffer key-src) (get-file-buffer normalized-file))))
;; (widen)
;; (when (or (not normalized-file) (hmail:editor-p) (hmail:reader-p))
;; (hmail:msg-narrow))
;; (when (integerp point)
;; (goto-char (min point (point-max))))
;; (setq but (ibut:to-text name-key))
;; (cond (but
;; (setq actype (actype:def-symbol (hattr:get but 'actype)))
;; (if (eq actype 'link-to-ibut)
;; (hypb:error "(link-to-ibut): Failed to find implicit button named `%s' in `%s'"
;; (ibut:key-to-label name-key)
;; (or key-src (buffer-name)))
;; (apply #'actype:act (hattr:get but 'actype)
;; (hattr:get but 'args))))
;; (name-key
;; (hypb:error "(link-to-ibut): No implicit button named `%s' found in `%s'"
;; (ibut:key-to-label name-key)
;; (or key-src (buffer-name))))
;; (t
;; (hypb:error "(link-to-ibut): Link reference is null/empty")))))

(defact link-to-kcell (file cell-ref)
"Display FILE with kcell given by CELL-REF at window top.
Expand Down
Loading