Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute file paths using ~ #174

Open
fxkrait opened this issue Aug 26, 2021 · 2 comments
Open

Absolute file paths using ~ #174

fxkrait opened this issue Aug 26, 2021 · 2 comments

Comments

@fxkrait
Copy link

fxkrait commented Aug 26, 2021

In #128 it was posted that to get absolute file paths, to do (setq-default org-download-abbreviate-filename-function 'expand-file-name)

My org-download-image-dir is using ~ for the absolute path:

  • (setq-default org-download-image-dir "~/Documents/org/.images")

Yet when I org-download-screenshot an image, the absolute path does not start with ~

  • [[file:/home/myUser/Documents/org/.images/dir/2021-08-26_09-59-34_screenshot.png]]

I would like to also have the attached images use ~, so that I can view the absolute path images on different systems where I might not have the same user name.

  • [[file:~/Documents/org/.images/dir/2021-08-26_09-59-34_screenshot.png]]
@fxkrait
Copy link
Author

fxkrait commented Aug 26, 2021

Just an update: I ended up incorporating relative paths into my workflow, so you can close this issue if it doesn't seem necessary to add a ~ option to absolute paths.
The reason for the issue, was that I was trying to find a way I can copy the attached images around to different org documents. Emacs copies the raw file links with relative paths, which break if org documents are in different directories, so that's why I was looking into absolute file paths of the images.

However, now I'll just use relative file paths (./.images/), and use ox-clip (ox-clip-image-to-clipboard), which lets me copy the attached image from one document into the clipboard, where I can then do a org-download-screenshot again and paste it into a new document (albeit now with a duplicate image).

  • One example of the need to copy images to new org documents, would be when making anki cards in a separate file and using anki-editor.

@jingminglang
Copy link

jingminglang commented Feb 21, 2022

(setq-default org-download-abbreviate-filename-function 'concat) works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants