0

I do have an absolute path as my org-download directory, but whenever I org-download an image, the link that is created uses a relative path in the buffer.

#+DOWNLOADED: screenshot @ 2024-05-24 14:21:36 [[file:../../pic/raster/org-download/20240524-142136_screenshot.png]] 

How come?

I have defined:

org-download-image-dir is a variable defined in ‘org-download.el’. Its value is "~/ds/pic/raster/org-download" Original value was nil 
org-link-file-path-type is a variable defined in ‘ol.el’. Its value is ‘absolute’ Original value was ‘adaptive’ 

This means that when I try to copy the link to another buffer, the image link breaks.

1
  • What do you mean by "uses a relative path in the buffer"? Commented May 25, 2024 at 3:34

1 Answer 1

1

Check the value of org-link-file-path-type. Its doc string says:

How the path name in file links should be stored. Valid values are: relative Relative to the current directory, i.e. the directory of the file into which the link is being inserted. absolute Absolute path, if possible with ~ for home directory. noabbrev Absolute path, no abbreviation of home directory. adaptive Use relative path for files in the current directory and sub- directories of it. For other files, use an absolute path. Alternatively, users may supply a custom function that takes the full filename as an argument and returns the path. 

You probably have set it to relative. Setting it to absolute should work well for your case.

2
  • 1
    This is why I think twice before answering any question of yours: you don't provide any feedback. No acceptance, no up-voting, not even a comment. I'll even take down-voting at this point as long as it is justified: any response is better than the deafening silence of your non-responses. Commented May 28, 2024 at 20:25
  • I'll get to all answers, eventually, but there are just too many balls in the air;). This answer is correct for the given question, so I'l mark it as solved. Thank you, again. Commented Oct 30, 2024 at 13:03

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.