branch: externals/org
commit ffccdb62948813063bcd9831d2ebfc9308c5204b
Author: Morgan Smith <[email protected]>
Commit: Ihor Radchenko <[email protected]>
Change uses of deprecated `org-show-context(-detail)'
* doc/org-manual.org: Add `org-fold-show-context-detail' to vindex.
* doc/org-guide.org:
* lisp/ol.el:
* lisp/org-agenda.el:
* lisp/org-compat.el:
* lisp/org-fold.el:
* testing/lisp/test-org-fold.el:
* testing/lisp/test-org.el:
* testing/org-test.el:
Change all uses of `org-show-context' to `org-fold-show-context'.
Change all uses of `org-show-context-detail' to
`org-fold-show-context-detail'.
---
doc/org-guide.org | 2 +-
doc/org-manual.org | 5 +++--
lisp/ol.el | 2 +-
lisp/org-agenda.el | 2 +-
lisp/org-compat.el | 2 +-
lisp/org-fold.el | 2 +-
testing/lisp/test-org-fold.el | 4 ++--
testing/lisp/test-org.el | 4 ++--
testing/org-test.el | 8 ++++----
9 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/doc/org-guide.org b/doc/org-guide.org
index cc7155c61c..5e59fb0258 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -2657,7 +2657,7 @@ behavior of {{{kbd(C-a)}}} and {{{kbd(C-e)}}} in
headlines.
[fn:2] If you do not want the line to be split, customize the variable
~org-M-RET-may-split-line~.
-[fn:3] See also the variable ~org-show-context-detail~ to decide how
+[fn:3] See also the variable ~org-fold-show-context-detail~ to decide how
much context is shown around each match.
[fn:4] The corresponding in-buffer setting is =#+STARTUP: logdone=.
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 8c6962d4b9..7a110a98f9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1028,12 +1028,13 @@ keys have different functionality.
#+cindex: folding, sparse trees
#+cindex: occur, command
+#+vindex: org-fold-show-context-detail
#+vindex: org-show-context-detail
An important feature of Org mode is the ability to construct /sparse
trees/ for selected information in an outline tree, so that the entire
document is folded as much as possible, but the selected information
is made visible along with the headline structure above it[fn:: See
-also the variable ~org-show-context-detail~ to decide how much context
+also the variable ~org-fold-show-context-detail~ to decide how much context
is shown around each match.]. Just try it out and you will see
immediately how it works.
@@ -11001,7 +11002,7 @@ at the right spot in ~org-agenda-custom-commands~. For
example:
((org-agenda-sorting-strategy '(priority-down))
(org-agenda-prefix-format " Mixed: ")))
("U" tags-tree "+boss-urgent"
- ((org-show-context-detail 'minimal)))
+ ((org-fold-show-context-detail 'minimal)))
("N" search ""
((org-agenda-files '("~org/notes.org"))
(org-agenda-text-search-extra-files nil)))))
diff --git a/lisp/ol.el b/lisp/ol.el
index 9ee080e0e5..7888230acc 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1636,7 +1636,7 @@ will be used to search in all files.
When AVOID-POS is given, ignore matches near that position.
When optional argument STEALTH is non-nil, do not modify
-visibility around point, thus ignoring `org-show-context-detail'
+visibility around point, thus ignoring `org-fold-show-context-detail'
variable.
When optional argument NEW-HEADING-CONTAINER is an element, any
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a10ae18884..3497a9763e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9665,7 +9665,7 @@ if it was hidden in the outline."
(defun org-agenda-cycle-show (&optional n)
"Show the current entry in another window, with default settings.
-Default settings are taken from `org-show-context-detail'. When
+Default settings are taken from `org-fold-show-context-detail'. When
use repeatedly in immediate succession, the remote entry will
cycle through visibility
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index eebb1b7a46..d9ac7e4acc 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -1915,7 +1915,7 @@ key."
;;;; Simple
(defun org-mark-jump-unhide (&rest _)
- "Make the point visible with `org-show-context' after jumping to the mark."
+ "Make the point visible with `org-fold-show-context' after jumping to the
mark."
(when (and (derived-mode-p 'org-mode)
(org-invisible-p))
(org-fold-show-context 'mark-goto)))
diff --git a/lisp/org-fold.el b/lisp/org-fold.el
index 4b97d9455c..ddc666d519 100644
--- a/lisp/org-fold.el
+++ b/lisp/org-fold.el
@@ -651,7 +651,7 @@ be shown."
"Set visibility around point according to DETAIL.
DETAIL is either nil, `minimal', `local', `ancestors',
`ancestors-full', `lineage', `tree', `canonical' or t. See
-`org-show-context-detail' for more information."
+`org-fold-show-context-detail' for more information."
;; Show current heading and possibly its entry, following headline
;; or all children.
(if (and (org-at-heading-p) (not (eq detail 'local)))
diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index a3ad7d7e32..fbb2fbf33d 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -722,7 +722,7 @@ Unfolded Paragraph.
** Subheading 2
[[file:%s]]" org-logo-image org-logo-image org-logo-image)
(org-overview)
- (org-show-subtree)
+ (org-fold-show-subtree)
(org-fold-subtree t)
(run-hook-with-args 'org-cycle-hook 'folded)
(should-not org-link-preview-overlays)
@@ -730,7 +730,7 @@ Unfolded Paragraph.
(cl-every
(lambda (ov) (overlay-get ov 'org-image-overlay))
(overlays-in (point-min) (point-max))))
- (org-show-subtree)
+ (org-fold-show-subtree)
(run-hook-with-args 'org-cycle-hook 'subtree)
(should org-link-preview-overlays)
(should
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 03ab3edac0..ef1a4798b3 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -4308,10 +4308,10 @@ text"
(org-test-with-temp-text "* Main\n** H1\nFoo\n** H2\nBar\n** H3\nBaz"
(org-overview)
(search-forward "H1")
- (org-show-context 'minimal)
+ (org-fold-show-context 'minimal)
(org-cycle)
(search-forward "H3")
- (org-show-context 'minimal)
+ (org-fold-show-context 'minimal)
;; At this point, buffer displays, with point at "|",
;;
;; * Main
diff --git a/testing/org-test.el b/testing/org-test.el
index 95bf23520a..46ec56608d 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -130,8 +130,8 @@ currently executed.")
(setq to-be-removed (current-buffer))
(condition-case nil
(progn
- (org-show-subtree)
- (org-show-all '(blocks)))
+ (org-fold-show-subtree)
+ (org-fold-show-all '(blocks)))
(error nil))
(save-restriction ,@body)))
(unless (or visited-p (not to-be-removed))
@@ -154,8 +154,8 @@ currently executed.")
(condition-case nil
(progn
(outline-next-visible-heading 1)
- (org-show-subtree)
- (org-show-all '(blocks)))
+ (org-fold-show-subtree)
+ (org-fold-show-all '(blocks)))
(error nil))
(setq results (save-restriction ,@body))))
(unless visited-p