branch: externals/org-remark commit 576e5680682bfb80a50b057b8752e0674d766f8d Author: Noboru Ota <m...@nobiot.com> Commit: Noboru Ota <m...@nobiot.com>
fix #28 toggle causes error on saving highlights This was caused by the fact the toggle adds org-remark-face and org-remark-hidden properties to the highlight overlay. They need to be excluded from the resultant org properties. This was not implemented correctly. --- org-remark.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/org-remark.el b/org-remark.el index 3ca284383f..be0a94b310 100644 --- a/org-remark.el +++ b/org-remark.el @@ -4,9 +4,9 @@ ;; Author: Noboru Ota <m...@nobiot.com> ;; URL: https://github.com/nobiot/org-remark -;; Version: 1.0.4 +;; Version: 1.0.5 ;; Created: 22 December 2020 -;; Last modified: 16 April 2022 +;; Last modified: 14 May 2022 ;; Package-Requires: ((emacs "27.1") (org "9.4")) ;; Keywords: org-mode, annotation, writing, note-taking, marginal-notes @@ -1021,15 +1021,15 @@ It returns t when sorting is done." (defun org-remark-highlights-hide () "Hide highlights. This function removes the font-lock-face of all the highlights, -and add org-remark-hidden property with value t. It does not +and add *org-remark-hidden property with value t. It does not check the current hidden state, thus not interactive. Use `org-remark-toggle' command to manually toggle the show/hide state." (when-let ((highlights org-remark-highlights)) (dolist (highlight highlights) - (overlay-put highlight 'org-remark-face (overlay-get highlight 'face)) + (overlay-put highlight '*org-remark-face (overlay-get highlight 'face)) (overlay-put highlight 'face nil) - (overlay-put highlight 'org-remark-hidden t)) + (overlay-put highlight '*org-remark-hidden t)) (setq org-remark-highlights-hidden t))) (defun org-remark-highlights-show () @@ -1040,8 +1040,8 @@ interactive. Use `org-remark-toggle' command to manually toggle the show/hide state." (when-let ((highlights org-remark-highlights)) (dolist (highlight highlights) - (overlay-put highlight 'org-remark-hidden nil) - (overlay-put highlight 'face (overlay-get highlight 'org-remark-face))) + (overlay-put highlight '*org-remark-hidden nil) + (overlay-put highlight 'face (overlay-get highlight '*org-remark-face))) (setq org-remark-highlights-hidden nil))) (defun org-remark-highlights-housekeep ()