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

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

[elpa] externals/hyperbole 86ddcb1: pathname ibtype handle 'word:323233'


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 86ddcb1: pathname ibtype handle 'word:323233' properly and require Emacs 27.1
Date: Sun, 30 May 2021 08:57:09 -0400 (EDT)

branch: externals/hyperbole
commit 86ddcb14e02e129039ef6ae4aa5d38e9b0f5adda
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    pathname ibtype handle 'word:323233' properly and require Emacs 27.1
---
 ChangeLog          |   8 +++
 HY-NEWS            | 160 ++++++++++++++++++++++++++---------------------------
 hpath.el           |  16 ++++--
 hyperbole.el       |   2 +-
 kotl/kotl-mode.el  |  15 +++--
 man/hyperbole.texi |   2 +-
 6 files changed, 110 insertions(+), 93 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da77abc..0d3c441 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-05-29  Bob Weiner  <rsw@gnu.org>
+
+* hpath.el (hpath:is-p, hpath:call): Return nil if path
+    sans prefix and suffix is empty and suffix does
+    not begin with a '#' markdown section-style char.
+
+* kotl/kotl-mode.el (kotl-mode:goto-cell): Improve doc.
+
 2021-05-29  Mats Lidell  <matsl@gnu.org>
 
 * test/hui-tests.el (hui-ebut-create-link-to-directory)
diff --git a/HY-NEWS b/HY-NEWS
index 3b8ab57..a218f25 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -7,96 +7,96 @@
 
   HYPERBOLE SYSTEM
 
