diff --git a/lisp/org-clock.el b/lisp/org-clock.el index e4727d06e..c12142d81 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2117,6 +2117,7 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times." h m)))) (defvar-local org-clock-overlays nil) +(put 'org-clock-overlays 'permanent-local t) (defun org-clock-put-overlay (time) "Put an overlay on the headline at point, displaying TIME. diff --git a/lisp/org-colview.el b/lisp/org-colview.el index ef42f9e23..9699be61b 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -116,6 +116,7 @@ in `org-columns-summary-types-default', which see." (defvar-local org-columns-overlays nil "Holds the list of current column overlays.") +(put 'org-columns-overlays 'permanent-local t) (defvar-local org-columns-current-fmt nil "Local variable, holds the currently active column format.") diff --git a/lisp/org-num.el b/lisp/org-num.el index 9680efed2..0f8dca28d 100644 --- a/lisp/org-num.el +++ b/lisp/org-num.el @@ -156,6 +156,7 @@ control tag inheritance." (defvar-local org-num--overlays nil "Ordered list of overlays used for numbering outlines.") +(put 'org-num--overlays 'permanent-local t) (defvar-local org-num--skip-level nil "Level below which headlines from current tree are not numbered. diff --git a/lisp/org-table.el b/lisp/org-table.el index c5efe8f0c..f5a433c7d 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -479,6 +479,7 @@ This may be useful when columns have been shrunk." (format "|%s" (mapconcat #'identity (reverse str) ""))))) (defvar-local org-table-header-overlay nil) +(put 'org-table-header-overlay 'permanent-local t) (defun org-table-header-set-header () "Display the header of the table at point." (let ((gcol temporary-goal-column)) @@ -3814,6 +3815,7 @@ FACE, when non-nil, for the highlight." (defvar-local org-table-coordinate-overlays nil "Collects the coordinate grid overlays, so that they can be removed.") +(put 'org-table-coordinate-overlays 'permanent-local t) (defun org-table-overlay-coordinates () "Add overlays to the table at point, to show row/column coordinates." diff --git a/lisp/org.el b/lisp/org.el index e72cf056a..20e536a52 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5942,6 +5942,8 @@ needs to be inserted at a specific position in the font-lock sequence.") (defvar-local org-custom-properties-overlays nil "List of overlays used for custom properties.") +;; Preserve when switching modes or when restarting Org. +(put 'org-custom-properties-overlays 'permanent-local t) (defun org-toggle-custom-properties-visibility () "Display or hide properties in `org-custom-properties'." @@ -10756,6 +10758,7 @@ D Show deadlines and scheduled items between a date range." (defvar-local org-occur-highlights nil "List of overlays used for occur matches.") +(put 'org-occur-highlights 'permanent-local t) (defvar-local org-occur-parameters nil "Parameters of the active org-occur calls. This is a list, each call to org-occur pushes as cons cell, @@ -16149,6 +16152,10 @@ SNIPPETS-P indicates if this is run to create snippet images for HTML." ;; Image display (defvar-local org-inline-image-overlays nil) +;; Preserve when switching modes or when restarting Org. +;; If we clear the overlay list and later enable Or mode, the existing +;; image overlays will never be cleared by `org-toggle-inline-images'. +(put 'org-inline-image-overlays 'permanent-local t) (defun org--inline-image-overlays (&optional beg end) "Return image overlays between BEG and END."