branch: externals/hyperbole
commit 9057ea0a8a727b4cc28f94bdae3f39e7062995ee
Author: bw <[email protected]>
Commit: bw <[email protected]>

    hyrolo-org-mode - Fix #2 Org 9.7 and up breakage under Emacs 30
---
 hyrolo.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hyrolo.el b/hyrolo.el
index ec07afa2cc..12b7303363 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -3136,17 +3136,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 'org-link :visible nil)
-      (org-fold-core-set-folding-spec-property 'org-link :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