When org-download-method is set to attach, the download file is placed in a subdirectory of org-attach-id-dir, where the node ID is used as the subdirectory path. For example, create an empty org file, copy the following URL to your clipboard, and then run M-x org-download-yank: https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png
The buffer will now look like this (but with a different ID):
But this link is now broken, as the image no longer exists at that location. It's been moved relative to the org file itself. If you add a link like [[file:./foo.png]], that will point to the file.
I believe the intended behavior should be that only the filename should change, not the directory. In this example, "./foo.png" should not have been created, but "data/BD/A97238-B45D-4FA1-82EE-DC2523033886/foo.png" should have been created.
When
org-download-method
is set toattach
, the download file is placed in a subdirectory oforg-attach-id-dir
, where the node ID is used as the subdirectory path. For example, create an empty org file, copy the following URL to your clipboard, and then runM-x org-download-yank
: https://upload.wikimedia.org/wikipedia/commons/7/70/Example.pngThe buffer will now look like this (but with a different ID):
Now run
M-x org-download-rename-last-file
and replace the name with "foo" and hit enter. The buffer will now look like this:But this link is now broken, as the image no longer exists at that location. It's been moved relative to the org file itself. If you add a link like
[[file:./foo.png]]
, that will point to the file.I believe the intended behavior should be that only the filename should change, not the directory. In this example, "./foo.png" should not have been created, but "data/BD/A97238-B45D-4FA1-82EE-DC2523033886/foo.png" should have been created.