# Custom Roam-style link

**URL:** <https://org-roam.discourse.group/t/custom-roam-style-link/39>\
**Category:** Development\
**Created:** [May 4, 2020, 8:50am UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39 "2020-05-04T08:50:21Z")\
**Posts on this page:** 14\
**Page:** 4

<div class="post-metadata">

**Author:** ![rodelrod](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/rodelrod/32/184_2.png) [@rodelrod](https://org-roam.discourse.group/u/rodelrod)\
**Post date:** [August 11, 2020, 4:54pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/61 "2020-08-11T16:54:25Z")

</div>

`[[link]]::tag::`

Is this a new type of tag? If it gets pulled into org-roam’s core, could we give it a different name? Things are getting confusing (see [How to use ROAM\_TAGS and/or tags?](https://org-roam.discourse.group/t/how-to-use-roam-tags-and-or-tags/190/23)).

---

<div class="post-metadata">

**Author:** ![alan](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alan](https://org-roam.discourse.group/u/alan)\
**Post date:** [August 11, 2020, 5:24pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/62 "2020-08-11T17:24:56Z")

</div>

Yes, the proposed feature is a “link-tag” that annotates specific links with any kind of formal contextual information that a person might want to add. See my post here if you want a lengthy breakdown of their purpose [Add Link-tags feature](https://org-roam.discourse.group/t/add-link-tags-feature/171) . Basically instead of adding a tag that applies to the entire note, you can just tag a specific link.

I’ve been using the term link-tag just to be semantically plain, but I have no preference. “Relations” was a suggested alternative that is truer to what they actually are. I just haven’t adopted ‘relations’ since it is a vague term if you are not clear on the feature context.

---

<div class="post-metadata">

**Author:** ![scotto](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@scotto](https://org-roam.discourse.group/u/scotto)\
**Post date:** [August 15, 2020, 4:54pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/63 "2020-08-15T16:54:48Z")

</div>

@zaeph, thanks for the explanation. Is there a new binding or something for standard org-mode internal links? I’m asking because the most common link I create is an internal link pointing to a dedicated target.

---

<div class="post-metadata">

**Author:** ![zaeph](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zaeph/32/764_2.png) [@zaeph](https://org-roam.discourse.group/u/zaeph)\
**Post date:** [August 15, 2020, 7:35pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/64 "2020-08-15T19:35:14Z")

</div>

Internal links can be achieved by using the `[[*…]]` format, which will create an ID for the targeted headline in the current-file.

---

<div class="post-metadata">

**Author:** ![scotto](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@scotto](https://org-roam.discourse.group/u/scotto)\
**Post date:** [August 18, 2020, 4:19pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/65 "2020-08-18T16:19:21Z")

</div>

@zaeph, what’s the method for linking – not to a headline – but to a dedicated target? My existing org files have hundreds of those. Are links to dedicated targets possible in org-roam?

---

<div class="post-metadata">

**Author:** ![zaeph](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zaeph/32/764_2.png) [@zaeph](https://org-roam.discourse.group/u/zaeph)\
**Post date:** [August 18, 2020, 6:56pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/66 "2020-08-18T18:56:19Z")

</div>

We haven’t looked at radio targets yet. We’d need to come up with a solution to include them in our UX model. Could you file an issue on the tracker for it?

---

<div class="post-metadata">

**Author:** ![scotto](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@scotto](https://org-roam.discourse.group/u/scotto)\
**Post date:** [August 19, 2020, 7:30pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/67 "2020-08-19T19:30:24Z")

</div>

@zaeph, just to be clear, I’m not talking about radio targets but about [dedicated targets](https://orgmode.org/manual/Internal-Links.html), the ones that are surrounded by `<<>>`

---

<div class="post-metadata">

**Author:** ![Gallimatias](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@Gallimatias](https://org-roam.discourse.group/u/Gallimatias)\
**Post date:** [September 9, 2020, 9:03pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/69 "2020-09-09T21:03:12Z")

</div>

I love this feature, but the incremental search feels clunky and old fashioned. Why don’t we use FZF and ripgrep to find any fuzzy matching line within our files?

Let’s say I’m looking for a recipe that I want to link to. I just type [[…]] and continue to write “recipe classic lasagna” and I get a list of suggestions that fit the criteria. The results show a ranking of the closest matching title, header and/or line which I can choose from to make a link. If there are no matches I may create a new link with the same query. No need to think of search entry points, search order, or capitalization, just type what’s on your mind.

Here is a illustrative example of what I’m thinking of (the example uses vim, but bear with me):

 ![](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/915e810c3b86585072a6c6939d8ef5face7334e0.gif)

---

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [September 10, 2020, 5:07am UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/70 "2020-09-10T05:07:46Z")

</div>

You can have a very similar interface as in the GIF, for example with Ivy by tweaking `counsel-rg` (or `counsel-ag`) and changing the `:action` clause of `ivy-read` to calling org-roam-capture on the file: [https://github.com/abo-abo/swiper/blob/9bb68419f1088ee4d8f2b76f84995fa02bceeed3/counsel.el#L3026](https://github.com/abo-abo/swiper/blob/9bb68419f1088ee4d8f2b76f84995fa02bceeed3/counsel.el#L3026)

Bear in mind that linking notes together is intentionally a conscious effort in the Zettelkasten method. Reducing friction is not the goal here.

---

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [September 15, 2020, 6:59am UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/71 "2020-09-15T06:59:59Z")

</div>

It seems that overriding Org’s default fuzzy-link behaviour has brought some surprise to active users of fuzzy links. In addition, it seems that even the [[\*Headline]] style links are actual functional internal links (as seen in the Org 9.4 changelog example at [https://orgmode.org/Changes.html](https://orgmode.org/Changes.html)).

Because of this, I’ve been thinking about moving to a different bracket syntax (like `{{Title*Headline}}`). Any strong objections here?

EDIT: or actually going back to @alan’s original proposal of [[roam:…]]

---

<div class="post-metadata">

**Author:** ![timquelch](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@timquelch](https://org-roam.discourse.group/u/timquelch)\
**Post date:** [September 15, 2020, 8:23am UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/72 "2020-09-15T08:23:56Z")

</div>

I think [[roam:…]] links using org’s link infrastructure would be preferable to a completely new link syntax

---

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [September 15, 2020, 11:52am UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/73 "2020-09-15T11:52:18Z")

</div>

yup, (see [https://github.com/org-roam/org-roam/pull/1105](https://github.com/org-roam/org-roam/pull/1105))

---

<div class="post-metadata">

**Author:** ![J0ns4](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@J0ns4](https://org-roam.discourse.group/u/J0ns4)\
**Post date:** [February 2, 2021, 3:11pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/74 "2021-02-02T15:11:36Z")

</div>

This looks amazing! Has any of this been implemented/do you have a patch you can share? I’d love to try it out.

---

<div class="post-metadata">

**Author:** ![tbd](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@tbd](https://org-roam.discourse.group/u/tbd)\
**Post date:** [April 19, 2021, 6:34pm UTC](https://org-roam.discourse.group/t/custom-roam-style-link/39/75 "2021-04-19T18:34:43Z")

</div>

Is this an existing feature of roam and ready for immediate consumption (and how?) or is this a future feature?

[Previous page](https://org-roam.discourse.group/t/custom-roam-style-link/39.md?page=3)
