From efb74f9440d090dfb0271ba55084812fe0d7e165 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 26 May 2022 01:31:41 -0700 Subject: [PATCH] [oni-org] Switch to the marker's buffer before getting ID --- oni-org/oni-org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 615c46b..9893754 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; 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) ;; 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 ":")) (marker (org-find-olp split-value))) (save-excursion - (goto-char marker) - (format "[[id:%s][%s]]" (org-id-get-create) (car (last split-value)))))) + (with-current-buffer (marker-buffer marker) + (goto-char marker) + (format "[[id:%s][%s]]" (org-id-get-create) (car (last split-value))))))) (add-to-list 'org-properties-postprocess-alist '("PROJECT" . oni-org-link-project))