Skip to main content
18 votes
Accepted

Org-Mode: Link files with IDs and not Filenames

Customize the variable org-id-link-to-org-use-id and set it to t (AKA Create ID to make link). Then when you do C-cl (i.e. org-store-link), an ID property will be added to the headline with a UUID as ...
NickD's user avatar
  • 32.5k
14 votes

How can I get with org-store-link relative path instead of absolute?

The variable you need to customize is org-link-file-path-type. It doesn't appear in the org manual, but it's documentation is available via C-h v: Documentation: How the path name in file links ...
Tyler's user avatar
  • 22.5k
10 votes

Org-mode link to function definition

For elisp that is certainly possible. The general strategy might be something like: [[elisp:(find-function 'describe-function)]] You could add a description if you wanted to also, e.g. [[elisp:(...
John Kitchin's user avatar
10 votes
Accepted

Fontify broken links in org-mode

In org-9 it might be as simple as this for file links: (org-link-set-parameters "file" :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning))) For internal links I don't know an ...
John Kitchin's user avatar
10 votes
Accepted

org mode open link in browser directly

[This answer is meant as a tutorial introduction to how one would debug problems like the OP's, so it is more detailed than the "answer" which is just the setting of browse-url-browser-...
NickD's user avatar
  • 32.5k
9 votes
Accepted

Org-mode custom youtube link syntax

The abbreviated link type can easily be defined with org-set-link-parameters. That handles url's like yt:<video ID> but not image overlays for org links like [[https://youtu.be/<video ID>][...
Tobias's user avatar
  • 33.5k
8 votes
Accepted

Is there a way to create an org-mode link that opens help?

There is. See (info "(org) External Links"): [[help:princ]]
jagrg's user avatar
  • 3,984
6 votes

Create image links in org-mode

It can be be done using a macro: #+MACRO: imglnk @@html:<a href="$1"><img src="$2"></a>@@ This is an image link: {{{imglnk(path-to-file,path-to-image)}}}
Francesquini's user avatar
6 votes
Accepted

how to display target of an org-mode link in the echo area or as tooltip?

tl;dr: do M-x customize-variable for the variable help-at-pt-display-when-idle and set its value to t. (Or "always", which is what the Customize buffer says.) What was initially confusing here is ...
Dan Drake's user avatar
  • 685
6 votes
Accepted

Insert link to a heading with ID

You need to enable ID links by customizing the option org-id-link-to-org-use-id. The doc string of the variable says: Non-nil means storing a link to an Org file will use entry IDs. The variable can ...
NickD's user avatar
  • 32.5k
6 votes
Accepted

How to follow an internal link in recent org-mode?

This is a bug IMO and you should report it with M-x org-submit-bug-report. It is caused by org-ctags.el which unilaterally sets the value of the variable org-open-link-functions. If you do C-h v org-...
NickD's user avatar
  • 32.5k
5 votes
Accepted

Org-mode link to function definition

Using the suggested global binding C-c l for storing a link when you are visiting any file (not just an org-mode file) and the one for inserting a link into an org file, C-c C-l, should work fine. It ...
NickD's user avatar
  • 32.5k
5 votes
Accepted

org-mode: link to tag/target inside a source code block

In literal examples, Org interprets strings like (ref:name) as labels, and use them as targets for special hyperlinks like [[(name)]] (...) You can also add a -r switch which removes the ...
jagrg's user avatar
  • 3,984
5 votes

Is there a way to create an org-mode link that opens help?

You can execute arbitrary elisp code from a link: [[elisp:(message "Hello")][Greeting]] Clicking on the link runs the code and you get a greeting in the echo area. All you have to do is ...
NickD's user avatar
  • 32.5k
4 votes

How to get automatic backlinks when linking files in in org-mode?

I just saw this new emacs package org-super-links that allows backlinks creation. Usage example: * Section A :PROPERTIES: :ID: 6a63d1d9-d361-4586-9315-6f7cb98ab2ef :END: :BACKLINKS: [...
Picaud Vincent's user avatar
4 votes

Disable 'beautification' of text when point is on same line in org

I've wanted this too. (2021) Try the org-appear package, which can toggle emphasis, entities, and a few other things while your cursor is in the hidden text (not the entire line though). There are ...
amitp's user avatar
  • 2,591
3 votes
Accepted

Validate internal fuzzy links in org-mode

Links in org-files are font-locked by function org-activate-links. That function also looks for "fuzzy" link types in the alist org-link-parameters. So we are lucky and can also use org-link-set-...
Tobias's user avatar
  • 33.5k
3 votes
Accepted

How can I change external program to open org URLs for one org file only

Error is caused by this quote: # -*- browse-url-browser-function: 'browse-url-chromium -*- ___________________________________| It shouldn't be there. Open video path in MPV on *nix OS's Add this ...
Alexandr Karbivnichyi's user avatar
3 votes
Accepted

Org mode: #+INCLUDE remote files?

Disclaimer: I'm not an org user. The #+INCLUDE command requires valid file names in Emacs. If you want to include a remote file, you better use Tramp file names. However, if you enable URL Handler ...
Michael Albinus's user avatar
3 votes
Accepted

How to expand external files inline on orgmode?

Nowadays this is possible using the org-transclusion package! After installing it, write this in a file in Org mode: #+transclude: [[path-to-external-file]] Then M-x org-transclusion-mode and the ...
orgtre's user avatar
  • 1,110
3 votes
Accepted

How to capture and link code comments as org agenda items?

A capture template can contain arbitrary elisp code using the %(...) syntax. We just need a function that takes a string (which will be the region you are capturing) and strips the comment characters....
erikstokes's user avatar
3 votes
Accepted

Update target of internal org-mode link

You could use org-insert-link not totally interactively with (org-insert-link nil "other" "description") but that won't help. The following functions are a quick-and-dirty solution to update your ...
adl's user avatar
  • 646
3 votes
Accepted

org-publish-project fails because of defective org-links - repair links automatically or ignore them?

It seems you can set the variable org-export-with-broken-links: org-export-with-broken-links is a variable defined in ‘ox.el’. Its value is t Original value was nil Documentation: Non-...
JeanPierre's user avatar
  • 7,475
3 votes

Package that links words as they are typed to existing org-files/-headers?

You can use Radio Links for this. I use them quite a bit. Here's an excerpt with an example from the org-mode manual. For example, a target <<<My Target>>> causes each occurrence ...
ian's user avatar
  • 183
3 votes
Accepted

Changing the default binding to open a link in an org mode file using RET

You just need to set (setq org-return-follows-link t) in your init file (or use the Customize interface to do the same). Check also org-tab-follows-link and org-mouse-1-follows-link. EDIT: Actually, ...
NickD's user avatar
  • 32.5k
2 votes
Accepted

How can I manually set links in org mode?

I believe this is essentially what you want: ;; Set directory of files to search for *.org files (setq autolinks-mode-dir "/Users/jkitchin/vc/journal/2018/08/07/") ;; Get all .org files in this ...
John Kitchin's user avatar
2 votes
Accepted

Is there a fast way to get a docview link to a specific page in a PDF document?

There is org-docview which allows you to create usual org-links to documents open in docview-mode. Using C-c l you can store a link and using C-c C-l you can insert it. I would actually suggest using ...
andrej's user avatar
  • 1,003
2 votes

On orgmode link- dired like open with or open in dired current link?

file+sys:image.png should open with the system application.
John Kitchin's user avatar
2 votes

Create image links in org-mode

Org Mode already supports embedding images in exported HTML. The inline preview functionality does not work for remote images (i.e. those found on the internet). See the question about this. Preview ...
Tianxiang Xiong's user avatar
2 votes
Accepted

Don't execute org-mode links to executables

In your current settings the line (sh-mode . emacs) is not valid. Documentation states that only following entries: string, directory, remote, auto-mode, t and system are allowed. This means if your ...
jue's user avatar
  • 4,666

Only top scored, non community-wiki answers of a minimum length are eligible