Create orgfile links with relative paths (org-link-file-path-type)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start in links/init.lua, especially org_store_link and get_link, and compare their current absolute-path behavior with Emacs org-link-file-path-type. Verify that generated file links follow the adaptive, relative, and absolute settings, including files in the same directory.
Written by the indexing model from the issue text.
Description
Does this feature exist in Emacs orgmode core?
Yes
Orgmode link
org-link-file-path-type in ol.el - controls whether links created via org-store-link use relative or absolute file paths.
Additional context
org_store_link and get_link() always produce absolute file paths:
[[file:/home/user/notes/work.org::*My headline][My headline]]
Emacs has org-link-file-path-type to control this:
| Value | Behavior |
|---|---|
adaptive (default) |
Relative for same/sub dirs, absolute otherwise |
relative |
Always relative to current file |
absolute |
Absolute with ~/ |
So linking between files in the same directory would give [[file:work.org::*My headline]] instead.
Back when we fixed relative link navigation (#583), we only covered the reading side. The writing side behind org_store_link still hardcodes absolute paths. A small helper in links/init.lua could apply the configured format before building the file: link.
I would like to have this for telescope-orgmode's insert-link. I could work around it downstream, but since it's part of Emacs orgmode core it makes sense to have it here. Happy to do a PR.
- Dominant language
- Lua
- Stars
- 3.9k
- Forks
- 192
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-orgmode/orgmode
-
Difficulty 1/5 Under an hour Newbie friendliness 73/100
nvim-orgmode/orgmode#1193 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
nvim-orgmode/orgmode#1175 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nvim-orgmode/orgmode#1174 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
nvim-orgmode/orgmode#1173 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 50/100
nvim-orgmode/orgmode#1172 ·
Maintainers usually reply within 1 day
All issues in nvim-orgmode/orgmode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jitsi/jitsi-meet#18020 ·
Maintainers usually reply within 1 day
-
GTK4 apps (Nautilus) aren't blurred: GTK 4.24's ext-background-effect makes Hyprland 0.56 skip blurOpen
Difficulty 1/5 Under an hour Newbie friendliness 94/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
windwp/nvim-ts-autotag#266 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
folke/sidekick.nvim#362 ·