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
82 changes: 82 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,88 @@
2026-04-05 Bob Weiner <rsw@gnu.org>

* hyrolo.el (hyrolo-hdr-to-first-line-p): Handle black lines and @loc> after
two lines of 'hyrolo-hdr-regexp'. Move by visible lines.
(hyrolo-outline-next-visible-heading): Fix moving when in a file
hdr but not at the start of a line. Fix forward and backward movement
when entries are hidden.
(hyrolo-hdr-to-first-line-p, hyrolo-hdr-move-after-p): Return t
only if point is left on a visible, non-hidden character to fix next
and previous entry movement.
(hyrolo-hdr-in-p): Rewrite with 'hyrolo-hdr-to-first-line-p'
instead of 'hyrolo-hdr-move-after-p' since that can return nil when it
leaves point at a hidden/invisible position.

2026-04-04 Bob Weiner <rsw@gnu.org>

* hyrolo.el (hyrolo-grep-file): Change to call 'hyrolo-set-display-buffer'
to set display buffer as current.
(hyrolo-set-display-buffer): Remove set and restore of major-mode;
handle these separately so done only once per file processed.
(hyrolo-set-display-buffer-mode): Add to separate from the above
function.
(hyrolo--cache-post-display-buffer): Rename to
'hyrolo--post-display-buffer' and set major mode.
(hyrolo-cache-set-major-mode): Rename to
'hyrolo--pre-display-buffer' and leave out setting of major mode
as that may come from the cache or from a current source buffer.
(hyrolo-source-buffer): Add for quick access to the source buffer
or file associated with (point) within the HyRolo display buffer.
(hyrolo-grep-file): Rename 'actual-buf' to 'src-buf'.
(defvar-local): Stop using since sets local values in buffers that
do not use the variable. Use 'defvar' and 'setq-local' to set in a single
buffer.
(hyrolo-hdr-move-after-p): Fix to handle when point is not at the
start of file header line but is within the header.
(hyrolo-to-entry-beginning): Remove unneeded call to 'hyrolo-hdr-in-p'.
(hyrolo-hdr-move-after-p): Remove duplicate (beginning-of-line) calls.
(hyrolo-hdr-to-first-line-p): Return nil if point is at the start of
the first line of a file header and therefore it doesn't move. Optimize and
clarify cases.
hui-mouse.el (smart-hyrolo): Fix to handle change in above function.


2026-04-03 Bob Weiner <rsw@gnu.org>

* hyrolo.el (hyrolo-cache-set-major-mode): Add setting of
'hyrolo-entry-regexp' when in 'markdown-mode'. Used in
'hyrolo-add-match'.

* hproperty.el (hproperty:length): Add and use in HyRolo.

2026-04-02 Mats Lidell <matsl@gnu.org>

* hsys-org.el (hsys-org-id-find-advice): Fix docstring has wrong usage
of unescaped single quotes and make first line a sentence.

2026-03-31 Bob Weiner <rsw@gnu.org>

* hyrolo.el (hyrolo-outline-next-visible-heading): Optimize performance in
large files.
(hyrolo-display-format-function, hyrolo-bbdb-entry-format):
Change from a function of one arg, a HyRolo entry, to two args, start and
end, the region to modify for display.
(hyrolo-display-format): Define to avoid lambda creation on
display of each HyRolo entry.
(hyrolo-display-format-function): Use above function as value.
(hyrolo-add-match): Rewrite to insert directly into display-buffer
without generating Lisp-level strings. Also add :hyrolo-level = t property
around any leading outline delimiter (excluding trailing whitespace) across
all heading levels within a matching entry. For single line, non-delimited
entries on the first char of the entry. Use this to speed movement between
entries in the HyRolo match buffer.
(hyrolo-cache-set-major-mode): Delay mode hooks since only using
the mode to get 'outline-regexp' and these can be time-consuming.

2026-03-30 Bob Weiner <rsw@gnu.org>

