1
0
Fork 0

[oni-org] Switch to the marker's buffer before getting ID

This commit is contained in:
Tom Willemse 2022-05-26 01:31:41 -07:00
parent 467914a556
commit efb74f9440

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2022.0513.111418 ;; Version: 2022.0523.185109
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch) ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -825,8 +825,9 @@ This is an around advice for org-html--svg-image as FUN."
(let* ((split-value (split-string value ":")) (let* ((split-value (split-string value ":"))
(marker (org-find-olp split-value))) (marker (org-find-olp split-value)))
(save-excursion (save-excursion
(with-current-buffer (marker-buffer marker)
(goto-char marker) (goto-char marker)
(format "[[id:%s][%s]]" (org-id-get-create) (car (last split-value)))))) (format "[[id:%s][%s]]" (org-id-get-create) (car (last split-value)))))))
(add-to-list 'org-properties-postprocess-alist '("PROJECT" . oni-org-link-project)) (add-to-list 'org-properties-postprocess-alist '("PROJECT" . oni-org-link-project))