branch: externals/hyperbole commit a8cdad694bd3b616fbd6f5f7fc0c6b7d63cca0f7 Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
Fix `hyrolo-min-matched-level' and hyrolo-top-level test This fixes hyrolo-top-level which was displaying non-top-level entries --- ChangeLog | 7 +++++++ hyrolo.el | 4 ++-- test/hyrolo-tests.el | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e23d607716..4cb7a544d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ 2024-02-19 Bob Weiner <r...@gnu.org> + * hyrolo.el (hyrolo-mode): Set these two missing variables: 'hyrolo-entry-group-number' and 'hyrolo-entry-trailing-space-group-number'. + (hyrolo-outline-level): Fix to use the length of match to + 'hyrolo-entry-group-number'. + (hyrolo-min-matched-level): Fix 'hyrolo-top-level'. First + 'outline-regexp' match was ignored when computing min-level; fix to include. + test/hyrolo-tests.el (hyrolo-tests--top-level-outline-for-all-file-types): + Fix kotl-mode match string to include only the top-level entry line. 2024-02-18 Mats Lidell <ma...@gnu.org> diff --git a/hyrolo.el b/hyrolo.el index 3b550358e1..60c006eb23 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 7-Jun-89 at 22:08:29 -;; Last-Mod: 19-Feb-24 at 10:47:52 by Bob Weiner +;; Last-Mod: 19-Feb-24 at 11:33:53 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -3089,7 +3089,7 @@ This must be 1 or greater." (goto-char (point-min)) (let ((min-level 1000)) (when (looking-at outline-regexp) - (funcall outline-level)) + (setq min-level (min min-level (funcall outline-level)))) (while (outline-next-heading) (setq min-level (min min-level (funcall outline-level)))) (max min-level 1)))) diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el index ab85772d9b..4f700d02d5 100644 --- a/test/hyrolo-tests.el +++ b/test/hyrolo-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> ;; ;; Orig-Date: 19-Jun-21 at 22:42:00 -;; Last-Mod: 18-Feb-24 at 18:14:07 by Bob Weiner +;; Last-Mod: 19-Feb-24 at 11:39:19 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1396,7 +1396,6 @@ body (hyrolo-tests--hyrolo-section-header kotl-file1) "\ 1. h-kotl... - 1a. h-kotl 1... ") (hyrolo-tests--outline-as-string)))) (kill-buffer hyrolo-display-buffer)