Stop org-cite-csl-activate from modifying buffer

This commit is contained in:
TEC 2021-10-04 16:16:34 +08:00
parent 5929497859
commit 7572974b42
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 8 additions and 4 deletions

View File

@ -5509,11 +5509,15 @@ To improve =org-cite=.
(interactive)
(setq org-cite-activate-processor 'csl-activate)
(add-hook! 'org-mode-hook '((lambda () (cursor-sensor-mode 1)) org-cite-csl-activate-render-all))
(defadvice! +org-cite-csl-activate-render-all-silent (orig-fn)
:around #'org-cite-csl-activate-render-all
(with-silent-modifications (funcall orig-fn)))
(when (eq major-mode 'org-mode)
(save-excursion
(goto-char (point-min))
(org-cite-activate (point-max)))
(org-cite-csl-activate-render-all))))
(with-silent-modifications
(save-excursion
(goto-char (point-min))
(org-cite-activate (point-max)))
(org-cite-csl-activate-render-all)))))
(use-package! oc-bibtex-actions
:when (featurep! :completion vertico)