branch: externals/org-transclusion
commit abc83df1b06720265f06b76e697580bb1c5eb9b9
Author: Noboru Ota <[email protected]>
Commit: Noboru Ota <[email protected]>

    refact: Rename add-target-marker add-source-marker
---
 org-transclusion-src-lines.el |  2 +-
 org-transclusion.el           | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/org-transclusion-src-lines.el b/org-transclusion-src-lines.el
index 5b58d78c5e..84a7ab3cf2 100644
--- a/org-transclusion-src-lines.el
+++ b/org-transclusion-src-lines.el
@@ -134,7 +134,7 @@ One of the numbers can be omitted.  When the first number is
 omitted (e.g. -10), it means from the beginning of the file to
 line 10. Likewise, when the second number is omitted (e.g. 10-),
 it means from line 10 to the end of file."
-  (let* ((src-mkr (org-transclusion-add-target-marker link))
+  (let* ((src-mkr (org-transclusion-add-source-marker link))
          (search-option (org-element-property :search-option link))
          (type (org-element-property :type link))
          (buf (and src-mkr (marker-buffer src-mkr)))
diff --git a/org-transclusion.el b/org-transclusion.el
index cc18be1ee0..7beb1f8891 100644
--- a/org-transclusion.el
+++ b/org-transclusion.el
@@ -1072,8 +1072,8 @@ returned by hooks in `org-transclusion-add-functions'."
         (run-hook-with-args 'org-transclusion-after-add-functions beg end))
       t)))
 
-(defun org-transclusion-add-target-marker (link)
-  "Return the marker of transclusion target by opening LINK.
+(defun org-transclusion-add-source-marker (link)
+  "Return the marker of transclusion source by opening LINK.
 LINK must be Org's link object that `org-link-open' can act on. As long
 as `org-link-open' opens a buffer within Emacs, this function should
 return a marker."
@@ -1105,7 +1105,7 @@ return a marker."
 Return nil if not found."
   (and-let*
       ((_ (string= "id" (org-element-property :type link)))
-       (mkr (org-transclusion-add-target-marker link))
+       (mkr (org-transclusion-add-source-marker link))
        (buf (marker-buffer mkr))
        (_ (buffer-live-p (marker-buffer mkr))))
     (with-current-buffer buf
@@ -1135,7 +1135,7 @@ Return nil if not found."
   ;; already open with a point. If the search option is present, the point will
   ;; move to the appropriate point and get the element. If the search option is
   ;; not present, the whole buffer needs to be obtained.
-             (mkr (org-transclusion-add-target-marker link))
+             (mkr (org-transclusion-add-source-marker link))
              (buf (marker-buffer mkr)))
     ;; - Silly to go back to the buffer here.
     ;; - `org-transclusion-content-org-filtered' should not return other
@@ -1157,7 +1157,7 @@ Return nil if not found."
   "Return a list for non-Org file LINK object and PLIST.
 Return nil if not found."
   (and-let* (;; (_ (string= "file" (org-element-property :type link)))
-             (mkr (org-transclusion-add-target-marker link))
+             (mkr (org-transclusion-add-source-marker link))
              (buf (marker-buffer mkr)))
     ;; FIXME It's silly to revisit the buffer when it was already visited.
     (with-current-buffer buf

Reply via email to