emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole 16b85e1873 4/6: Merge branch 'master' of hype


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 16b85e1873 4/6: Merge branch 'master' of hyperbole
Date: Mon, 17 Jul 2023 09:58:38 -0400 (EDT)

branch: externals/hyperbole
commit 16b85e18731c35af9becf13464b60aac2dff58f1
Merge: 24a4dad079 2e295f2491
Author: Robert Weiner <rsw@gnu.org>
Commit: Robert Weiner <rsw@gnu.org>

    Merge branch 'master' of hyperbole
---
 .github/workflows/main.yml            |   7 ++-
 ChangeLog                             |  31 ++++++++++
 Makefile                              |  16 +++--
 hactypes.el                           |   6 +-
 hargs.el                              |  24 ++++++--
 hib-social.el                         |   6 +-
 hmouse-drv.el                         |  15 +++--
 hui-mouse.el                          |   8 ++-
 hui.el                                |   8 +--
 hycontrol.el                          |   4 +-
 hyperbole.el                          |  12 ++--
 hyrolo.el                             |  43 +++++++-------
 install-test/MANIFEST                 |   1 +
 install-test/elpa-devel/.emacs        |   1 +
 install-test/elpa/.emacs              |   1 +
 install-test/local-install-test.sh    |   6 ++
 install-test/local/.emacs             |  31 ++++++++++
 install-test/tarball/install-local.sh |   3 +-
 test/hbut-tests.el                    |   8 ++-
 test/hmouse-drv-tests.el              | 107 ++++++++++++++++++++++------------
 test/hy-test-helpers.el               |   4 +-
 21 files changed, 247 insertions(+), 95 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 23344c03ef..21e65cfc6c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -24,7 +24,12 @@ jobs:
         run: make clean
 
       - name: Compile
-        run: make bin
+        run: |
+          make bin 2>&1 | tee MAKE_BIN_OUTPUT
+          echo "Number of warnings: $(grep "Warning:" MAKE_BIN_OUTPUT | wc 
-l)" >> $GITHUB_STEP_SUMMARY
+          echo '```' >> $GITHUB_STEP_SUMMARY
+          grep "Warning:" MAKE_BIN_OUTPUT >> $GITHUB_STEP_SUMMARY
+          echo '```' >> $GITHUB_STEP_SUMMARY
 
       - name: Test
         run: make test
diff --git a/ChangeLog b/ChangeLog
index d9057b700c..576ec5365f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2023-07-13  Mats Lidell  <matsl@gnu.org>
+
+* test/hmouse-drv-tests.el (hbut-pathname-anchor-must-match-all)
+    (hbut-pathname-anchor-trailing-text): Add tests for pathname with
+    anchor.
+
+2023-07-11  Mats Lidell  <matsl@gnu.org>
+
+* Makefile (version, $(pkg_parent)/hyperbole-$(HYPB_VERSION).tar): Do not
+    include hyperbole-pgk.el. It is generated by elpa and not needed for a
+    plain tar archive of the package.
+
+2023-07-10  Mats Lidell  <matsl@gnu.org>
+
+* hargs.el (hargs:at-p):
+  hmouse-drv.el (hmouse-choose-link-and-referent-windows): Use let to
+    define free vars.
+
+* hyrolo.el (hyrolo-add-hook, hyrolo-edit-hook): Defvar the hooks.
+
+* hycontrol.el:
+  hui-mouse.el:
+  hmouse-drv.el:
+  hyrolo.el: Public declarations added for multiple packages.
+
+* hargs.el: Add public declarations for vertico and ivy.
+
+* hactypes.el (link-to-org-id, link-to-org-id-marker): Do not quote as
+    functions they are defact and not understood as functions by the byte
+    compiler.
+
 2023-07-09  Bob Weiner  <rsw@gnu.org>
 
 * hypb-ert.el (hypb-ert-*): Change all calls of 'ert' to disable ert's messages
diff --git a/Makefile b/Makefile
index 85b1cded50..533ac4134c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 # Author:       Bob Weiner
 #
 # Orig-Date:    15-Jun-94 at 03:42:38
-# Last-Mod:     24-Jun-23 at 00:31:35 by Mats Lidell
+# Last-Mod:     11-Jul-23 at 10:48:40 by Mats Lidell
 #
 # Copyright (C) 1994-2023  Free Software Foundation, Inc.
 # See the file HY-COPY for license information.
@@ -319,7 +319,6 @@ load-hyperbole:
 #          -f batch-native-compile $(EL_KOTL) $(EL_COMPILE)
 eln: src
        $(EMACS_BATCH) \
