13 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 ...
user avatar
  • 19.6k
11 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 ...
user avatar
  • 20.2k
8 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 ...
user avatar
  • 10.9k
7 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>][...
user avatar
  • 29.8k
7 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:(...
user avatar
  • 10.9k
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)}}}
user avatar
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 ...
user avatar
  • 19.6k
4 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 ...
user avatar
  • 3,404
4 votes
Accepted

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

There is. See (info "(org) External Links"): [[help:princ]]
user avatar
  • 3,404
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 ...
user avatar
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-...
user avatar
  • 29.8k
3 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 ...
user avatar
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....
user avatar
  • 12.1k
3 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: [...
user avatar
3 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 ...
user avatar
  • 277
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 ...
user avatar
  • 138
3 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 ...
user avatar
  • 19.6k
3 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-...
user avatar
  • 19.6k
3 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 ...
user avatar
  • 2,126
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 ...
user avatar
  • 983
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 ...
user avatar
  • 4,211
2 votes

How to export readable HTML links in Org mode?

Try writing your links in the Org document as [[thing][thing]]. This will create the link with the expected name.
user avatar
2 votes

How to insert text immediately before a link (at the start of a line) in org mode?

What I've noticed is that if you place the cursor on the first character and then do C-b followed by C-f (or just C-b if you're at the beginning of a buffer), what you type afterwards will be ...
user avatar
2 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 ...
user avatar
  • 626
2 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 ...
user avatar
2 votes
Accepted

Open org-mode link of gif image and display inside of Emacs buffer with command image-animate

I think you were already very close. Starting from your code I ended up with the entry (lambda (file link) (let ((my-image (create-image file)) (tmpbuf (get-buffer-create "*gif"))) (...
user avatar
  • 2,646
2 votes
Accepted

Org links file name encoding issue

Have you tried using org-link-unescape to get back the original filename? Something like: :face '(lambda (path) (if (file-exists-p (org-link-unescape path)) '(:foreground "green"...
user avatar
  • 4,059
2 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-...
user avatar
  • 6,943
2 votes
Accepted

org mode link with just the non-directory part of the file name

You can use org-link-set-parameters to define your own link types as demonstrated in the following Elisp snippet. The snippet contains a function my-org-open-file which opens the file given as org ...
user avatar
  • 29.8k
2 votes
Accepted

browse-url-at-point opens link text

It appears that the function to call to browse a link in an org-mode file is org-open-at-point which is bound to C-c C-o. Edit: Regarding the follow-up question about opening an org-mode link in a ...
user avatar
  • 1,163

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