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
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2026-09-16 Bob Weiner <rsw@gnu.org>

* hsys-org.el (hsys-org-meta-return): Fix bug reported by James S where
org removes HyWiki highlighting on a previous line when inserting
a new list item for example due to a delete and insert combination
of calls.

2026-09-13 Mats Lidell <matsl@gnu.org>

* Makefile (install-melpa-snapshots install-melpa-releases): Use
Expand Down
21 changes: 17 additions & 4 deletions hsys-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 2-Jul-16 at 14:54:14
;; Last-Mod: 18-Jul-26 at 00:36:47 by Bob Weiner
;; Last-Mod: 16-Sep-26 at 12:54:13 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -67,6 +67,8 @@
(declare-function hyrolo-tags-view "hyrolo")
(declare-function hyrolo-at-tags-p "hyrolo")
(declare-function hywiki-at-tags-p "hywiki")
(declare-function hywiki-maybe-highlight-region "hywiki")
(declare-function hywiki-non-hook-context-p "hywiki")
(declare-function hywiki-tags-view "hywiki")
(declare-function hsys-org-roam-tags-view "hsys-org")

Expand Down Expand Up @@ -396,9 +398,20 @@ Do nothing if called outside of `org-mode'."
(error "(hsys-org-meta-return): \"%s\" must not be read-only; toggle with {%s}"
(buffer-name)
(key-description (car (where-is-internal #'read-only-mode)))))
(if current-prefix-arg
(org-meta-return (prefix-numeric-value current-prefix-arg))
(org-meta-return))))
;; `org-meta-return' runs delete and insert functions over prior list
;; items, as an example, which can erase HyWiki highlighting, so ensure
;; the appropriate region is re-highlighted when needed.
;; -- RSW, 2026-09-16
(let ((opoint (point-marker)))
(unwind-protect
(progn
(if current-prefix-arg
(org-meta-return (prefix-numeric-value current-prefix-arg))
(org-meta-return))
(when (and (fboundp 'hywiki-non-hook-context-p)
(not (hywiki-non-hook-context-p)))
(hywiki-maybe-highlight-region opoint (point))))
(set-marker opoint nil)))))

;;;###autoload
(defun hsys-org-consult-grep (&optional regexp max-matches path-list prompt)
Expand Down
25 changes: 12 additions & 13 deletions man/use-package
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,8 @@

(use-package hyperbole

;; ensure Hyperbole is installed
;; :ensure t

;; Initialize the global HyWiki minor mode to one of these values:
;; :all - highlights and makes HyWikiWord links active in
;; all text and programming buffer comments
;; :pages - highlights and makes HyWikiWord links active in
;; only within HyWiki page buffers
;; nil - leaves HyWiki mode disabled.
:init
(progn
;; Older Hyperbole releases do not have HyWiki
(when (fboundp 'hywiki-mode)
(hywiki-mode :all))

;; Initialize the global Hyperbole minor mode to one of these values:
;; 1 - enabled on startup so the Action and Assist Smart Keys are active
;; 0 - off until you toggle it on
Expand All @@ -25,7 +12,19 @@
(bound-and-true-p hywiki-mode))
(hyperbole-mode 1)))

;; Older Hyperbole releases do not have HyWiki
(when (bound-and-true-p hywiki-mode)
;; Initialize the global HyWiki minor mode to one of these values:
;; :all - highlights and makes HyWikiWord links active in
;; all text and programming buffer comments
;; :pages - highlights and makes HyWikiWord links active in
;; only within HyWiki page buffers
;; nil - leaves HyWiki mode disabled.
(hywiki-mode :all))

:bind
;; Bind Smart Keys: {M-RET} is the Action Key; {C-u M-RET} is the
;; Assist Key
(("M-RET" . hkey-either)
;; Uncomment the next binding if you want to emulate Hyperbole mouse drag
;; events from your keyboard.
Expand Down