-   - Hyperbole is now a global minor mode that can be toggled with
-     {M-x hyperbole-mode RET}, meaning all of its key bindings can
-     easily be enabled or disabled whenever desired.  Your init file
-     needs to have (hyperbole-mode 1) in it instead of
-     (require 'hyperbole) or Hyperbole will not be enabled upon startup.
+    - Hyperbole is now a global minor mode that can be toggled with
+      {M-x hyperbole-mode RET}, meaning all of its key bindings can
+      easily be enabled or disabled whenever desired.  Your init file
+      needs to have (hyperbole-mode 1) in it instead of
+      (require 'hyperbole) or Hyperbole will not be enabled upon startup.
 
-     In the modeline where minor modes are shown, "Hypb" now appears
-     whenever Hyperbole is active.
+      In the modeline where minor modes are shown, "Hypb" now appears
+      whenever Hyperbole is active.
 
   PROGRAMMING
 
-   - Simple Action Link Button Type Creation: `defal' is a new,
-     easy-to-use construct that generates new action button types from
-     a type name and a single simple format expression, allowing
-     non-programmers to create their own implicit action button link
-     types that execute key series, display URLs, display the contents
-     of pathnames or invoke functions.  See "(hyperbole)Action Button
-     Link Types" or the "DEMO#Defining New Action Button Types"
-     section.
-
-   - Easy Implicit Link Button Type Creation: `defil' is a new,
-     construct for those familiar with regular expressions but not
-     much Emacs Lisp.  This macro creates more flexible implicit
-     button types than `defal' where the delimiters and text
-     substitution can be specified with regular expressions.  Actions
-     are limited to executing key series, displaying URLs, displaying
-     the contents of pathnames or invoking functions.  See
-     "(hyperbole)Implicit Button Link Types".
-
-     Elisp programmers should use the existing `defib' macro for full
-     flexibility in implicit button type creation.  See "hibytpes.el"
-     for examples and "(hyperbole)Programmatic Implicit Button Types"
-     for documentation.
-
-   - Edebuggable Hyperbole Types: `defib' and `defact' type definitions
-     are now interactively debuggable via edebug-defun {C-M-x}.
-
-   - kbd-key:is-p: Added this new predicate to test whether point is within
-     a brace-delimited key series.
-
-   - ebut:program: Programmatically create an explicit Hyperbole button at
-        point from LABEL, ACTYPE (action type), and optional actype ARGS.
+    - Simple Action Link Button Type Creation: `defal' is a new,
+      easy-to-use construct that generates new action button types from
+      a type name and a single simple format expression, allowing
+      non-programmers to create their own implicit action button link
+      types that execute key series, display URLs, display the contents
+      of pathnames or invoke functions.  See "(hyperbole)Action Button
+      Link Types" or the "DEMO#Defining New Action Button Types"
+      section.
+
+    - Easy Implicit Link Button Type Creation: `defil' is a new,
+      construct for those familiar with regular expressions but not
+      much Emacs Lisp.  This macro creates more flexible implicit
+      button types than `defal' where the delimiters and text
+      substitution can be specified with regular expressions.  Actions
+      are limited to executing key series, displaying URLs, displaying
+      the contents of pathnames or invoking functions.  See
+      "(hyperbole)Implicit Button Link Types".
+
+      Elisp programmers should use the existing `defib' macro for full
+      flexibility in implicit button type creation.  See "hibytpes.el"
+      for examples and "(hyperbole)Programmatic Implicit Button Types"
+      for documentation.
+
+    - Edebuggable Hyperbole Types: `defib' and `defact' type definitions
+      are now interactively debuggable via edebug-defun {C-M-x}.
+
+    - kbd-key:is-p: Added this new predicate to test whether point is within
+      a brace-delimited key series.
+
+    - ebut:program: Programmatically create an explicit Hyperbole button at
+        point from LABEL, ACTYPE (action type), and optional actype ARGS.
 
   HYROLO
 
-   - After performing a HyRolo search with point in the match buffer,
-     if you want different results, you can quickly do a new regular
-     expression HyRolo search with {r} or a string/logical search with
-     {C-u r}.
+    - After performing a HyRolo search with point in the match buffer,
+      if you want different results, you can quickly do a new regular
+      expression HyRolo search with {r} or a string/logical search with
+      {C-u r}.
 
   KOUTLINER
 
-   - Org Table Support: Org table editing now automatically works in the
-     Koutliner via Org table minor mode.  Use {M-x orgtbl-mode RET} to
-     toggle this on and off.  See "(Org)Tables" for details.
-
-   - New Mail Tree Key Binding: The kotl-mode:mail-tree command that
-     extracts the current view of a Koutline in text-only format and
-     creates an outgoing email messge with it, has moved from {C-c @}
-     to {C-c C-@} to prevent conflict with the hycontrol-window-grid
-     command bound to {C-c @}.
-
-   - New Tree Demotion/Promotion Keys: Tree promotion and demotion keys now
-     match the defaults in Org mode and Outline mode, plus some easier to
-     type ones.  The tables below summarize which keys work whether inside
-     an Org table or outside.
-
-     |----------------------------+-----------------------------|
-     | Demotion Inside Org Table  | Promotion Inside Org Table  |
-     |----------------------------+-----------------------------|
-     | C-c C-,                    | C-c C-.                     |
-     | C-c C-<                    | C-c C->                     |
-     |----------------------------+-----------------------------|
-
-     |----------------------------+-----------------------------|
-     | Demotion Outside Org Table | Promotion Outside Org Table |
-     |----------------------------+-----------------------------|
-     | TAB                        | Shift-TAB or M-TAB          |
-     | M-left-arrow               | M-right-arrow               |
-     | C-c C-,                    | C-c C-.                     |
-     | C-c C-<                    | C-c C->                     |
-     |----------------------------+-----------------------------|
-
-   - Klink Copy: New commands that copy a relative or absolute reference
-     to a kcell (a klink) to the kill ring or to an Emacs single-letter
-     named register:
-       kotl-mode:copy-absolute-klink-to-kill-ring
-       kotl-mode:copy-relative-klink-to-kill-ring
-       kotl-mode:copy-absolute-klink-to-register
-       kotl-mode:copy-relative-klink-to-register
+    - Org Table Support: Org table editing now automatically works in the
+      Koutliner via Org table minor mode.  Use {M-x orgtbl-mode RET} to
+      toggle this on and off.  See "(Org)Tables" for details.
+
+    - New Mail Tree Key Binding: The kotl-mode:mail-tree command that
+      extracts the current view of a Koutline in text-only format and
+      creates an outgoing email messge with it, has moved from {C-c @}
+      to {C-c C-@} to prevent conflict with the hycontrol-window-grid
+      command bound to {C-c @}.
+
+    - New Tree Demotion/Promotion Keys: Tree promotion and demotion keys now
+      match the defaults in Org mode and Outline mode, plus some easier to
+      type ones.  The tables below summarize which keys work whether inside
+      an Org table or outside.
+
+      |----------------------------+-----------------------------|
+      | Demotion Inside Org Table  | Promotion Inside Org Table  |
+      |----------------------------+-----------------------------|
+      | C-c C-,                    | C-c C-.                     |
+      | C-c C-<                    | C-c C->                     |
+      |----------------------------+-----------------------------|
+
+      |----------------------------+-----------------------------|
+      | Demotion Outside Org Table | Promotion Outside Org Table |
+      |----------------------------+-----------------------------|
+      | TAB                        | Shift-TAB or M-TAB          |
+      | M-left-arrow               | M-right-arrow               |
+      | C-c C-,                    | C-c C-.                     |
+      | C-c C-<                    | C-c C->                     |
+      |----------------------------+-----------------------------|
+
+    - Klink Copy: New commands that copy a relative or absolute reference
+      to a kcell (a klink) to the kill ring or to an Emacs single-letter
+      named register:
+       kotl-mode:copy-absolute-klink-to-kill-ring
+       kotl-mode:copy-relative-klink-to-kill-ring
+       kotl-mode:copy-absolute-klink-to-register
+       kotl-mode:copy-relative-klink-to-register
 
   SMART (ACTION AND ASSIST) KEYS
 
diff --git a/hpath.el b/hpath.el
index 708f375..717bbed 100644
--- a/hpath.el
+++ b/hpath.el
@@ -880,10 +880,15 @@ Make any path within a file buffer absolute before 
returning. "
                                                         (setq path (substring 
path 0 (match-beginning 0)))))
                                                   (when (string-match 
hpath:markup-link-anchor-regexp path)
                                                     (prog1 (concat "#" 
(match-string 3 path))
-                                                      (setq path (substring 
path 0 (match-beginning 2))))))))))
-        (func-result (funcall func path)))
-    (when (or (stringp func-result) suffix)
-      (setq path (concat prefix func-result suffix))
+                                                      (setq path (substring 
path 0 (match-beginning 2)))))))))))
+    (setq path (funcall func path))
+    (when (or (and path (not (string-empty-p path)))
+             ;; If just a numeric suffix like ":40" by itself, ignore
+             ;; it, but if a markdown type suffix alone, like
+             ;; "#section", use it.
+             (and suffix (not (string-empty-p suffix))
+                  (= ?# (aref suffix 0))))
+      (setq path (concat prefix path suffix))
       ;; If path is just a local reference that begins with #,
       ;; in a file buffer, prepend the file name to it.  If an HTML
       ;; file, prepend file:// to it.
@@ -1412,7 +1417,8 @@ returned for PATH."
                                          (concat modifier (format rtn-path 
suffix)))
                                      (concat modifier (format rtn-path 
""))))))))))
                path))