-          $(LOAD_EL) \
          -f batch-native-compile $(EL_KOTL) $(EL_COMPILE)
 
 # Byte compile files but apply a filter for either including or
@@ -350,7 +349,7 @@ clean:
 
 version:
        @ echo ""
-       @ fgrep -L $(HYPB_VERSION) hyperbole-pkg.el Makefile HY-ABOUT HY-NEWS 
README.md hversion.el hyperbole.el man/hyperbole.texi man/version.texi > 
WRONG-VERSIONS
+       @ fgrep -L $(HYPB_VERSION) Makefile HY-ABOUT 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):"; \
@@ -454,7 +453,7 @@ $(pkg_parent)/hyperbole-$(HYPB_VERSION).tar: version 
$(HYPERBOLE_FILES)
        $(RM) -fr $(pkg_hyperbole) $(pkg_hyperbole).tar
        # git archive --format=tar --prefix=hyperbole-$(HYPB_VERSION)/ HEAD | 
(cd $(pkg_parent) && tar xf -)
        (mkdir -p $(pkg_hyperbole) && git ls-files | tar Tzcf - - | (cd 
$(pkg_hyperbole) && tar zxf -)) && \
-       $(CP) hyperbole-pkg.el $(pkg_hyperbole) && cd $(pkg_hyperbole) && make 
autoloads && chmod 755 topwin.py && \
+       cd $(pkg_hyperbole) && make autoloads && chmod 755 topwin.py && \
        COPYFILE_DISABLE=1 $(TAR) -C $(pkg_parent) -clf $(pkg_hyperbole).tar 
hyperbole-$(HYPB_VERSION)
 
 pkgclean: packageclean
@@ -507,13 +506,18 @@ test-all-output:
 
 # Hyperbole install tests - Verify that hyperbole can be installed
 # using different sources. See folder "install-test"
-.PHONY: install-elpa install-elpa-devel install-tarball install-straight 
install-all
-install-all: install-elpa install-elpa-devel install-tarball install-straight
+.PHONY: install-elpa install-elpa-devel install-tarball install-straight 
install-all install-local
+install-all: install-elpa install-elpa-devel install-tarball install-straight 
install-local
 
 install-elpa install-elpa-devel install-tarball install-straight:
        @echo "Install Hyperbole using $@"
        (cd ./install-test/ && ./local-install-test.sh $(subst install-,,$@))
 
+install-local:
+       @echo "Install Hyperbole using $@"
+       (cd ./install-test/ && \
+       ./local-install-test.sh $(subst install-,,$@) $(shell pwd) $(shell git 
rev-parse --abbrev-ref HEAD 2>/dev/null))
+
 package-lint:
        $(EMACS_BATCH) \
        --eval "(setq package-lint-main-file \"hyperbole.el\")" \
