branch: externals/hyperbole
commit dbe1f6c13bd3672d7174dd2a684f5a58bb1ec8ae
Author: bw <[email protected]>
Commit: bw <[email protected]>
hyrolo-grep-file - Fix bug#79643. Mark region end for `hyrolo-yank'
---
ChangeLog | 7 +++++++
hyrolo.el | 7 ++++---
hyrolo.py | 4 ++--
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ad300f4cf9..55bc7b3b59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-10-18 Bob Weiner <[email protected]>
+
+* hyrolo.el (hyrolo-grep-file): Fix bug#79643. Add a mark at the end point of
+ all record insertions so can be referenced in 'hyrolo-yank' when calls
+ 'hyrolo-yank-reformat-function'. This also allows the user to mark the
region
+ yanked with {C-x C-x}.
+
2025-10-12 Bob Weiner <[email protected]>
* hywiki.el (hywiki-ignore-face-list): Ignore org-links.
diff --git a/hyrolo.el b/hyrolo.el
index 22286cec37..48489b1fb1 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: 2-Oct-25 at 14:26:58 by Mats Lidell
+;; Last-Mod: 18-Oct-25 at 11:31:47 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -1609,7 +1609,7 @@ instead of a string."
(hyrolo-grep (if regexp-flag name (regexp-quote name)) -1 nil nil
t))))
;; Let user reformat the region just yanked.
(when (= found 1)
- (funcall hyrolo-yank-reformat-function start (point)))
+ (funcall hyrolo-yank-reformat-function start (mark)))
found))
;;; ************************************************************************
@@ -2011,7 +2011,7 @@ Return non-nil if point moves, else return nil."
(apply #'hyrolo-search-directories #'hyrolo-grep file-regexp dirs))
(defun hyrolo-grep-file (hyrolo-file-or-buf pattern &optional max-matches
count-only headline-only)
- "Retrieve entries in HYROLO-FILE-OR-BUF matching REGEXP.
+ "Retrieve entries in HYROLO-FILE-OR-BUF matching PATTERN.
PATTERN is searched for using the function given by
`hyrolo-next-match-function', so it can be a text property for
example, rather than just a regexp matching buffer text.
@@ -2130,6 +2130,7 @@ Return number of matching entries found."
num-found))
(when (and (> num-found 0) (not count-only))
(with-current-buffer hyrolo-display-buffer
+ (push-mark nil t)
;; Require a final blank line in `hyrolo-display-buffer'
;; so that `outline-hide-sublevels' won't hide it and
;; combine with any next file header.
diff --git a/hyrolo.py b/hyrolo.py
index 9734adc281..fe5344299d 100644
--- a/hyrolo.py
+++ b/hyrolo.py
@@ -8,11 +8,11 @@
# Author: Bob Weiner
#
# Orig-Date: 1-Apr-24 at 01:45:27
-# Last-Mod: 16-Jun-25 at 00:03:41 by Bob Weiner
+# Last-Mod: 12-Oct-25 at 11:03:34 by Bob Weiner
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
-# Copyright (C) 2024 Free Software Foundation, Inc.
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
# See the "HY-COPY" file for license information.
#
# This file is part of GNU Hyperbole.