# Org-roam major redesign

**URL:** <https://org-roam.discourse.group/t/org-roam-major-redesign/1198>\
**Category:** Development\
**Created:** [January 23, 2021, 1:17pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198 "2021-01-23T13:17:57Z")\
**Posts on this page:** 20\
**Page:** 12

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [May 3, 2021, 4:36pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/228 "2021-05-03T16:36:44Z")

</div>

Have a look at this code in [my Gist](https://gist.github.com/nobiot/07dd6de47272e09bb4bf80bd165ec44c). I still use it and works so far (V2 is dynamically changing so no guarantee it continues to).

I only extract the first sub-directory with `car` but you should be able to adjust what `my/org-roam-get-subdirectory` returns and how the returned value gets formatted in the calling function.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [May 3, 2021, 7:56pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/229 "2021-05-03T19:56:20Z")

</div>

I have made a spin-off topic, affecting mainly Windows users; all welcome to share expertise and experience. Thank you.

> [@V2 - Do we want Org-roam project to host an executable file?](https://org-roam.discourse.group/t/v2-do-we-want-org-roam-project-to-host-an-executable-file/1549):
>
> I was having a little chat with @jethro and I wanted to open this up to the folks in the Org-roam user community. I would like to ask you to share your expertise and thoughts. The topic affects Windows users in particular, but I think it would be great if macOS and Linux users among you chip in and share your knowledge. Commit [f8dd345](https://github.com/org-roam/org-roam/commit/f8dd345bd19bc7f79c40bec203cabd303938cb3a) for V2 reintroduces emacsql-sqlite for Emacs to work with the SQLite database. For Windows users, this means that your PC will need to be able to compile a piec…

---

<div class="post-metadata">

**Author:** ![public\_image\_limited](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@public\_image\_limited](https://org-roam.discourse.group/u/public_image_limited)\
**Post date:** [May 10, 2021, 11:45am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/230 "2021-05-10T11:45:14Z")

</div>

I have seen that v2 uses completion categories, which are also supported by packages like `marginalia` or `embark`. I would like to extend the usage of categorized nodes.

I am imagining that the user finds some nodes via completion, takes a snapshot with `embark`, and then there is a buffer available where one can work with. Actually this already works, but the only action available right now is to visit the node. I would like to act further actions like “add tag”, “remove tag”, “find backlinks”, etc.

To begin with that work, I would have to refactor the tagging functions in `org-roam.el`, which currently presume a purely interactive use. I would change that so that tagging can be done on any org roam file, in a non-interactive way, so that we could finally tag using the embark interface. I think this is a great alternative to interfaces like `delve`, since the completion ui is the ultimate entry point which everybody uses.

I could simply do a PR, but I first wanted to know

(a) if there already any plans to make use of the completion categories, so that I can rely on them being present,

(b) if there are any reasons speaking against refactoring the current tagging system,

(c) if there is any interest in adding support for using embark actions more extensively.

---

<div class="post-metadata">

**Author:** ![bruce](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@bruce](https://org-roam.discourse.group/u/bruce)\
**Post date:** [May 10, 2021, 6:52pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/231 "2021-05-10T18:52:52Z")

</div>

> [@public\_image\_limited](#):
>
> if there is any interest in adding support for using embark actions more extensively.

I don’t know the internal details, but am def interested in this in general.

I’m bdarcus on github 😉

Just so everybody knows, embark allows you to bind a set of commands, via any keymap, to completing-read candidates. The completion category is the mechanism for contextualizing the commands.

In effect, it provides something analogous to a contextual menu.

So really the questions are what commands might make sense, and how should they work?

---

<div class="post-metadata">

**Author:** ![public\_image\_limited](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@public\_image\_limited](https://org-roam.discourse.group/u/public_image_limited)\
**Post date:** [May 10, 2021, 8:17pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/232 "2021-05-10T20:17:32Z")

</div>

Hello again! 😉

I was mainly thinking of doing “bulk” edits, like in org agenda mode, in particular adding or removing tags. Depending on how embark refresh works, that could even be done with the current setup, since each completion candidate can be displayed with a tag. So I thought one could create a snapshot of all items matching #tag1, replace them with #tags2, refresh, etc, like working in occur or the like.

IMHO, changing the tagging mechanism to something more abstract and non-interactive is generally a good idea. That would allow for all kind of extensions which e.g. tag lists of files generated in what way ever. Refactoring this would the first and as it seems pretty easy step, but I would like to have the OK from the maintainers that they think this kind of extensibility and this kind of use is something they would support.

So here’s a spontaneous list of per item actions:

- Add or remove tags
- Delete the node
- Copy the complete node content incl. heading to the kill ring for further use
- Open another buffer with all backlinks or forward links
- Export the links or their content to an org mode buffer
- Create a transclusion buffer from the list (woah, that sounds crazy cool)

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [May 10, 2021, 9:49pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/233 "2021-05-10T21:49:23Z")

</div>

> [@public\_image\_limited](#):
>
> Create a transclusion buffer from the list (woah, that sounds crazy cool)

If you can get me a buffer containing a list of links from Org-roam completion, it should be rather trivial to give you a list of transclusions with Org transclusion. Not sure if this is what you are going for.

```
;; A buffer 

[[id:uuid-1]]

[[id:uuid-2]]
 ...
[[id:uuid-n]]

```

Skipping a little detail of how the new version of a org-transclusion, essentially each ID link can become a copy of the headline and/or file content to which the link points.

---

<div class="post-metadata">

**Author:** ![public\_image\_limited](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@public\_image\_limited](https://org-roam.discourse.group/u/public_image_limited)\
**Post date:** [May 11, 2021, 5:47am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/234 "2021-05-11T05:47:58Z")

</div>

That’s cool! And that’s the idea behind my proposal: Embark gives us the ability to transfer all completion candidates in an extra list to do something with them. And if we have the candidates, we have their ID. And then we can do all kind of things with this list, like editing them in a row, or transferring them to a transclusion buffer. And who knows, maybe there will be once something similar to `org-ql` for querying org roam nodes, and such a system seems to me perfect.

---

<div class="post-metadata">

**Author:** ![FilTower](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@FilTower](https://org-roam.discourse.group/u/FilTower)\
**Post date:** [May 14, 2021, 6:21pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/235 "2021-05-14T18:21:37Z")

</div>

Hi everyone. I’ve managed to get Org-roam v2 installed and I use it regularly now.

Now that org-roam links are based on IDs, I’ve found that Latex export fails with an org file that includes those types of links. The org dispatcher tells me it’s unable to resolve the ID link.

In doing the org-\>Latex-\>pdf export, I’m not really interested in keeping active org-roam links but, maybe, only their descriptions.

Does anybody know a way to get round this issue?

---

<div class="post-metadata">

**Author:** ![public\_image\_limited](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@public\_image\_limited](https://org-roam.discourse.group/u/public_image_limited)\
**Post date:** [May 14, 2021, 6:55pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/236 "2021-05-14T18:55:09Z")

</div>

Use `org-export-with-broken-links`. You can set it in elisp or as an option in the document header.

Documentation  
Non-nil means do not raise an error on broken links.

When this variable is non-nil, broken links are ignored, without  
stopping the export process. If it is set to mark, broken  
links are marked as such in the output, with a string like

[BROKEN LINK: path]

where PATH is the un-resolvable reference.

This option can also be set with the OPTIONS keyword, e.g.,  
“broken-links:mark”.

This variable was added, or its default value changed, in Org version  
9.0.

---

<div class="post-metadata">

**Author:** ![FilTower](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@FilTower](https://org-roam.discourse.group/u/FilTower)\
**Post date:** [May 14, 2021, 8:30pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/237 "2021-05-14T20:30:45Z")

</div>

Perfect. Thanks a lot for the advice!

---

<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:** [May 15, 2021, 11:14am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/238 "2021-05-15T11:14:45Z")

</div>

If you want them to resolve, add your Org-roam files to your `org-id-extra-files`:

```lisp
(setq org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$"))

```

for example.

---

<div class="post-metadata">

**Author:** ![FilTower](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@FilTower](https://org-roam.discourse.group/u/FilTower)\
**Post date:** [May 15, 2021, 4:23pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/239 "2021-05-15T16:23:31Z")

</div>

Hi @jethro, thanks for your suggestion. Yes, that’s what I needed. However, there’s a couple of issues:

1. Using that snippet gives me a void function error. Should I put a `'` in front of the second parenthesis? (sorry, I’m still relatively new to elisp);
2. The amended snippet gives me the desired result with Latex export if the node was created with the default Org-roam template but for some reason it does not with my custom template.

Please find attached my Org-roam configuration where you can view my custom templates. Basically, I personalised the ID assignment and the filename of the note, the two are not the same. But that shouldn’t be a problem since the same happens with the default template. What am I missing?

 ![Screenshot from 2021-05-15 17-16-52](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/a9c0043151d85351bc87de89913ff368f98ffafd.png)

---

<div class="post-metadata">

**Author:** ![FilTower](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@FilTower](https://org-roam.discourse.group/u/FilTower)\
**Post date:** [May 15, 2021, 5:34pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/240 "2021-05-15T17:34:54Z")

</div>

Okay, after experimenting a bit I found a solution. I had to update the ID locations file and DB, and I used the function provided in the Hitchhiker’s Rough Guide.

```
(defun my/org-id-update-org-roam-files ()
      "Update Org-ID locations for all Org-roam files."
      (interactive)
      (org-id-update-id-locations (org-roam--list-all-files)))
```

---

<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:** [October 21, 2021, 10:01am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/241 "2021-10-21T10:01:39Z")

</div>

Seems like `org-roam--list-all-files` no longer exists. The following works for me:

```auto
  (defun rodelrod/resolve-id-links-for-export ()
    "Add Org Roam files to org-id locations so that export works."
    (interactive)
    (org-id-update-id-locations (org-roam-list-files)))

```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 21, 2021, 10:34am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/242 "2021-10-21T10:34:52Z")

</div>

@rodelrod , there is also a new command: `org-roam-update-org-id-locations`. It does `org-id-update-id-locations` inside for you.

---

<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:** [October 21, 2021, 10:38am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/243 "2021-10-21T10:38:10Z")

</div>

@nobiot ah great, I’ll use that one instead, thanks.

---

<div class="post-metadata">

**Author:** ![wuqui](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wuqui](https://org-roam.discourse.group/u/wuqui)\
**Post date:** [October 26, 2021, 11:08am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/244 "2021-10-26T11:08:27Z")

</div>

> [@d12frosted](#):
>
> `db-query`

I’m really, really interested in being able to query my org-roam DB like with `org-ql` or `logseq`. I came across your package `vulpea`, but I didn’t find any documentation on how to query the database, ideally beginner-friendly?

For example, I would like to do queries that return a list of all nodes that link to nodes A **and** B.

Edit: I’ve realised it probably makes more sense to post this as a GitHub issue. Hope this makes sense.

---

<div class="post-metadata">

**Author:** ![d12frosted](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/d12frosted/32/278_2.png) [@d12frosted](https://org-roam.discourse.group/u/d12frosted)\
**Post date:** [October 26, 2021, 3:22pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/245 "2021-10-26T15:22:47Z")

</div>

It’s possible. I will try to answer you tomorrow in issue that you created in vulpea 🙂

---

<div class="post-metadata">

**Author:** ![wuqui](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wuqui](https://org-roam.discourse.group/u/wuqui)\
**Post date:** [October 26, 2021, 9:44pm UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/246 "2021-10-26T21:44:44Z")

</div>

Cool, thanks!

---

<div class="post-metadata">

**Author:** ![d12frosted](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/d12frosted/32/278_2.png) [@d12frosted](https://org-roam.discourse.group/u/d12frosted)\
**Post date:** [October 27, 2021, 5:31am UTC](https://org-roam.discourse.group/t/org-roam-major-redesign/1198/247 "2021-10-27T05:31:42Z")

</div>

See it here : [Query all nodes that contain links to nodes A \_\_and\_\_ B · Issue #105 · d12frosted/vulpea · GitHub](https://github.com/d12frosted/vulpea/issues/105#issuecomment-952551864)

[Previous page](https://org-roam.discourse.group/t/org-roam-major-redesign/1198.md?page=11)
