[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 2845c1225d 13/14: Merge pull request #484 fro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 2845c1225d 13/14: Merge pull request #484 from rswgnu/rsw |
Date: |
Fri, 22 Mar 2024 12:58:27 -0400 (EDT) |
branch: externals/hyperbole
commit 2845c1225d27424a4296cdebac94826f51dc722e
Merge: 00682a4144 6b5650f590
Author: Robert Weiner <rsw@gnu.org>
Commit: GitHub <noreply@github.com>
Merge pull request #484 from rswgnu/rsw
Set in-progress release to 9.0.2pre
---
ChangeLog | 51 ++++++++++++++++++---
HY-ABOUT | 2 +-
Makefile | 107 +++++++++++++++++++++----------------------
README.md | 2 +-
README.toc.md | 22 +--------
hactypes.el | 5 +-
hbut.el | 8 ++--
hload-path.el | 16 ++++---
hpath.el | 71 ++++++++++++++++++----------
hui.el | 55 ++++++++++++++--------
hversion.el | 4 +-
hypb-maintenance.el | 4 +-
hyperbole.el | 4 +-
hyrolo.el | 14 +++++-
man/hyperbole.texi | 4 +-
test/demo-tests.el | 4 +-
test/hy-test-dependencies.el | 5 +-
test/hypb-ert-tests.el | 4 +-
test/hyrolo-tests.el | 8 ++--
test/kotl-mode-tests.el | 4 +-
20 files changed, 234 insertions(+), 160 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 171852d847..876cbbcf35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2024-03-21 Bob Weiner <rsw@gnu.org>
+
+* hpath.el (hpath:line-column-instance-regexp): Add and use in addition to
+ 'hpath:line-and-column-regexp'.
+ (hpath:find): Add above variable and instance handling logic.
+ (hpath:to-markup-anchor): Add optional arg 'instance-num'.
+ (hpath:is-p): Fix to handle paths with instance-num, line and col
num.
+ (hpath:to-markup-anchor): Change to leave point at the start of the
anchor.
+* hbut.el (ibut:insert-text): Use anchor format in link-to-string-match when
+ given an instance-num.
+
+* hyrolo.el (hyrolo-normalize-mode-function): Add and attach to
+ `window-buffer-change-functions' to ensure normal modes are used when
editing
+ Org or Markdown files.
+
+* hui.el (hui:link-possible-types): When a single-line region is active in the
+ referent buffer, create a link-to-string-match link to the text in the
region.
+
+* hload-path.el (hyperb:generate-autoloads): Kill autoload buffers after
generating
+ them so does not interfere with package manager builds which may also
generate
+ these autoload files.
+
2024-03-17 Mats Lidell <matsl@gnu.org>
* Makefile (dockerized): Add target to run make with a dockerized Emacs.
@@ -21,8 +43,30 @@
(hyrolo-tests--goto-kotl-header-with-slash-match): Test action key on
a hyrolo match.
+2024-03-12 Bob Weiner <rsw@gnu.org>
+
+* hypb-maintenance.el (hypb:web-repo-update): Add "hib-doc-id.el".
+
2024-03-10 Bob Weiner <rsw@gnu.org>
+* test/hyrolo-tests.el (hyrolo-tests--outline-hide-show-heading): Change two
+ calls of 'next-line' to 'forward-visible-line'.
+
+* test/hy-test-dependencies.el (hy-test-ensure-package-installed): Fix to both
+ install and require the package.
+
+* hactypes.el (org-fold-show-context): Declare Org function available in some
+ versions of Emacs to suppress byte-compiler warning.
+
+* test/kotl-mode-tests.el (hy-test-dependencies):
+ test/hyrolo-tests.el (hy-test-dependencies):
+ test/hypb-ert-tests.el (hy-test-dependencies)
+ test/demo-tests.el (hy-test-dependencies): Add to ensure el-mock is
installed.
+
+==============================================================================
+V9.0.2pre changes ^^^^:
+==============================================================================
+
* hversion.el:
hyperbole.el: Release version 9.0.1
@@ -1414,10 +1458,6 @@ V9.0.1 changes ^^^^:
(hyrolo-fgrep-and-goto-next-visible-md-heading): Use level one heading
so that heading hierarchy is respected.
-==============================================================================
-V8.0.2pre changes ^^^^:
-==============================================================================
-
2023-12-01 Bob Weiner <rsw@gnu.org>
* hyrolo.el (hyrolo-add): Fix that narrow-to-region was narrowing to a
@@ -4926,9 +4966,6 @@ name with 'name' and 'name-key'.
* Makefile (website-local): Add dependency on README.md.html.
-==============================================================================
-V8.0.1pre changes ^^^^:
-==============================================================================
==============================================================================
V9.0.0 changes ^^^^:
==============================================================================
diff --git a/HY-ABOUT b/HY-ABOUT
index 91e0b61589..e9d9da2fed 100644
--- a/HY-ABOUT
+++ b/HY-ABOUT
@@ -3,7 +3,7 @@
Designed and Written by Bob Weiner
Maintained by Mats Lidell and Bob Weiner
https://www.gnu.org/software/hyperbole/
- Version 9.0.1
+ Version 9.0.2pre
Say thanks or send a testimonial if you like Hyperbole:
Email: <rsw@gnu.org>
diff --git a/Makefile b/Makefile
index 6fb2a52aec..caa5789da1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
# Author: Bob Weiner
#
# Orig-Date: 15-Jun-94 at 03:42:38
-# Last-Mod: 17-Mar-24 at 00:49:27 by Mats Lidell
+# Last-Mod: 22-Mar-24 at 08:48:26 by Bob Weiner
#
# Copyright (C) 1994-2023 Free Software Foundation, Inc.
# See the file HY-COPY for license information.
@@ -89,7 +89,7 @@
# This ver setup won't work under any make except GNU make, so set it manually.
#HYPB_VERSION = "`head -3 hversion.el | tail -1 | sed -e 's/.*|\(.*\)|.*/\1/'`"
-HYPB_VERSION = 9.0.1
+HYPB_VERSION = 9.0.2pre
# Emacs executable used to byte-compile .el files into .elc's.
# To override which executable is used from the commandline, do something like
this:
@@ -220,45 +220,45 @@ EL_TAGS = $(EL_SRC) $(EL_KOTL) $(TEST_ERT_FILES)
.SUFFIXES: .el .elc # Define the list of file suffixes to match to rules
help:
- @ echo "Use the Emacs Package Manager to build and install the latest
release of GNU Hyperbole."
- @ echo "For help with Emacs packages, see the GNU Emacs Info Manual
section, \"(emacs)Packages\"."
- @ echo "See \"$(shell pwd)/INSTALL\" for detailed installation
instructions,"
- @ echo "including how to install Hyperbole pre-releases from the git
repo tip."
- @ echo ""
-
- @ echo "To setup Hyperbole to run directly from the latest test source
code, use:"
- @ echo " git clone http://git.savannah.gnu.org/r/hyperbole.git"
- @ echo " cd hyperbole"
- @ echo " Then use either:"
- @ echo " make src - setup to run directly from .el files"
- @ echo " or"
- @ echo " make bin - setup to build and run from .elc files"
- @ echo ""
-
- @ echo "For Hyperbole maintainers only:"
- @ echo " To run unit tests:"
- @ echo " make test-all - run all tests with Emacs under a
window system"
- @ echo " make test - run non-interactive tests with Emacs
in batch mode"
- @ echo " To verify hyperbole installation using different sources:"
- @ echo " make install-<source>"
- @ echo " where <source> can be 'elpa', 'elpa-devel', 'tarball'
(tarball from elpa-devel),"
- @ echo " 'straight' (git master from savannah) or 'all'."
- @ echo " To build the Hyperbole distribution package:"
- @ echo " make pkg"
- @ echo " To build documentation formats only:"
- @ echo " make doc"
- @ echo " To generate and upload the public Hyperbole website:"
- @ echo " make website"
- @ echo " To release a Hyperbole Emacs package to ELPA and ftp.gnu.org:"
- @ echo " make release"
- @ echo ""
-
- @ echo "The Hyperbole Manual is included in the package in four forms:"
- @ echo " man/hyperbole.info - GNU browsable version"
- @ echo " man/hyperbole.html - Web browsable version"
- @ echo " man/hyperbole.pdf - Printable version"
- @ echo " man/hyperbole.texi - source form"
- @ echo ""
+ @echo "Use the Emacs Package Manager to build and install the latest
release of GNU Hyperbole."
+ @echo "For help with Emacs packages, see the GNU Emacs Info Manual
section, \"(emacs)Packages\"."
+ @echo "See \"$(shell pwd)/INSTALL\" for detailed installation
instructions,"
+ @echo "including how to install Hyperbole pre-releases from the git
repo tip."
+ @echo ""
+
+ @echo "To setup Hyperbole to run directly from the latest test source
code, use:"
+ @echo " git clone http://git.savannah.gnu.org/r/hyperbole.git"
+ @echo " cd hyperbole"
+ @echo " Then use either:"
+ @echo " make src - setup to run directly from .el files"
+ @echo " or"
+ @echo " make bin - setup to build and run from .elc files"
+ @echo ""
+
+ @echo "For Hyperbole maintainers only:"
+ @echo " To run unit tests:"
+ @echo " make test-all - run all tests with Emacs under a
window system"
+ @echo " make test - run non-interactive tests with Emacs
in batch mode"
+ @echo " To verify hyperbole installation using different sources:"
+ @echo " make install-<source>"
+ @echo " where <source> can be 'elpa', 'elpa-devel', 'tarball'
(tarball from elpa-devel),"
+ @echo " 'straight' (git master from savannah) or 'all'."
+ @echo " To build the Hyperbole distribution package:"
+ @echo " make pkg"
+ @echo " To build documentation formats only:"
+ @echo " make doc"
+ @echo " To generate and upload the public Hyperbole website:"
+ @echo " make website"
+ @echo " To release a Hyperbole Emacs package to ELPA and ftp.gnu.org:"
+ @echo " make release"
+ @echo ""
+
+ @echo "The Hyperbole Manual is included in the package in four forms:"
+ @echo " man/hyperbole.info - GNU browsable version"
+ @echo " man/hyperbole.html - Web browsable version"
+ @echo " man/hyperbole.pdf - Printable version"
+ @echo " man/hyperbole.texi - source form"
+ @echo ""
all: help
@@ -342,16 +342,15 @@ clean:
$(RM) hyperbole-autoloads.el kotl/kotl-autoloads.el $(ELC_COMPILE)
$(ELC_KOTL) TAGS
version:
- @ echo ""
- @ rm -f WRONG-VERSIONS
- @ fgrep -L $(HYPB_VERSION) Makefile HY-ABOUT HY-ANNOUNCE HY-NEWS
README.md hversion.el hyperbole.el man/hyperbole.texi man/version.texi >
WRONG-VERSIONS
- @ # If any file(s) have wrong version number, print them and exit with
code 1
- @ if [ -s WRONG-VERSIONS ]; then \
+ @echo ""
+ @fgrep -L $(HYPB_VERSION) Makefile HY-ABOUT HY-ANNOUNCE HY-NEWS
README.md hversion.el hyperbole.el man/hyperbole.texi man/version.texi >
WRONG-VERSIONS
+ @# If any file(s) have wrong version number, print them and exit with
code 1
+ @if [ -s WRONG-VERSIONS ]; then \
echo "The following files do not have the proper Hyperbole version
number, $(HYPB_VERSION):"; \
cat WRONG-VERSIONS; rm -f WRONG-VERSIONS; exit 1; \
fi
- @ rm -f WRONG-VERSIONS
- @ echo ""
+ @rm -f WRONG-VERSIONS
+ @echo ""
# Build the README.md.html and Info, HTML and Postscript versions of the user
manual
doc: version README.md.html manual
@@ -391,7 +390,7 @@ website-local: README.md.html
# Push to public Hyperbole website
website: website-local
cd $(HYPB_WEB_REPO_LOCATION) && $(CVS) commit -m "Hyperbole release
$(HYPB_VERSION)"
- @ echo "Website for Hyperbole $(HYPB_VERSION) is updated."
+ @echo "Website for Hyperbole $(HYPB_VERSION) is updated."
# Generate a Hyperbole package suitable for distribution via the Emacs package
manager.
pkg: package
@@ -400,28 +399,28 @@ package: tags doc
$(pkg_parent)/hyperbole-$(HYPB_VERSION).tar.sig
# Generate and distribute a Hyperbole release to ftp.gnu.org.
# One step in this is to generate an autoloads file for the Koutliner,
kotl/kotl-autoloads.el.
release: git-pull git-verify-no-update package
$(pkg_parent)/hyperbole-$(HYPB_VERSION).tar.gz ftp website git-tag-release
- @ echo "Hyperbole $(HYPB_VERSION) is released."
+ @echo "Hyperbole $(HYPB_VERSION) is released."
# Ensure local hyperbole directory is synchronized with master before building
a release.
git-pull:
- @ echo "If this step fails check your work directory for not committed
changes"
+ @echo "If this step fails check your work directory for not committed
changes"
git checkout master && git pull
git diff-index --quiet master
git-verify-no-update:
- @ echo "If this step fails check your work directory for updated docs
and push these to savannah"
+ @echo "If this step fails check your work directory for updated docs
and push these to savannah"
git diff-index --quiet master
git-tag-release:
git tag -a hyperbole-$(HYPB_VERSION) -m "Hyperbole release
$(HYPB_VERSION)"
git push origin hyperbole-$(HYPB_VERSION)
- @ echo "Hyperbole $(HYPB_VERSION) is tagged as
hyperbole-$(HYPB_VERSION)."
+ @echo "Hyperbole $(HYPB_VERSION) is tagged as
hyperbole-$(HYPB_VERSION)."
# Send compressed tarball for uploading to GNU ftp site; this must be done
from the directory
# containing the tarball to upload.
ftp: package $(pkg_parent)/hyperbole-$(HYPB_VERSION).tar.gz
cd $(pkg_parent) && $(GNUFTP) hyperbole-$(HYPB_VERSION).tar.gz
- @ echo "Hyperbole $(HYPB_VERSION) uploaded to ftp.gnu.org."
+ @echo "Hyperbole $(HYPB_VERSION) uploaded to ftp.gnu.org."
# Autoloads
autoloads: kotl/kotl-autoloads.el hyperbole-autoloads.el
diff --git a/README.md b/README.md
index f25ae82888..f7358550b6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# GNU Hyperbole 9.0.1 - The Everyday Hypertextual Information Manager
+# GNU Hyperbole 9.0.2pre - The Everyday Hypertextual Information Manager
[We work on Hyperbole as a gift to the Emacs community and request you
send us a thank you or a testimonial describing your usage if you like
diff --git a/README.toc.md b/README.toc.md
index 1ca98c8ed4..f7358550b6 100644
--- a/README.toc.md
+++ b/README.toc.md
@@ -1,28 +1,10 @@
-# GNU Hyperbole 9.0.1 - The Everyday Hypertextual Information Manager
+# GNU Hyperbole 9.0.2pre - The Everyday Hypertextual Information Manager
[We work on Hyperbole as a gift to the Emacs community and request you
send us a thank you or a testimonial describing your usage if you like
Hyperbole (mailto:rsw@gnu.org)].
-
-
-- [GNU Hyperbole 9.0.1 - The Everyday Hypertextual Information
Manager](#gnu-hyperbole-901---the-everyday-hypertextual-information-manager)
- - [Videos](#videos)
- - [Summary](#summary)
- - [Mailing Lists](#mailing-lists)
- - [Ftp and Git Repository Downloads](#ftp-and-git-repository-downloads)
- - [Installation](#installation)
- - [Invocation](#invocation)
- - [Hyperbole Components](#hyperbole-components)
- - [Hyperbole Buttons](#hyperbole-buttons)
- - [Important Features](#important-features)
- - [Hyperbole Uses](#hyperbole-uses)
- - [Files](#files)
- - [Programmer Quick Reference](#programmer-quick-reference)
- - [User Quotes](#user-quotes)
- - [Why was Hyperbole developed?](#why-was-hyperbole-developed)
-
-
+[TOC]
![Hyperbole screenshot of the Koutliner, DEMO file and
HyRolo](man/im/hyperbole-cv.png)
diff --git a/hactypes.el b/hactypes.el
index d42f16ea84..c855245d3a 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 23-Sep-91 at 20:34:36
-;; Last-Mod: 10-Mar-24 at 11:28:18 by Bob Weiner
+;; Last-Mod: 10-Mar-24 at 18:35:02 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -29,8 +29,9 @@
(declare-function kotl-mode:goto-cell-ref "kotl-mode")
(declare-function kcell-view:indent "kcell-view")
-(declare-function rmail:msg-to-p "hrmail")
+(declare-function org-fold-show-context "org-fold")
(declare-function org-roam-id-find "ext:org-roam-id")
+(declare-function rmail:msg-to-p "hrmail")
;;; ************************************************************************
;;; Standard Hyperbole action types
diff --git a/hbut.el b/hbut.el
index 6150188c7a..f26f70018e 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 18-Sep-91 at 02:57:09
-;; Last-Mod: 12-Mar-24 at 22:04:28 by Mats Lidell
+;; Last-Mod: 21-Mar-24 at 15:30:13 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -2643,10 +2643,8 @@ Summary of operations based on inputs (name arg from
\\='hbut:current attrs):
;; includes buffer pos that we translate to line:col
(hpath:file-position-to-line-and-column arg1 arg2)))))
('actypes::link-to-string-match
- (if (= arg2 1)
- (insert (format "\"%s#%s\"" (hpath:shorten arg3) arg1))
- (insert (format "<%s \"%s\" %d \"%s\">" (actype:def-symbol actype)
arg1 arg2
- (hpath:shorten arg3)))))
+ (insert (format "\"%s#%s%s\"" (hpath:shorten arg3) arg1
+ (if (<= arg2 1) "" (concat ":I" (number-to-string
arg2))))))
('nil (error "(ibut:insert-text): actype must be a Hyperbole actype or
Lisp function symbol, not '%s'" orig-actype))
;; Generic action button type
(_ (insert (format "<%s%s%s>" (actype:def-symbol actype) (if args " " "")
diff --git a/hload-path.el b/hload-path.el
index fb554a3e55..c534dc82cc 100644
--- a/hload-path.el
+++ b/hload-path.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 29-Jun-16 at 14:39:33
-;; Last-Mod: 10-Mar-24 at 12:07:48 by Bob Weiner
+;; Last-Mod: 21-Mar-24 at 11:35:21 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -166,13 +166,17 @@ This is used only when running from git source and not a
package release."
(let* ((default-directory hyperb:dir)
(backup-inhibited t)
(find-file-hook) ;; Prevent header insertion
- (al-file (expand-file-name "hyperbole-autoloads.el")))
+ (al-file (expand-file-name "hyperbole-autoloads.el"))
+ (al-buf (find-file-noselect al-file)))
;; (make-local-variable 'generated-autoload-file)
- (with-current-buffer (find-file-noselect al-file)
+ (with-current-buffer al-buf
(hload-path--make-directory-autoloads "." al-file))
- (setq al-file (expand-file-name "kotl/kotl-autoloads.el"))
- (with-current-buffer (find-file-noselect al-file)
- (hload-path--make-directory-autoloads "." al-file)))
+ (kill-buffer al-buf)
+ (setq al-file (expand-file-name "kotl/kotl-autoloads.el")
+ al-buf (find-file-noselect al-file))
+ (with-current-buffer al-buf
+ (hload-path--make-directory-autoloads "." al-file))
+ (kill-buffer al-buf))
(unless (hyperb:autoloads-exist-p)
(error "Hyperbole failed to generate autoload files; try running 'make
src' in a shell in %s" hyperb:dir)))
diff --git a/hpath.el b/hpath.el
index fa077a88f4..a7a6161b27 100644
--- a/hpath.el
+++ b/hpath.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 1-Nov-91 at 00:44:23
-;; Last-Mod: 18-Feb-24 at 12:20:15 by Mats Lidell
+;; Last-Mod: 21-Mar-24 at 16:06:32 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -67,15 +67,22 @@ Default is nil since this can slow down normal file
finding."
(defconst hpath:line-and-column-regexp
":L?\\([-+]?[0-9]+\\)\\(:C?\\([-+]?[0-9]+\\)\\)?\\s-*\\'"
- "Regexp matching a trailing line number with an optional column number.
-Path, line number and column are colon separated.
-Group 1 is the line number. Group 3 is the column number.")
+ "Regexp matching a trailing line number and optional column number.
+Path, line and column numbers are colon separated. Group 1 is the
+1-based line number. Group 3 is the 0-based column number.")
+
+(defconst hpath:instance-line-column-regexp
+
":I\\([-+]?[0-9]+\\)\\(:L?\\([-+]?[0-9]+\\)\\)?\\(:C?\\([-+]?[0-9]+\\)\\)?\\s-*\\'"
+ "Regexp matching a trailing instance, optional line, and column number.
+Path, instance, line, and column numbers are colon separated. Group 1
+is the instance/occurrence number when searching from the buffer start.
+Group 3 is the 1-based line number. Group 5 is the 0-based column number.")
(defconst hpath:markup-link-anchor-regexp
"\\`\\(#?[^#+]*[^#+.]\\)?\\(#\\)\\([^\]\[#+^{}<>\"`'\\\n\t\f\r]*\\)"
"Regexp matching a filename followed by a hash (#) and an optional anchor
name.
-The anchor is an in-file reference.
-# is group 2. Group 3 is the anchor name.")
+The anchor is an in-file reference. # is group 2. Group 3 is the anchor
+name.")
(defvar hpath:path-variable-regexp
"\\`\\$?[{(]?\\([-_A-Z]*path[-_A-Z]*\\)[)}]?\\'"
"Regexp that matches exactly to a standalone path variable name reference.
@@ -1012,7 +1019,7 @@ Make any existing path within a file buffer absolute
before returning."
(prog1 (match-string 0 path)
(setq path (substring path
(match-end 0))))))))))
(suffix (when (stringp path)
- (apply #'concat (nreverse (list (when (string-match
hpath:line-and-column-regexp path)
+ (apply #'concat (nreverse (list (when (string-match
hpath:instance-line-column-regexp path)
(prog1 (match-string 0
path)
(setq path (substring
path 0 (match-beginning 0)))))
(if (string-match-p
hpath:variable-regexp path)
@@ -1445,7 +1452,7 @@ but locational suffixes within the file are utilized."
(let ((case-fold-search t)
(default-directory default-directory)
modifier loc anchor anchor-start-pos hash
- kotl-flag path path-with-anchor line-num col-num)
+ kotl-flag path path-with-anchor line-num col-num instance-num)
(setq loc (hattr:get 'hbut:current 'loc)
default-directory (or (hattr:get 'hbut:current 'dir)
;; Loc may be a buffer without a file
@@ -1456,11 +1463,18 @@ but locational suffixes within the file are utilized."
(setq modifier (aref pathname 0)
pathname (substring pathname (match-end 0))))
(setq path pathname) ;; default
- (when (string-match hpath:line-and-column-regexp path)
- (setq line-num (string-to-number (match-string 1 path))
- col-num (when (match-string 3 path)
- (string-to-number (match-string 3 path)))
- path (substring path 0 (match-beginning 0))))
+ (cond ((string-match hpath:instance-line-column-regexp path)
+ (setq instance-num (string-to-number (match-string 1 path))
+ line-num (when (match-string 3 path)
+ (string-to-number (match-string 3 path)))
+ col-num (when (match-string 5 path)
+ (string-to-number (match-string 5 path)))
+ path (substring path 0 (match-beginning 0))))
+ ((string-match hpath:line-and-column-regexp path)
+ (setq line-num (string-to-number (match-string 1 path))
+ col-num (when (match-string 3 path)
+ (string-to-number (match-string 3 path)))
+ path (substring path 0 (match-beginning 0)))))
(unless (file-exists-p path) ;; might be #autosave-file#
(when (string-match hpath:markup-link-anchor-regexp path)
(setq hash t
@@ -1553,10 +1567,11 @@ but locational suffixes within the file are utilized."
(cond ((and anchor kotl-flag)
(klink:act path-with-anchor
anchor-start-pos))
((or hash anchor)
- (hpath:to-markup-anchor hash anchor)))
+ (hpath:to-markup-anchor hash anchor
instance-num)))
(when line-num
- ;; With an anchor, goto line relative to anchor
- ;; location, otherwise use absolute line number
+ ;; With an anchor or instance number,
+ ;; goto line relative to anchor location,
+ ;; otherwise use absolute line number
;; within the visible buffer portion.
(if (or hash anchor)
(forward-line (1- line-num))
@@ -1570,9 +1585,11 @@ but locational suffixes within the file are utilized."
(kotl-mode:to-valid-position))
(current-buffer)))))))))))
-(defun hpath:to-markup-anchor (hash anchor)
+(defun hpath:to-markup-anchor (hash anchor &optional instance-num)
"Ignore HASH when ANCHOR is non-null and move point to ANCHOR string if
found.
-Move point to beginning of buffer if HASH is non-nil and ANCHOR is null."
+Move point to beginning of buffer if HASH is non-nil and ANCHOR is null.
+With optional INSTANCE-NUM, go to that instance of ANCHOR from the start
+of the buffer."
(let ((omin (point-min))
(omax (point-max)))
(unwind-protect
@@ -1583,8 +1600,8 @@ Move point to beginning of buffer if HASH is non-nil and
ANCHOR is null."
(let ((opoint (point))
(case-fold-search))
(goto-char (point-min))
- (if (re-search-forward (format
hpath:html-anchor-id-pattern (regexp-quote anchor)) nil t)
- (progn (forward-line 0)
+ (if (re-search-forward (format
hpath:html-anchor-id-pattern (regexp-quote anchor)) nil t instance-num)
+ (progn (goto-char (match-beginning 0))
(when (eq (current-buffer)
(window-buffer))
(recenter 0)))
(goto-char opoint)
@@ -1627,10 +1644,10 @@ Move point to beginning of buffer if HASH is non-nil
and ANCHOR is null."
(= (aref referent-regexp 0) ?^))
(concat "^[ \t]*" (substring
referent-regexp 1)))))
(goto-char (point-min))
- (if (or (re-search-forward referent-regexp nil t)
+ (if (or (re-search-forward referent-regexp nil t
instance-num)
(and referent-leading-spaces-regexp
- (re-search-forward
referent-leading-spaces-regexp nil t)))
- (progn (forward-line 0)
+ (re-search-forward
referent-leading-spaces-regexp nil t instance-num)))
+ (progn (goto-char (match-beginning 0))
(when (eq (current-buffer)
(window-buffer))
(recenter 0)))
(goto-char opoint)
@@ -1741,7 +1758,13 @@ are temporarily stripped, \"file://\" prefixes are
stripped, link anchors at
the end following a # or , character are temporarily stripped, and path
variables are expanded with `hpath:substitute-value'. This normalized path
form is what is returned for PATH."
- (when (and (stringp path) (not (string-match-p
hpath:path-variable-value-regexp path))
+ (when (and (stringp path)
+ (or
+ ;; Due to the colons, "hui.el#save-excursion:I2:L2:C30",
+ ;; will improperly match to a PATH variable. Ensure it doesn't.
+ (string-match hpath:instance-line-column-regexp path)
+ ;; not a PATH variable type value
+ (not (string-match-p hpath:path-variable-value-regexp path)))
;; If a single character in length, must be a word or symbol
character
(or (/= (length path) 1) (and (string-match-p "\\sw\\|\\s_" path)
(not (string-match-p "[@#&!*]"
path)))))
diff --git a/hui.el b/hui.el
index b2a1e8e728..3ba334a777 100644
--- a/hui.el
+++ b/hui.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Sep-91 at 21:42:03
-;; Last-Mod: 10-Mar-24 at 10:07:01 by Bob Weiner
+;; Last-Mod: 21-Mar-24 at 15:30:24 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -1831,6 +1831,7 @@ Mail Reader Message link-to-mail
Directory Name link-to-directory
File Name link-to-file
Koutline Cell link-to-kcell
+Single-line Region link-to-string-match
Outline Heading link-to-string-match
Buffer attached to File link-to-file
EOL in Dired Buffer link-to-directory (Dired dir)
@@ -1908,28 +1909,44 @@ Buffer without File link-to-buffer-tmp"
((derived-mode-p #'kotl-mode)
(list 'link-to-kcell
buffer-file-name (kcell-view:idstamp)))
;;
- ;; If current line starts with an
outline-regexp prefix, use
- ;; a link-to-string-match.
+ ;; If region is active in the target
buffer and it is one
+ ;; line or less, then do a
link-to-string-match to the region string.
+ ((let ((region (and (use-region-p)
+ (string-trim
(buffer-substring-no-properties
+
(region-beginning) (region-end)))))
+ (instance-num 0))
+ (when (and region
+ (not (string-empty-p
region))
+ ;; single line
+ (not (string-match
"[\n\r\f]" region)))
+ (save-excursion
+ (end-of-line)
+ (while (search-backward region
nil t)
+ (setq instance-num (1+
instance-num))))
+ (list 'link-to-string-match
region instance-num buffer-file-name))))
+ ;;
+ ;; If current line starts with an
outline-regexp prefix and
+ ;; has a non-empty heading, use a
link-to-string-match.
((and (derived-mode-p 'outline-mode
'org-mode 'kotl-mode)
(stringp outline-regexp)
(save-excursion
(beginning-of-line)
- (looking-at outline-regexp)))
- (let ((heading (string-trim
-
(buffer-substring-no-properties
- (match-end 0)
-
(line-end-position))))
- (occur 0))
- (save-excursion
- (end-of-line)
- (while (and (not (string-empty-p
heading))
- (search-backward
heading nil t))
- (setq occur (1+ occur))))
- (list 'link-to-string-match
- (if (zerop (current-column))
- heading
- (format "%s:L1:C%d"
heading (current-column)))
- occur buffer-file-name)))
+ (looking-at outline-regexp))
+ (let ((heading (string-trim
+
(buffer-substring-no-properties
+ (match-end 0)
+
(line-end-position))))
+ (instance-num 0))
+ (when (not (string-empty-p
heading))
+ (save-excursion
+ (end-of-line)
+ (while (search-backward
heading nil t)
+ (setq instance-num (1+
instance-num))))
+ (list 'link-to-string-match
+ (if (zerop
(current-column))
+ heading
+ (format "%s:L1:C%d"
heading (current-column)))
+ instance-num
buffer-file-name)))))
(buffer-file-name
(list 'link-to-file buffer-file-name
(point)))
((derived-mode-p 'dired-mode)
diff --git a/hversion.el b/hversion.el
index fad42b8c3f..b8d560cdbb 100644
--- a/hversion.el
+++ b/hversion.el
@@ -4,7 +4,7 @@
;; Maintainer: Bob Weiner, Mats Lidell
;;
;; Orig-Date: 1-Jan-94
-;; Last-Mod: 10-Mar-24 at 12:49:39 by Bob Weiner
+;; Last-Mod: 22-Mar-24 at 08:51:59 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -35,7 +35,7 @@
;;; Public variables
;;; ************************************************************************
-(defconst hyperb:version "9.0.1" "GNU Hyperbole revision number.")
+(defconst hyperb:version "9.0.2pre" "GNU Hyperbole revision number.")
(defvar hyperb:mouse-buttons
(if (or (and hyperb:microsoft-os-p (not (memq window-system '(w32 w64 x))))
diff --git a/hypb-maintenance.el b/hypb-maintenance.el
index 4390f77cdf..75449ecf44 100644
--- a/hypb-maintenance.el
+++ b/hypb-maintenance.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 31-Mar-21 at 21:11:00
-;; Last-Mod: 1-May-22 at 19:06:09 by Bob Weiner
+;; Last-Mod: 12-Mar-24 at 22:36:34 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -68,7 +68,7 @@ Point `hypb:web-repo-location' to where the web repo is
located."
(mapc (lambda (file) (copy-file file hypb:web-repo-location t))
'("DEMO" "DEMO-ROLO.otl" "FAST-DEMO" "HY-ABOUT" "INSTALL"
"HY-COPY" "COPYING" "MANIFEST"
- "hui.el" "hbut.el" "hbdata.el" "hmail.el"))
+ "hui.el" "hbut.el" "hbdata.el" "hib-doc-id.el" "hmail.el"))
;; man recursive
(copy-directory "man" hypb:web-repo-location nil t nil)
diff --git a/hyperbole.el b/hyperbole.el
index 85fde8b706..05f77dba96 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -8,9 +8,9 @@
;; Maintainer: Mats Lidell <matsl@gnu.org>
;; Maintainers: Robert Weiner <rsw@gnu.org>, Mats Lidell <matsl@gnu.org>
;; Created: 06-Oct-92 at 11:52:51
-;; Last-Mod: 10-Mar-24 at 12:50:16 by Bob Weiner
+;; Last-Mod: 22-Mar-24 at 08:50:50 by Bob Weiner
;; Released: 10-Mar-24
-;; Version: 9.0.1
+;; Version: 9.0.2pre
;; Keywords: comm, convenience, files, frames, hypermedia, languages,
mail, matching, mouse, multimedia, outlines, tools, wp
;; Package: hyperbole
;; Package-Requires: ((emacs "27.1"))
diff --git a/hyrolo.el b/hyrolo.el
index d0afcadce2..dea913ff9c 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: 3-Mar-24 at 18:25:10 by Bob Weiner
+;; Last-Mod: 21-Mar-24 at 13:33:38 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -2215,6 +2215,18 @@ When found, return the match start position."
t)
(match-beginning 0)))
+;; The *HyRolo* buffer uses hyrolo-org-mode and hyrolo-markdown-mode
+;; on Org and Markdown files that it reads to speed loading and
+;; searching. This next function switches such buffers to their
+;; normal modes whenever they are displayed.
+(defun hyrolo-normalize-mode-function (frame)
+ (with-selected-frame frame
+ (when (apply #'derived-mode-p '(hyrolo-markdown-mode hyrolo-org-mode))
+ ;; Display buffer before `normal-mode' triggers possibly long-running
font-locking
+ (sit-for 0.1)
+ (normal-mode))))
+(push 'hyrolo-normalize-mode-function window-buffer-change-functions)
+
;;; In `hyrolo-mode' replace `outline-minor-mode' bindings with hyrolo-*
overrides.
;;; Wrap outline movement commands with a `hyrolo-funcall-match' call.
;;; Wrap outline whole buffer commands with a `hyrolo-map-matches' call.
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index 1f2278fe71..bc8a07e22c 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -7,7 +7,7 @@
@c Author: Bob Weiner
@c
@c Orig-Date: 6-Nov-91 at 11:18:03
-@c Last-Mod: 10-Mar-24 at 12:41:20 by Bob Weiner
+@c Last-Mod: 10-Mar-24 at 14:21:23 by Bob Weiner
@c %**start of header (This is for running Texinfo on a region.)
@setfilename hyperbole.info
@@ -514,7 +514,7 @@ Smart Keyboard Keys
@chapter Introduction
This edition of the GNU Hyperbole Manual is for use with any version
-8.0.2pre or greater of GNU Hyperbole. Hyperbole runs atop GNU Emacs 27.1
+9.0.1 or greater of GNU Hyperbole. Hyperbole runs atop GNU Emacs 27.1
or higher. It will trigger an error if your Emacs is older.
This chapter summarizes the structure of the rest of the manual,
diff --git a/test/demo-tests.el b/test/demo-tests.el
index fb8de0f923..5b3333b2c8 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 30-Jan-21 at 12:00:00
-;; Last-Mod: 12-Mar-24 at 22:58:39 by Mats Lidell
+;; Last-Mod: 21-Mar-24 at 10:52:07 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -28,7 +28,7 @@
(require 'hyrolo)
(require 'eww)
(require 'compile)
-(require 'el-mock)
+(require 'hy-test-dependencies) ;; can install el-mock
(require 'hy-test-helpers "test/hy-test-helpers")
(declare-function hy-test-helpers:consume-input-events "hy-test-helpers")
diff --git a/test/hy-test-dependencies.el b/test/hy-test-dependencies.el
index 95762d0f19..6051da97f2 100644
--- a/test/hy-test-dependencies.el
+++ b/test/hy-test-dependencies.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 20-Feb-21 at 23:16:00
-;; Last-Mod: 21-Jan-24 at 11:42:52 by Bob Weiner
+;; Last-Mod: 10-Mar-24 at 20:56:45 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -28,7 +28,8 @@
(defun hy-test-ensure-package-installed (pkg-symbol)
(unless (package-installed-p pkg-symbol)
(package-refresh-contents)
- (package-install pkg-symbol)))
+ (package-install pkg-symbol))
+ (require pkg-symbol))
(mapc (lambda (sym) (hy-test-ensure-package-installed sym))
'(el-mock with-simulated-input))
diff --git a/test/hypb-ert-tests.el b/test/hypb-ert-tests.el
index 33df09c841..110c3598ba 100644
--- a/test/hypb-ert-tests.el
+++ b/test/hypb-ert-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell
;;
;; Orig-Date: 1-Jan-24 at 23:11:54
-;; Last-Mod: 12-Mar-24 at 22:59:20 by Mats Lidell
+;; Last-Mod: 21-Mar-24 at 10:52:53 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -18,7 +18,7 @@
;;; Code:
(require 'ert)
-(require 'el-mock)
+(require 'hy-test-dependencies) ;; can install el-mock
(require 'hypb-ert)
(ert-deftest hypb-ert-tests--def-at-p ()
diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el
index 1d8a96312a..177e494372 100644
--- a/test/hyrolo-tests.el
+++ b/test/hyrolo-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
-;; Last-Mod: 15-Mar-24 at 23:34:41 by Mats Lidell
+;; Last-Mod: 22-Mar-24 at 08:37:53 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -22,10 +22,10 @@
(require 'hact)
(require 'hyrolo)
(require 'hyrolo-demo)
+(require 'hy-test-dependencies) ;; can install el-mock
(require 'hy-test-helpers "test/hy-test-helpers")
(require 'hib-kbd)
(require 'kotl-mode)
-(require 'el-mock)
(declare-function hy-test-helpers:consume-input-events "hy-test-helpers")
(declare-function hy-test-helpers:should-last-message "hy-test-helpers")
@@ -802,7 +802,7 @@ optional DEPTH the number of sub cells are created to that
depth."
(should (hact 'kbd-key "h"))
(hyrolo-tests--verify-hidden-line)
(save-excursion
- (next-line)
+ (forward-visible-line 1)
(should (eobp)))
(should (hact 'kbd-key "s"))
(hyrolo-tests--verify-not-hidden-line)
@@ -813,7 +813,7 @@ optional DEPTH the number of sub cells are created to that
depth."
(should (hact 'kbd-key "h"))
(hyrolo-tests--verify-hidden-line)
(save-excursion
- (next-line)
+ (forward-visible-line 1)
(should (eobp)))
(should (hact 'kbd-key "s"))
(hyrolo-tests--verify-not-hidden-line))
diff --git a/test/kotl-mode-tests.el b/test/kotl-mode-tests.el
index 293f18ec7d..0244a99a0d 100644
--- a/test/kotl-mode-tests.el
+++ b/test/kotl-mode-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 18-May-21 at 22:14:10
-;; Last-Mod: 12-Mar-24 at 22:59:42 by Mats Lidell
+;; Last-Mod: 21-Mar-24 at 10:53:08 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -19,7 +19,7 @@
;;; Code:
(require 'ert)
-(require 'el-mock)
+(require 'hy-test-dependencies) ;; can install el-mock
(require 'kotl-mode "kotl/kotl-mode")
(require 'hy-test-helpers "test/hy-test-helpers")
- [elpa] externals/hyperbole 2a10d5edf9 14/14: Ensure grep for warnings does not fail the build (#493), (continued)
- [elpa] externals/hyperbole 2a10d5edf9 14/14: Ensure grep for warnings does not fail the build (#493), ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 7de3dcf5b3 04/14: Merge remote-tracking branch 'github_origin/master' into rsw, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole fd430d64f3 05/14: Merge branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 39c9ae9df2 06/14: hyrolo-tests.el - Change forward-line to forward-visible-line, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 98501f469f 03/14: Fix test next-line warnings and ensure installed pkg is required, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 442dc6a388 07/14: hypb-maintenance.el (hypb:web-repo-update): Add "hib-doc-id.el", ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 38c8e227cc 08/14: Merge branch 'master' into rsw, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 5e3109de78 09/14: (hyperb:generate-autoloads): Kill autoload buffers after generation, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 546630e875 10/14: hyrolo-normalize-mode-function - Normalize Org/Markdown buf display, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 6b5650f590 12/14: Set in-progress release to 9.0.2pre, ELPA Syncer, 2024/03/22
- [elpa] externals/hyperbole 2845c1225d 13/14: Merge pull request #484 from rswgnu/rsw,
ELPA Syncer <=