* hyrolo.el (hyrolo-grep-file): Fix *word* at bol causing the search to
get stuck. Always move at least one char past the end of an entry.
(hyrolo-to-entry-end): Rewrite for speed by only moving past the
header if at the beginning of the buffer. Remove lambda generation to
eliminate function generation on every call.
(hyrolo-next-match): Speed up a bit with local vars and add in-line
comments to explain logic.

2026-03-30 Mats Lidell <matsl@gnu.org>

* test/kotl-mode-tests.el (kotl-mode-split-cell): Use kotl-mode:kill-tree
Expand All @@ -13,6 +93,8 @@

2026-03-29 Bob Weiner <rsw@gnu.org>

* man/hyperbole.texi (Testing): Update from 200 to 660 automated test cases.

* hypb.el (hypb:in-string-cache): Move Private Variable definitions to precede
code so they are not referenced before they are defined.

Expand Down
12 changes: 11 additions & 1 deletion hproperty.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Aug-92
;; Last-Mod: 31-Jan-26 at 22:44:11 by Bob Weiner
;; Last-Mod: 3-Apr-26 at 19:36:41 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -415,6 +415,16 @@ VALUE is optional; if omitted, use the first char-property at POS with PROPERTY.
(unless (or (null start) (null end) (= start end))
(cons start end))))

;;;###autoload
(defun hproperty:length-p (prop value)
"Return the length of the region from point where PROP has VALUE.
Return nil if no match at point."
(let ((start (point))
end)
(and (equal (get-text-property start prop) value)
(setq end (next-single-property-change start prop nil (point-max)))
(- end start))))

(defun hproperty:overlay-range (pos property &optional value)
"Return the first overlay range (start . end) at POS where PROPERTY = VALUE.
Return nil if no such overlay range. If POS is nil, use point.
Expand Down
9 changes: 5 additions & 4 deletions hui-mouse.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Feb-89
;; Last-Mod: 23-Mar-26 at 21:47:31 by Bob Weiner
;; Last-Mod: 4-Apr-26 at 23:19:29 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1475,16 +1475,17 @@ If assist key is pressed within:

(defun smart-hyrolo ()
"In hyrolo match buffer, edit current entry.
If on a file header, edit the file. Uses one key or mouse key.
If on a file header, edit the file at current point. Uses one key or mouse
key.

Invoked via a key press when in the `hyrolo-display-buffer'. Assume that
its caller has already checked that the key was pressed in an appropriate
buffer and has moved the cursor to the selected buffer."
(interactive)
(if (hyrolo-hdr-in-p)
(hact 'hyp-source (save-excursion
(when (and (hyrolo-hdr-to-first-line-p)
(search-forward hbut:source-prefix nil t))
(hyrolo-hdr-to-first-line-p)
(when (search-forward hbut:source-prefix nil t)
(hbut:source t))))
(hyrolo-edit-entry)))

Expand Down
4 changes: 2 additions & 2 deletions hynote.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 23-Jun-24 at 12:50:37
;; Last-Mod: 18-Jan-26 at 08:29:26 by Bob Weiner
;; Last-Mod: 2-Apr-26 at 23:13:51 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -77,7 +77,7 @@ Otherwise, return (nil nil nil)."
(defib hynote-file ()
"When on a HyNote file name stem, display the file and its optional section.
This type is active only in buffers where `hywiki-active-in-current-buffer-p'
is true. This may require that (hywiki-mode) has been enabled."
is true. This may require that `hywiki-mode' has been enabled."
(when (hywiki-active-in-current-buffer-p)
(cl-destructuring-bind (file-stem-name start end)
(hynote-file-stem-start-end-at)
Expand Down
4 changes: 2 additions & 2 deletions hyrolo-logic.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 13-Jun-89 at 22:57:33
;; Last-Mod: 22-Nov-25 at 07:56:55 by Bob Weiner
;; Last-Mod: 4-Apr-26 at 14:15:14 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -196,7 +196,7 @@ Return the number of evaluations of SEXP that match entries."
((list in-bufs)))))
(total-matches (apply '+ result)))
(unless (or count-only (= total-matches 0))
(hyrolo--cache-post-display-buffer)
(hyrolo--post-display-buffer)
(hyrolo-display-matches display-buf))
total-matches))

Expand Down
Loading