mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): only update relative path of file links (#1226)
This commit is contained in:
@ -13,6 +13,7 @@
|
|||||||
- [#1195](https://github.com/org-roam/org-roam/issues/1195) fix ID face showing as invalid if within Org ID files, but not Org-roam's.
|
- [#1195](https://github.com/org-roam/org-roam/issues/1195) fix ID face showing as invalid if within Org ID files, but not Org-roam's.
|
||||||
- [#1199](https://github.com/org-roam/org-roam/issues/1199) make Org-roam link insertions respect `org-roam-link-title-format` everywhere.
|
- [#1199](https://github.com/org-roam/org-roam/issues/1199) make Org-roam link insertions respect `org-roam-link-title-format` everywhere.
|
||||||
- [#1201](https://github.com/org-roam/org-roam/issues/1201) fix `org-roam-db-build-cache` failing in scenarios involving duplicate IDs and deleted files.
|
- [#1201](https://github.com/org-roam/org-roam/issues/1201) fix `org-roam-db-build-cache` failing in scenarios involving duplicate IDs and deleted files.
|
||||||
|
- [#1226](https://github.com/org-roam/org-roam/issues/1226) only update relative path of file links
|
||||||
|
|
||||||
## 1.2.2 (06-10-2020)
|
## 1.2.2 (06-10-2020)
|
||||||
|
|
||||||
|
@ -1321,7 +1321,8 @@ replaced links are made relative to the current buffer."
|
|||||||
(when-let ((link (org-element-lineage (org-element-context) '(link) t)))
|
(when-let ((link (org-element-lineage (org-element-context) '(link) t)))
|
||||||
(let ((type (org-element-property :type link))
|
(let ((type (org-element-property :type link))
|
||||||
(path (org-element-property :path link)))
|
(path (org-element-property :path link)))
|
||||||
(when (and (f-relative-p path)
|
(when (and (string= type "file")
|
||||||
|
(f-relative-p path)
|
||||||
(org-in-regexp org-link-bracket-re 1))
|
(org-in-regexp org-link-bracket-re 1))
|
||||||
(let* ((file-path (expand-file-name path (file-name-directory old-path)))
|
(let* ((file-path (expand-file-name path (file-name-directory old-path)))
|
||||||
(new-path (org-roam-link-get-path file-path)))
|
(new-path (org-roam-link-get-path file-path)))
|
||||||
|
Reference in New Issue
Block a user