Skip to content

Commit

Permalink
fix: args-out-of-range error during loading highlights #89
Browse files Browse the repository at this point in the history
  • Loading branch information
nobiot committed Nov 2, 2024
1 parent 13ec632 commit e07dbdd
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions org-remark.el
Original file line number Diff line number Diff line change
Expand Up @@ -1690,17 +1690,18 @@ process."
"Org-remark: error during loading highlights: %S"
;; Load highlights with demoted errors -- this makes the loading
;; robust against errors in loading.
(dolist (highlight (org-remark-highlights-get notes-buf))
(let ((ov (org-remark-highlight-load highlight)))
(when ov (push ov overlays))))
(unless update (org-remark-notes-setup notes-buf source-buf))
(if overlays
(progn (run-hook-with-args 'org-remark-highlights-after-load-functions
overlays notes-buf)
;; Return t
t)
;; if there is no overlays loaded, return nil
nil))))))
(org-with-wide-buffer
(dolist (highlight (org-remark-highlights-get notes-buf))
(let ((ov (org-remark-highlight-load highlight)))
(when ov (push ov overlays))))
(unless update (org-remark-notes-setup notes-buf source-buf))
(if overlays
(progn (run-hook-with-args 'org-remark-highlights-after-load-functions
overlays notes-buf)
;; Return t
t)
;; if there is no overlays loaded, return nil
nil)))))))

(defun org-remark-highlights-clear ()
"Delete all highlights in the buffer.
Expand Down

0 comments on commit e07dbdd

Please sign in to comment.