branch: externals/hyperbole
commit 0aecf85c7a54306f22996766baad60558eefe600
Merge: 9278bc60aa 98e88771f3
Author: Robert Weiner <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #546 from rswgnu/rsw
    
    hyrolo-org-mode - Fix Org 9.7 and up breakage under Emacs 30
---
 ChangeLog |  5 +++++
 hyrolo.el | 16 +++++++++-------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 78c4c26bdf..e3f2b530c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,11 @@
 
 2024-06-22  Bob Weiner  <[email protected]>
 
+* hyrolo.el (hyrolo-org-mode): Fix Org mode breakage with Emacs 30 and Org 9.7
+    and up by removing internal variable ref in
+    'org-fold-core-set-folding-spec-property' call and using 'org-link symbol
+    instead.
+
 * hywiki.el (hywiki-active-in-current-buffer-p): Fix to highlight HyWikiWords
     in 'kotl-mode' which is a special class buffer.
             (Commentary): Update this documentation, focusing on use.
diff --git a/hyrolo.el b/hyrolo.el
index a421958c4a..de5e3a9321 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:     22-Jun-24 at 23:44:04 by Mats Lidell
+;; Last-Mod:     22-Jun-24 at 22:19:36 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -3137,17 +3137,19 @@ Any non-nil value returned is a cons of (<entry-name> . 
<entry-source>)."
 
   (when (featurep 'org-fold) ;; newer Org versions
     (setq org-fold-core-style 'overlays) ;; Make compatible with reveal minor 
mode
-    (when (and org-link-descriptive
-               (eq org-fold-core-style 'overlays))
-      (hypb:add-to-invisibility-spec '(org-link)))
+    (hypb:add-to-invisibility-spec '(org-link))
     (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" 
org-ellipsis)) org-ellipsis)
                              "..."))
     (make-local-variable 'org-link-descriptive)
     (when (eq org-fold-core-style 'overlays)
       (hypb:add-to-invisibility-spec '(org-hide-block . t)))
-    (if org-link-descriptive
-       (org-fold-core-set-folding-spec-property (car 
org-link--link-folding-spec) :visible nil)
-      (org-fold-core-set-folding-spec-property (car 
org-link--link-folding-spec) :visible t)))
+    (org-fold-core-set-folding-spec-property
+     (if (boundp 'org-link--link-folding-spec)
+        ;; Org pre-9.7
+        (car org-link--link-folding-spec)
+       ;; Org 9.7 and up
+       (caar org-fold-core--specs))
+     :visible (not org-link-descriptive)))
 
   (setq-local hyrolo-entry-regexp "^\\(\\*+\\)\\([ \t\n\r]+\\)"
              hyrolo-hdr-and-entry-regexp (concat hyrolo-hdr-prefix-regexp 
hyrolo-entry-regexp)

Reply via email to