fix(org): org-flag -> org-fold, add spec argument

This implements the fixes described on takaxp/org-tree-slide#54

`org-flag-region` was deprecated on org 9.6, superseded by
`org-fold-region`, which takes different `spec` argument.

Fix: takaxp/org-tree-slide#54
Ref: 5f817f21fc/lisp/org-compat.el (L463)
This commit is contained in:
Takaaki ISHIKAWA 2023-03-12 23:36:27 -03:00 committed by Henrik Lissner
parent 61b799d062
commit d1141b14c1

View file

@ -22,10 +22,10 @@
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^[[:space:]]*\\(#\\+\\)\\(\\(?:BEGIN\\|END\\|ATTR\\)[^[:space:]]+\\).*" nil t)
(org-flag-region (match-beginning 1)
(org-fold-region (match-beginning 1)
(match-end 0)
org-tree-slide-mode
t))))
'block))))
;;;###autoload
(defun +org-present-hide-leading-stars-h ()
@ -33,10 +33,10 @@
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^\\(\\*+\\)" nil t)
(org-flag-region (match-beginning 1)
(org-fold-region (match-beginning 1)
(match-end 1)
org-tree-slide-mode
t))))
'headline))))
;;;###autoload
(defun +org-present-detect-slide-h ()