-     (unless (or (string-empty-p path)
+     (unless (or (null path)
+                (string-empty-p path)
                 (string-match "#['`\"]" path)
                 ;; If a single character in length, must be a word or symbol 
character
                 (and (= (length path) 1) (or (not (string-match "\\sw\\|\\s_" 
path))
diff --git a/hyperbole.el b/hyperbole.el
index 15e02ba..c85e3cf 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -9,7 +9,7 @@
 ;; Version:          8.0.0pre
 ;; Keywords:         comm, convenience, files, frames, hypermedia, languages, 
mail, matching, mouse, multimedia, outlines, tools, wp
 ;; Package:          hyperbole
-;; Package-Requires: ((emacs "24.4"))
+;; Package-Requires: ((emacs "27.1"))
 ;; URL:              http://www.gnu.org/software/hyperbole
 
 ;; See the "HY-COPY" file for license information.
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index 09db305..c34ddc4 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -1729,14 +1729,17 @@ part of the paragraph, or the end of the buffer."
   (point))
 
 (defun kotl-mode:goto-cell (cell-ref &optional error-p)
-  "Move point to start of cell given by CELL-REF.  (See `kcell:ref-to-id'.)
+  "Move point to start of cell given by CELL-REF (see `kcell:ref-to-id').
 Return point if CELL-REF is found within current view, else nil.
-With a prefix argument, CELL-REF is assigned the argument value for use
-as an idstamp.
 
-With optional second arg, ERROR-P, non-nil, signal an error if
-CELL-REF is not found within current view.  Will signal same
-error if called interactively when CELL-REF is not found."
+With optional second arg ERROR-P non-nil, or if called
+interactively, will signal an error if CELL-REF is not found
+within current view.
+
+When called interactively, if a prefix argument is given, use
+that value as CELL-REF and search for it as a permanent idstamp
+regardless of cell label type; without a prefix argument, prompt
+for CELL-REF."
   (interactive
    (list (if current-prefix-arg
             (prefix-numeric-value current-prefix-arg)
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index 071bea7..c82648b 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -497,7 +497,7 @@ Smart Keyboard Keys
 @chapter Introduction
 
 This edition of the GNU Hyperbole Manual is for use with any version
-8.0.0pre or greater of GNU Hyperbole.  Hyperbole runs atop GNU Emacs 24.3
+8.0.0pre 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,



reply via email to

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