(v2) two minor problems: unfold content when following backlink, org-roam-link color

First of all, I want to sincerely thank everybody who’s involved in developing org-roam. It’s been a life-saver in my modest research projects. I don’t use pure Zettelkasten and rarely produce evergreen notes, but it’s good enough for me to take literature notes and not get lost in countless papers.

There are just two minor annoyances that I don’t know how to fix with my superficial emacs/org-mode knowledge.

Can org-roam-buffer unfold content while visiting a backlink?

I prefer my org files to be folded on startup. Some of my files are pretty long, so I don’t want to be exposed to a wall of text from the get-go.

So, when I follow a backlink from the org-roam-buffer, it just leads me to the correct heading, not the paragraph. Pressing <TAB> does nothing because the cursor is placed inside the paragraph. To see the actual paragraph, I need to press <S-TAB> three times.

The GIF below shows current behavior:


Obviously, I’d like to have it unfold the said heading and show the paragraph I need. The preferred behavior works when you specify org’s initial visibility to #+startup: showall. See below:


Is it possible to automatically unfold content without changing the visibility option?

Can one change an org-roam-link color?

In v1, there was an option to change org-roam-link face. Why? To distinguish them from links to outer sources like websites and other files.

No such option is available in v2. Is there a workaround?

I’m very sorry if these are very nit-picky… and thanks in advance.

1 Like

You might be interested by the org-reveal command. Just call it after the jump. (Given that this is Emacs, there might be a way to call it automatically after visiting a link, but I haven’t looked into that, I use #+startup: showall in my org-roam buffers.)

You can style org-id-link. If you use org-id heavily outside org-roam, you might not like it, but if, like me, you use org-id only in org-roam, you might find that it does the trick.

With something like:

(with-eval-after-load 'ol
  (org-link-set-parameters "id" :face 'my-org-id-link))

Or, if you use use-package:

(use-package ol
  :ensure nil
  :defer t
  (org-link-set-parameters "id" :face 'my-org-id-link))

And style it however you want. I have the following:

(defface my-org-id-link '((t :inherit org-link :slant italic))
  "Face for org-id links."
  :group 'org-faces)

Hope this helps!

[Edit 2021-08-10: better use-package snippet]


This is outstanding! It was so lovely to restore the color I’m used to. As for org-reveal, it does do the job. I’ll try to figure out how to automate it.

Thanks a lot.

1 Like