Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

>     (org-with-wide-buffer
>      (dolist (link (nreverse
>                     (org-element-map (org-element-parse-buffer) 'link
>                       (lambda (l)
>                         (member (org-element-property :type l)
>                                 '("custom-id" "fuzzy"))))))
>        (goto-char (+ (org-element-property :begin link) 2))
>        (insert "file:path/to/other-file.org::")))

Err, should be

  (org-with-wide-buffer
   (dolist (link (nreverse
                  (org-element-map (org-element-parse-buffer) 'link
                    (lambda (l)
                      (and (member (org-element-property :type l)
                                   '("custom-id" "fuzzy"))
                           l)))))
     (goto-char (org-element-property :begin link))
     (forward-char 2)
     (insert "file:path/to/other-file.org::")))

Reply via email to