From 0e392372dfdd963dcd5a4f90dc2607eaecfa2f91 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 24 Jan 2018 02:20:26 -0500 Subject: [PATCH] lang/org: fix relative file attachments #370 Affected non-image files having one-too-many ../ in its path. --- modules/lang/org/autoload/org-attach.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/org-attach.el b/modules/lang/org/autoload/org-attach.el index 554549575..2a493bcfe 100644 --- a/modules/lang/org/autoload/org-attach.el +++ b/modules/lang/org/autoload/org-attach.el @@ -114,7 +114,7 @@ the cursor." (insert (format "%s [[./%s][%s]] " (+org-attach--icon filename) - (file-relative-name filename buffer-file-name) + (file-relative-name filename (file-name-directory buffer-file-name)) (file-name-nondirectory (directory-file-name filename))))))) ;;;###autoload