diff --git a/hactypes.el b/hactypes.el
index 02e7539db3..9c81066e7f 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:      8-Jul-23 at 16:02:44 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 17:39:13 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -603,7 +603,7 @@ information on how to specify a mail reader to use."
          (inhibit-message t)) ;; Inhibit org-id-find status msgs
       (when (setq m (or (and (featurep 'org-roam) (org-roam-id-find id 
'marker))
                        (org-id-find id 'marker)))
-       (hact #'link-to-org-id-marker m)))))
+       (hact 'link-to-org-id-marker m)))))
 
 (defact link-to-org-id-marker (marker)
   "Display the Org entry, if any, at MARKER.
@@ -611,7 +611,7 @@ See doc of `ibtypes::org-id' for usage."
     (unless (markerp marker)
       (error "(link-to-org-id-marker): Argument must be a marker, not %s" 
marker))
     (org-mark-ring-push)
-    (hact #'link-to-buffer-tmp (marker-buffer marker) marker)
+    (hact 'link-to-buffer-tmp (marker-buffer marker) marker)
     (move-marker marker nil)
     (org-fold-show-context))
 
diff --git a/hargs.el b/hargs.el
index ca1ab5a866..bf582b5033 100644
--- a/hargs.el
+++ b/hargs.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    31-Oct-91 at 23:17:35
-;; Last-Mod:      5-Jul-23 at 00:45:15 by Bob Weiner
+;; Last-Mod:     11-Jul-23 at 10:36:27 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -33,6 +33,7 @@
 (require 'hypb)
 (require 'set)
 (require 'info)
+(require 'hmouse-drv)
 
 ;;; ************************************************************************
 ;;; Public variables
@@ -47,6 +48,20 @@
 (add-hook 'completion-setup-hook #'hargs:set-string-to-complete)
 (add-hook 'minibuffer-exit-hook  #'hargs:unset-string-to-complete)
 
+;;; ************************************************************************
+;;; Public declarations
+;;; ************************************************************************
+
+(declare-function ivy-dispatching-done "ext:ivy")
+(declare-function ivy-done "ext:ivy")
+(declare-function vertico--candidate "ext:vertico")
+(declare-function vertico--command-p "ext:vertico")
+(declare-function vertico--goto "ext:vertico")
+(declare-function vertico--update "ext:vertico")
+(declare-function vertico-exit "ext:vertico")
+(declare-function vertico-insert "ext:vertico")
+(declare-function vertico-mouse--index "ext:vertico")
+
 ;;; ************************************************************************
 ;;; Private functions
 ;;; ************************************************************************
@@ -366,8 +381,9 @@ Handles all of the interactive argument types that 
`hargs:iform-read' does."
         ;; Event occurred within the minibufer-contents and return
         ;; just the contents before point so that those after are
         ;; deleted and more completions are shown.
-        (setq mini (minibuffer-contents-no-properties))
-        (list (substring mini 0 (max (- (point) (point-max)) (- (length 
mini)))) nil))
+         (let (mini)
+          (setq mini (minibuffer-contents-no-properties))
+          (list (substring mini 0 (max (- (point) (point-max)) (- (length 
mini)))) nil)))
        ((and (eq hargs:reading-type 'kcell)
              (eq major-mode 'kotl-mode)
              (not (looking-at "^$")))
@@ -602,7 +618,7 @@ See also documentation for `interactive'."
                  (while (cond
                          ((eq (aref iform i) ?*))
                          ((eq (aref iform i) ?@)
-                          (hargs:selectevent-window)
+                          (hargs:select-event-window)
                           t)
                          ((eq (aref iform i) ?^)
                           (handle-shift-selection))
diff --git a/hib-social.el b/hib-social.el
index 55d38d3531..c51e612768 100644
--- a/hib-social.el
+++ b/hib-social.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    20-Jul-16 at 22:41:34
-;; Last-Mod:      2-Jul-23 at 04:19:57 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 12:03:12 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -181,6 +181,10 @@
 ;;; Public variables
 ;;; ************************************************************************
 
+(defgroup hyperbole-buttons nil
+  "Hyperbole explicit, global and implicit button customizations."
+  :group 'hyperbole)
+
 (defcustom hibtypes-social-default-service "twitter"
   "Lowercase string matching the social media service to use as a default."
   :type '(radio (const "facebook")
diff --git a/hmouse-drv.el b/hmouse-drv.el
index 5d5cef6258..718c6692fd 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    04-Feb-90
-;; Last-Mod:      4-Jul-23 at 15:36:51 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 12:24:50 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -25,7 +25,9 @@
 ;;; ************************************************************************
 ;;; Public declarations
 ;;; ************************************************************************
+
 (defvar start-window)
+(defvar aw-scope)
 (declare-function mouse-drag-frame nil) ;; Obsolete from Emacs 28
 
 ;;; ************************************************************************
@@ -790,11 +792,12 @@ buffer to the end window.  The selected window does not 
change."
                       (let ((aw-scope 'global))
                         (aw-select "Select link referent window"))
                     (message "Now click on the %s end window..." func)
-                    (prog1 (cl-loop do (setq end-event (read-event))
-                                    until (and (mouse-event-p end-event)
-                                               (not (string-match "\\`down-" 
(symbol-name (car end-event)))))
-                                    finally return (posn-window (event-start 
end-event)))
-                      (message "Done")))))))
+                     (let (end-event)
+                      (prog1 (cl-loop do (setq end-event (read-event))
+                                      until (and (mouse-event-p end-event)
+                                                 (not (string-match "\\`down-" 
(symbol-name (car end-event)))))
+                                      finally return (posn-window (event-start 
end-event)))
+                        (message "Done"))))))))
     (when (eq link-but-window referent-window)
       (error "(hmouse-choose-link-and-referent-windows): No other visible 
window with a link referent"))
     (unless (window-live-p link-but-window)
diff --git a/hui-mouse.el b/hui-mouse.el
index bfbb56740f..97f1a4bb3a 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    04-Feb-89
-;; Last-Mod:      4-Jul-23 at 19:51:04 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 18:27:44 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -67,6 +67,8 @@
 (declare-function helm-get-actions-from-current-source "ext:helm-core")
 (declare-function helm-get-default-action "ext:helm-core")
 
+(defvar helm-selection-point)
+
 ;;; ************************************************************************
 ;;; Public variables
 ;;; ************************************************************************
@@ -1525,7 +1527,7 @@ If assist-key is pressed:
 ;; next function.
 ;; Usage: (define-key magit-section-mode-map "TAB" 'smart-magit-tab)
 (defun smart-magit-tab (section)
-  "Toggle visibility of the body of the current section."
+  "Toggle visibility of the body of the current SECTION."
   (interactive (list (magit-current-section)))
   (require 'magit)
   (let* ((magit-display-buffer-function #'hpath:display-buffer)
@@ -2020,7 +2022,7 @@ If key is pressed:
 ;;; ************************************************************************
 
 ;; Emacs push button support
-(defun smart-push-button (&optional pos use-mouse-action)
+(defun smart-push-button (&optional _pos _use-mouse-action)
   "Activate an Emacs push-button, including text-property follow-link buttons.
 Button is at optional POS or at point.  USE-MOUSE-ACTION prefers
 mouse-action to action property."
diff --git a/hui.el b/hui.el
index 9f33680846..e29d556015 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:      8-Jul-23 at 16:04:59 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 18:31:05 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -672,7 +672,7 @@ implicit button.  See also documentation for
       (split-window-vertically))
     (find-file (gbut:file))
     (hui:buf-writable-err (current-buffer) "gbut-link-directly")
-    (multiple-value-bind (link-but-window referent-window)
+    (cl-multiple-value-bind (link-but-window referent-window)
        (hmouse-choose-link-and-referent-windows)
       (goto-char (point-max))
       (beginning-of-line)
@@ -1127,7 +1127,7 @@ from those instead.  See also documentation for
     (action-key-clear-variables)
     (assist-key-clear-variables))
   (let (but-lbl edit-flag link-types num-types type-and-args lbl-key but-loc 
but-dir)
-    (multiple-value-bind (link-but-window referent-window)
+    (cl-multiple-value-bind (link-but-window referent-window)
        (if (and depress-window release-window)
            (list depress-window release-window)
          (hmouse-choose-link-and-referent-windows))
@@ -1229,7 +1229,7 @@ drag from a window to another window's modeline."
     (assist-key-clear-variables))
   (let (but-name edit-flag link-types num-types type-and-args name-key but-loc 
but-dir)
     ;; edit-flag when set non-nil means are editing an existing ibut at point
-    (multiple-value-bind (link-but-window referent-window)
+    (cl-multiple-value-bind (link-but-window referent-window)
        (if (and depress-window release-window)
            (list depress-window release-window)
          (hmouse-choose-link-and-referent-windows))
diff --git a/hycontrol.el b/hycontrol.el
index f164619014..0546a9306d 100644
--- a/hycontrol.el
+++ b/hycontrol.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     1-Jun-16 at 15:35:36
-;; Last-Mod:     23-Apr-23 at 14:50:59 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 17:42:24 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -141,6 +141,8 @@
 
 (declare-function fm-next-frame "ext:framemove")
 
+(defvar frame-zoom-font-difference)
+
 ;;; ************************************************************************
 ;;; Public variables
 ;;; ************************************************************************
diff --git a/hyperbole.el b/hyperbole.el
index 34a65d6143..c3d2954ff3 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -7,7 +7,7 @@
 ;; Author:       Bob Weiner
 ;; Maintainer:   Bob Weiner <rsw@gnu.org>, Mats Lidell <matsl@gnu.org>
 ;; Created:      06-Oct-92 at 11:52:51
-;; Last-Mod:      8-Jul-23 at 16:00:21 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 12:08:06 by Mats Lidell
 ;; Released:     03-Dec-22
 ;; Version:      8.0.1pre
 ;; Keywords:     comm, convenience, files, frames, hypermedia, languages, 
mail, matching, mouse, multimedia, outlines, tools, wp
@@ -88,9 +88,7 @@
   "Hyperbole customizations category."
   :group 'applications)
 
-(defgroup hyperbole-buttons nil
-  "Hyperbole explicit, global and implicit button customizations."
-  :group 'hyperbole)
+;; defgroup hyperbole-buttons is in "hib-social.el"
 
 (defgroup hyperbole-commands nil
   "Hyperbole command customizations."
@@ -162,6 +160,12 @@ Info documentation at \"(hyperbole)Top\".
 (defvar hyperbole--mark-even-if-inactive
   "Stores value of `mark-even-if-inactive' prior to enabling 
`hyperbole-mode'.")
 
+;;; ************************************************************************
+;;; Public declarations
+;;; ************************************************************************
+
+(declare-function vertico-mouse-mode "ext:vertico")
+
 ;;; ************************************************************************
 ;;; Other required Elisp libraries
 ;;; ************************************************************************
diff --git a/hyrolo.el b/hyrolo.el
index 191a748a72..d11793372b 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:     17-Jun-23 at 23:03:56 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 17:55:02 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -47,20 +47,35 @@
 ;;; ************************************************************************
 ;;; Public declarations
 ;;; ************************************************************************
+
 (defvar consult-grep-args)
 (defvar consult-ripgrep-args)
+(defvar google-contacts-expire-time)
+(defvar google-contacts-history)
+(defvar google-contacts-query-string)
 (defvar helm-org-rifle-show-full-contents)
 (defvar helm-org-rifle-show-level-stars)
+(defvar hproperty:but-emphasize-flag)
 (defvar markdown-regex-header)
-(defvar org-roam-directory)
 (defvar org-roam-db-autosync-mode)
-(defvar hproperty:but-emphasize-flag)
+(defvar org-roam-directory)
+(defvar plstore-cache-passphrase-for-symmetric-encryption)
+
 (declare-function consult-grep "ext:consult")
 (declare-function consult-ripgrep "ext:consult")
+(declare-function google-contacts  "ext:google-contacts")
+(declare-function google-contacts-add-margin-to-text "ext:google-contacts")
+(declare-function google-contacts-build-node-list "ext:google-contacts")
+(declare-function google-contacts-data  "ext:google-contacts")
+(declare-function google-contacts-make-buffer "ext:google-contacts")
+(declare-function google-contacts-margin-element "ext:google-contacts")
+(declare-function google-contacts-oauth-token "ext:google-contacts")
 (declare-function helm-org-rifle-files "ext:helm-org-rifle")
-(declare-function helm-org-rifle-show-full-contents "ext:helm-org-rifle")
 (declare-function helm-org-rifle-org-directory "ext:helm-org-rifle")
+(declare-function helm-org-rifle-show-full-contents "ext:helm-org-rifle")
 (declare-function org-roam-db-autosync-mode "ext:org-roam")
+(declare-function xml-node-child-string "ext:google-contacts")
+(declare-function xml-node-get-attribute-type "ext:google-contacts")
 
 ;;; ************************************************************************
 ;;; Public variables
@@ -116,23 +131,11 @@ Must take two arguments, `match-pattern' and 
`headline-only-flag'.
 Must leave point within any matched entry or return nil when no
 match is found.")
 
+(defvar hyrolo-add-hook nil
+  "Hook run when a HyRolo item is added.")
 
-;;; ************************************************************************
-;;; Public declarations
-;;; ************************************************************************
-
-(declare-function google-contacts  "ext:google-contacts")
-(declare-function google-contacts-add-margin-to-text "ext:google-contacts")
-(declare-function google-contacts-build-node-list "ext:google-contacts")
-(declare-function google-contacts-data  "ext:google-contacts")
-(declare-function google-contacts-make-buffer "ext:google-contacts")
-(declare-function google-contacts-margin-element "ext:google-contacts")
-(declare-function google-contacts-oauth-token "ext:google-contacts")
-(declare-function xml-node-child-string "ext:google-contacts")
-(declare-function xml-node-get-attribute-type "ext:google-contacts")
-(defvar google-contacts-history)
-(defvar google-contacts-expire-time)
-(defvar google-contacts-query-string)
+(defvar hyrolo-edit-hook nil
+  "Hook run when a HyRolo item is edited.")
 
 (declare-function hyrolo-fgrep-logical "hyrolo-logic")
 
diff --git a/install-test/MANIFEST b/install-test/MANIFEST
index 4013b6ef6a..9f06c3ffcc 100644
--- a/install-test/MANIFEST
+++ b/install-test/MANIFEST
@@ -5,3 +5,4 @@ local-install-test.sh        - Run one or more test 
installations
 straight/.emacs              - Straight git package personal configuration
 tarball/.emacs               - Manual tarball personal configuration
 tarball/install-local.sh     - Manual tarball download and build script
+local/.emacs                 - Straight git package from local repo and branch
diff --git a/install-test/elpa-devel/.emacs b/install-test/elpa-devel/.emacs
index f27fb10ee7..1828da633f 100644
--- a/install-test/elpa-devel/.emacs
+++ b/install-test/elpa-devel/.emacs
@@ -3,6 +3,7 @@
 (when (< emacs-major-version 27)
   (error "Hyperbole requires Emacs 27 or above; you are running version %d" 
emacs-major-version))
 (require 'package)
+(setq package-native-compile t)
 (add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/";))
 (unless (package-installed-p 'hyperbole)
   (package-refresh-contents)
diff --git a/install-test/elpa/.emacs b/install-test/elpa/.emacs
index a367d0ba5a..0c94637a28 100644
--- a/install-test/elpa/.emacs
+++ b/install-test/elpa/.emacs
@@ -3,6 +3,7 @@
 (when (< emacs-major-version 27)
   (error "Hyperbole requires Emacs 27 or above; you are running version %d" 
emacs-major-version))
 (require 'package)
+(setq package-native-compile t)
 (unless (package-installed-p 'hyperbole)
   (package-refresh-contents)
   (package-install 'hyperbole))
diff --git a/install-test/local-install-test.sh 
b/install-test/local-install-test.sh
index 3f05cb3920..a94a5fddcc 100755
--- a/install-test/local-install-test.sh
+++ b/install-test/local-install-test.sh
@@ -16,6 +16,12 @@ export HOME=$app/$install_method
 
 cd $app/$install_method
 
+if [ -n "$2" ]
+then
+  export LOCAL_HYPB_REPO=$2
+  export LOCAL_HYPB_BRANCH=$3
+fi
+
 ## Initial install with ert tests
 emacs --batch -l $app/$install_method/.emacs \
       --eval '(load (expand-file-name "test/hy-test-dependencies.el" 
hyperb:dir))' \
diff --git a/install-test/local/.emacs b/install-test/local/.emacs
new file mode 100644
index 0000000000..5c1090b398
--- /dev/null
+++ b/install-test/local/.emacs
@@ -0,0 +1,31 @@
+;; Use this in your Emacs init file to install Straight
+(progn
+  (when (< emacs-major-version 27)
+    (error "Hyperbole requires Emacs 27 or above; you are running version %d" 
emacs-major-version))
+  (defvar bootstrap-version)
+  (setq package-enable-at-startup nil)
+  (let ((bootstrap-file
+         (expand-file-name "straight/repos/straight.el/bootstrap.el" 
user-emacs-directory))
+        (bootstrap-version 5))
+    (unless (file-exists-p bootstrap-file)
+      (with-current-buffer
+          (url-retrieve-synchronously
+           
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el";
+           'silent 'inhibit-cookies)
+        (goto-char (point-max))
+        (eval-print-last-sexp)))
+    (load bootstrap-file nil 'nomessage)))
+
+(setq package-native-compile t)
+
+(straight-use-package
+ (list
+  'hyperbole
+  :host nil
+  :repo (getenv "LOCAL_HYPB_REPO")
+  :branch (getenv "LOCAL_HYPB_BRANCH")
+  :config '(hyperbole-mode 1)))
+
+(hyperbole-mode 1)
+
+(message "%s" "Hyperbole successfully installed and activated")
diff --git a/install-test/tarball/install-local.sh 
b/install-test/tarball/install-local.sh
index a828718254..9defde2b8e 100755
--- a/install-test/tarball/install-local.sh
+++ b/install-test/tarball/install-local.sh
@@ -3,4 +3,5 @@ tar -xf hyperbole.tar
 rm hyperbole.tar
 ln -s hyperbole* hyperbole
 cd hyperbole
-make bin
+make bin eln
+
diff --git a/test/hbut-tests.el b/test/hbut-tests.el
index 06b655b2e1..9adb2b8c5c 100644
--- a/test/hbut-tests.el
+++ b/test/hbut-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org>
 ;;
 ;; Orig-Date:    30-may-21 at 09:33:00
-;; Last-Mod:      9-Jul-23 at 02:09:26 by Bob Weiner
+;; Last-Mod:     10-Jul-23 at 22:12:16 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -462,6 +462,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    |  6 | name | nil      | region | nil  | create: ibut with name (ignore 
region)        |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "<[name]> - /tmp")
@@ -488,6 +489,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    |  7 | nil  | nil      | region | nil  | create: region named ibut          
           |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "region /tmp")
@@ -511,6 +513,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    |  8 | nil  | new-name | region | nil  | create: ibut with new-name (ignore 
region)    |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "/tmp")
@@ -537,6 +540,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    |  9 | nil  | nil      | nil    | t    | mod: remove any name from ibut     
           |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "<[name]> - /tmp")
@@ -561,6 +565,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    | 10 | nil  | new-name | nil    | t    | mod: set ibut's name to new-name   
           |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "/tmp")
@@ -585,6 +590,7 @@ Needed since hyperbole expands all links to absolute paths 
and
    
|----+------+----------+--------+------+-----------------------------------------------|
    | 11 | name | nil      | nil    | t    | mod: name of ibut from 
hbut:current attrs     |
    
|----+------+----------+--------+------+-----------------------------------------------|"
+  (skip-unless nil) ;; TODO: Disabled until ibut:operate is fixed
   (with-temp-buffer
     ;; Create in-buffer and in-memory ibut
     (let ((ibut-str "/tmp")
diff --git a/test/hmouse-drv-tests.el b/test/hmouse-drv-tests.el
index 1804acde3f..99062bce2c 100644
--- a/test/hmouse-drv-tests.el
+++ b/test/hmouse-drv-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org>
 ;;
 ;; Orig-Date:    28-Feb-21 at 22:52:00
-;; Last-Mod:     19-Feb-23 at 15:49:31 by Mats Lidell
+;; Last-Mod:     13-Jul-23 at 00:45:55 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -76,7 +76,7 @@
     (ibtype:delete 'ibtypes::defal-key)))
 
 (defun hbut-verify-defal (x)
-  "Verify function i called with X set to the string `test'."
+  "Verify function is called with X set to the string `test'."
   (should (string= x "test")))
 
 (ert-deftest hbut-defal-function ()
@@ -86,9 +86,8 @@
       (with-temp-buffer
         (insert "<defal-func test>")
         (goto-char 4)
-        (action-key)))
-    (progn
-      (ibtype:delete 'ibtypes::defal-func)))
+        (action-key))
+    (ibtype:delete 'ibtypes::defal-func)))
   
 (ert-deftest hbut-defal-fails-on-file-missing ()
   (defal defal-path-missing "${hyperb:dir}/\\1")
@@ -173,7 +172,7 @@
       (action-key))))
 
 (ert-deftest hbut-ib-create-label ()
-  "Create a label for an implicit button"
+  "Create a label for an implicit button."
   (with-temp-buffer
     (insert "\"/tmp\"\n")
     (goto-char 3)
@@ -253,15 +252,13 @@
     (kill-buffer "DEMO")))
 
 (ert-deftest hbut-pathname-env-variable-test ()
-  (unwind-protect
-      (with-temp-buffer
-        (insert "\"${HOME}\"")
-        (goto-char 2)
-        (action-key)
-        (should (equal major-mode 'dired-mode))
-       (should (= 0 (string-match (file-truename (getenv "HOME"))
-                                  (file-truename default-directory)))))
-    nil))
+  (with-temp-buffer
+    (insert "\"${HOME}\"")
+    (goto-char 2)
+    (action-key)
+    (should (equal major-mode 'dired-mode))
+    (should (= 0 (string-match (file-truename (getenv "HOME"))
+                              (file-truename default-directory))))))
 
 (ert-deftest hbut-pathname-emacs-lisp-file-test ()
   (unwind-protect
@@ -271,43 +268,78 @@
         (action-key)
         (should (equal major-mode 'emacs-lisp-mode))
         (should (buffer-file-name))
-        (should (string= "hyperbole.el" (buffer-name)))))
-  (kill-buffer "hyperbole.el"))
+        (should (string= "hyperbole.el" (buffer-name))))
+    (kill-buffer "hyperbole.el")))
 
 (ert-deftest hbut-pathname-anchor-test ()
   "Pathname with anchor."
+  (let ((file (make-temp-file "hypb" nil nil
+                              "Text\n* Anchor\n")))
+    (unwind-protect
+        (with-temp-buffer
+          (insert (concat "\"" file "#Anchor\""))
+          (goto-char 2)
+          (action-key)
+          (should (string= file (buffer-file-name)))
+          (should (looking-at "\* Anchor")))
+      (hy-delete-file-and-buffer file))))
+
+(ert-deftest hbut-pathname-anchor-trailing-text ()
+  "Pathname with anchor and trailing parenthesised text."
+  (let ((file (make-temp-file "hypb" nil nil
+                              "Text\n* Anchor Plus (Parenthesised text 
follows)\n")))
   (unwind-protect
       (with-temp-buffer
-        (insert "\"${hyperb:dir}/DEMO#Smart Keys\"")
+        (insert (concat "\"" file "#Anchor Plus\""))
         (goto-char 2)
         (action-key)
-        (should (string= "DEMO" (buffer-name)))
-        (should (looking-at "\* Smart Keys")))
-    (kill-buffer "DEMO")))
+        (should (string= file (buffer-file-name)))
+        (should (looking-at "\* Anchor Plus \(Parenthesised text follows\)")))
+    (hy-delete-file-and-buffer file))))
+
+(ert-deftest hbut-pathname-anchor-must-match-all ()
+  "Verify that the whole anchor must match."
+  (let ((file (make-temp-file "hypb" nil nil
+                              "Text\n* Anchor Plus non parenthesised text\n")))
+  (unwind-protect
+      (with-temp-buffer
+        (insert (concat "\"" file "#Anchor Plus\""))
+        (goto-char 2)
+        (let ((err (should-error (action-key) :type 'error)))
+          (should (string-match-p
+                   (concat "\(hpath:to-markup-anchor\): "
+                           (buffer-name)
+                           " - Section .Anchor Plus. not found in the visible 
buffer portion")
+                   (cadr err)))))
+    (hy-delete-file-and-buffer file))))
 
 (ert-deftest hbut-pathname-anchor-line-test ()
   "Pathname with anchor and line specification."
+  (let ((file (make-temp-file "hypb" nil nil
+                              "Text\n* Anchor\nNext Line\n")))
   (unwind-protect
       (with-temp-buffer
-        (insert "\"${hyperb:dir}/DEMO#Smart Keys:2\"")
+        (insert (concat "\"" file "#Anchor:1\""))
         (goto-char 2)
         (action-key)
-        (should (string= "DEMO" (buffer-name)))
-        (forward-line -2)
-        (should (looking-at "\* Smart Keys")))
-    (kill-buffer "DEMO")))
+        (should (string= file (buffer-file-name)))
+        (should (looking-at "Next Line")))
+    (hy-delete-file-and-buffer file))))
 
 (ert-deftest hbut-pathname-line-column-test ()
   "Pathname with line and position specification."
-  (unwind-protect
-      (with-temp-buffer
-        (insert "\"${hyperb:dir}/DEMO:3:45\"")
-        (goto-char 2)
-        (action-key)
-        (should (string= "DEMO" (buffer-name)))
-        (should (= (line-number-at-pos) 3))
-        (should (= (current-column) 45)))
-    (kill-buffer "DEMO")))
+  (let ((file (make-temp-file "hypb" nil nil
+                              "Text\n* Anchor\nNext Line\n")))
+    (unwind-protect
+        (with-temp-buffer
+          (insert (concat "\"" file "#Anchor:1:5\""))
+          (goto-char 2)
+          (action-key)
+          (should (string= file (buffer-file-name)))
+          (should (= (line-number-at-pos) 3))
+          (should (= (current-column) 5))
+          (should (looking-at "Line")))
+      (hy-delete-file-and-buffer file))))
 
 (ert-deftest hbut-pathname-load-path-line-column-test ()
   "Pathname with `load-path', line and position specification."
@@ -426,9 +458,8 @@
         (let ((hpath:display-where 'this-window))
           (action-key)
           (should (string= "HY-ABOUT" (buffer-name)))))
-    (progn
-      (kill-buffer "MANIFEST")
-      (kill-buffer "HY-ABOUT"))))
+    (kill-buffer "MANIFEST")
+    (kill-buffer "HY-ABOUT")))
 
 ;; rfc
 (ert-deftest hbut-rfc-test ()
diff --git a/test/hy-test-helpers.el b/test/hy-test-helpers.el
index c5bfb2522c..892d4a4869 100644
--- a/test/hy-test-helpers.el
+++ b/test/hy-test-helpers.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org>
 ;;
 ;; Orig-Date:    30-Jan-21 at 12:00:00
-;; Last-Mod:     28-May-23 at 22:52:40 by Mats Lidell
+;; Last-Mod:      7-Jul-23 at 17:09:59 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -70,7 +70,7 @@ Checks ACTYPE, ARGS, LOC and LBL-KEY."
     (should (equal (hattr:get hbut-at-p 'name) name))))
 
 (defun hy-delete-file-and-buffer (file)
-  "Delete file and buffer vistinng file."
+  "Delete FILE and buffer visiting file."
   (let ((buf (find-buffer-visiting file)))
     (when buf
       (with-current-buffer buf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]