branch: externals/org commit 0b1f335172ce059e3e44a6edce1e437580bf4ac6 Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-toggle-timestamp-overlays: Do not rely on faces to find timestamps * lisp/org.el (org-display-custom-time): Mark cutom time with special text propertiy - org-custom-date. (org-toggle-timestamp-overlays): Search for org-custom-date to see where the custom overlays are applied. Reported-by: Jason Hemann <jason.hem...@shu.edu> Link: https://orgmode.org/list/87d5cbe2-2956-4657-b74c-19fcea0e27b9@Spark --- lisp/org.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 0d6f787b26..d735edb7f0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14679,12 +14679,11 @@ The command returns the inserted time stamp." (setq org-display-custom-times (not org-display-custom-times)) (unless org-display-custom-times (let ((p (point-min)) (bmp (buffer-modified-p))) - (while (setq p (next-single-property-change p 'display)) - (when (and (get-text-property p 'display) - (eq (get-text-property p 'face) 'org-date)) + (while (setq p (next-single-property-change p 'org-custom-date)) + (when (get-text-property p 'org-custom-date) (remove-text-properties - p (setq p (next-single-property-change p 'display)) - '(display t)))) + p (setq p (next-single-property-change p 'org-custom-date)) + '(display t org-custom-date t)))) (set-buffer-modified-p bmp))) (org-restart-font-lock) (setq org-table-may-need-update t) @@ -14707,7 +14706,8 @@ The command returns the inserted time stamp." str (org-add-props (format-time-string tf (org-encode-time time)) nil 'mouse-face 'highlight)) - (put-text-property beg end 'display str))) + (put-text-property beg end 'display str) + (put-text-property beg end 'org-custom-date t))) (defun org-fix-decoded-time (time) "Set 0 instead of nil for the first 6 elements of time.