Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org-roam functionality from within orgmode.nvim #66

Closed
megalithic opened this issue Aug 14, 2021 · 21 comments
Closed

Org-roam functionality from within orgmode.nvim #66

megalithic opened this issue Aug 14, 2021 · 21 comments
Labels
core-feature Feature is in orgmode core plugin Needs to be implemented via external plugin

Comments

@megalithic
Copy link

Does this feature exist in Emacs orgmode core?

No

Orgmode link

So, first off, thank you @kristijanhusak for this wonderful plugin! I'm slowly getting into org-mode things, coming from zettelkasten using (https://github.com/mickael-menu/zk and https://github.com/megalithic/zk.nvim).

This isn't necessarily a "feature request" per-say but more of a survey of org-roam usage with orgmode.nvim. I've been looking at now I might be able to port all of my notes from zk land, or more specifically how note linking and related functionality might work here in orgmode.nvim.

Is this something you've ever had interest in? Do you normally just use long-form/long-lived org files? I'd love to hear from other users of this plug-in too.

Feature value

Parity with org-roam, within orgmode.nvim.

Additional context

No response

@megalithic megalithic added the core-feature Feature is in orgmode core label Aug 14, 2021
@megalithic megalithic changed the title Mostly just surveying for interest in "org-roam" functionality to supplement this wonderful plugin Org-roam functionality from within orgmode.nvim Aug 14, 2021
@kristijanhusak
Copy link
Member

I never used Roam or org-roam before. Can you give me brief explanation what are the key features of it?

@ourigen
Copy link
Contributor

ourigen commented Aug 18, 2021

Would also love to see some features from org-roam implemented. One of the key things is the ability to create linked notes on demand and be able to view the network of linked files.

Say I have a file shopping.org with contents:

#+TITLE: Shopping List

* Here's what I need to buy:
- Eggs
- Milk
- Bread

org-roam lets me create a second org file with metadata in the header to link back to shopping.org. Say I want to make a note about eggs. I can hit a keybind with my cursor on Eggs and a capture template opens with a prepopulated :PROPERTIES: drawer

:PROPERTIES:
ID: <unique-id>
:END:
#+TITLE: Eggs

%?

shopping.org is then linked to this file using a unique ID

#+TITLE: Shopping list

* Shopping list:
- [[id:<unique-id-to-eggs>][Eggs]]
- Milk
- Bread

When I'm in the linked notes about eggs, I can also access a menu to view backlinks

Eggs     <- current note
Backlinks (1)
Shopping List (top)     <- list of linked files, their hierarchy in the note tree, and their content

* Here's what I need to buy:
- Eggs
- Milk
- Bread

@kristijanhusak
Copy link
Member

Since org-roam is a plugin itself for Emacs Orgmode, same thing applies for this. I don't want to support anything in the core, that's a separate plugin in Emacs orgmode. I don't plan to built any support for this since I'm both not familiar with all the functionality, and I don't plan to use it. I'm open for suggestions on #26 for improvements on plugin infrastructure that would help someone else build the plugin.

@kristijanhusak kristijanhusak added the plugin Needs to be implemented via external plugin label Aug 30, 2021
@krillin666
Copy link

Just a bump to let you know that many people who are used to vim/nvim would be happy with this integration which would also let people who for example use Logseq be able to use their favourite editor (nvim) !

@krishnakumarg1984
Copy link

Another bump up. org-roam is a fantastic quality of life improvement to core org-mode. Would love orgmode.nvim to support this (either in core, or in plugins).

@rafamadriz
Copy link

I've been looking at now I might be able to port all of my notes from zk land, or more specifically how note linking and related functionality might work here in orgmode.nvim.

Hey, @megalithic I know this is not related to the issue, but I gotta ask if you managed to port all your notes from zk ? I've been using zk happily for a while and it's great. But I've been looking into using orgmode for notes. The problem is that now all my notes are managed with zk, with all the metadata like notes ID's and tags.

So I'd like to ask if you ported your notes from zk and if so, how did you do it ?

@kristijanhusak
Copy link
Member

Does anyone have experience with org-roam? I would like to have a breakdown of the things that would be needed for someone to build this. I'm planning to start creating an API that would be callable by the plugins, and it would be helpful to know what would be useful for this.

@megalithic
Copy link
Author

I've been looking at now I might be able to port all of my notes from zk land, or more specifically how note linking and related functionality might work here in orgmode.nvim.

Hey, @megalithic I know this is not related to the issue, but I gotta ask if you managed to port all your notes from zk ? I've been using zk happily for a while and it's great. But I've been looking into using orgmode for notes. The problem is that now all my notes are managed with zk, with all the metadata like notes ID's and tags.

So I'd like to ask if you ported your notes from zk and if so, how did you do it ?

Man, to be honest, I've only used zk type things; I've wanted to give orgmode a try and more specifically org-roam to potentially take the place of zk-specific things. I have only read about org-roam and watched some vids by "System Crafters" on youtube about it.

@rotlaus
Copy link

rotlaus commented Jan 6, 2022

I have a general question to all of this. org-roam uses the org-id library which is part of the org-mode distribution, but it is a module which has to be enabled. Another module which i use is org-habit, also a module which has to be enabled.
Will those modules be part of nvim-orgmode aor are they counted as plugins too?

@kristijanhusak
Copy link
Member

If they are part of the core in emacs orgmode, they can be in core here. So no, those are not counted as plugins.

@cvanelteren
Copy link

Does anyone have experience with org-roam? I would like to have a breakdown of the things that would be needed for someone to build this. I'm planning to start creating an API that would be callable by the plugins, and it would be helpful to know what would be useful for this.

The roam philosophy in general contains atomized building blocks (pieces of text / code) that can be bound together in a graph. It is similar to how wikipedia works; an article may have many (back)links to other articles in the site, together form a knowledge graph. For roam to become a part of this project, I would reckon that it is essential to have a labeling/id system. The org roam mode itself in emacs has features such as

  • org-roam-node-insert
  • org-roam-node-find
  • org-roam-capture

There are additional graph generating functions that can be called, but the "core" is rather small I believe.

@gagbo
Copy link

gagbo commented Feb 10, 2023

Does anyone have experience with org-roam? I would like to have a breakdown of the things that would be needed for someone to build this. I'm planning to start creating an API that would be callable by the plugins, and it would be helpful to know what would be useful for this.

From what I see with a quick glance, the main thing nvim-orgmode lacks (especially if you want compatibility with other org-roam files) is a "custom protocol" handling for links. Is it possible to have a link like [[roam:79e95553-0a5b-4cf4-b2ad-67c418577045][This is a link to another note in my realm]] ?

All the rest is (a lot of) work left for plugin implementers: very pragmatically, org-roam is just a big cache of (id, file path, heading) entries inside a sql database:

  • org-roam-node-insert queries the db for all the headings, passes them to Emacs/vim so the user chooses one, and it inserts a link with the same pattern as above.
  • we need the ability to provide custom link handlers in nvim-orgmode, so that when following a roam: link, eventually the plugin gets called, to query the db for the file path/location of the heading matching the id, returning to nvim to open the relevant buffer
  • Adding and removing properties to files and heading is necessary as well, so that a function can be created to add the id property accordingly

Otherwise, org-roam is mostly about updating the db whenever relevant (a file gets saved, or you just added a link or something), and then wrapping db queries in an API so the requests are easier to make.

If you're curious, the db schema looks like that right now, it holds more data than just id/file path, but that's the idea.

tl;dr: as long as it's possible to add/remove properties to file/headings, and to plug a custom link handler, I think replicating org-roam would be possible (long, but possible).

@SyedFasiuddin
Copy link

I'm trying to clone org-roam for neovim, an ideal goal would be to have one to one feature parity with org-roam.

But in beginning I'm only considering: adding nodes through org-roam-capture and find a node using org-roam-node-find, the part of finding a node is easy and simple but the "capture part" is where things fall apart.

When org-roam creates a new file node it uses org-entry-properties org-heading-components org-get-outline-path etc which return elisp lists and org roam stores those lists directly in its database.

I think these functions should be provided by this plugin. But returning elisp lists ?? ehhh

@gallo-s-chingon
Copy link

Would also love to see some features from org-roam implemented. One of the key things is the ability to create linked notes on demand and be able to view the network of linked files.

Say I have a file shopping.org with contents:

#+TITLE: Shopping List

* Here's what I need to buy:
- Eggs
- Milk
- Bread

org-roam lets me create a second org file with metadata in the header to link back to shopping.org. Say I want to make a note about eggs. I can hit a keybind with my cursor on Eggs and a capture template opens with a prepopulated :PROPERTIES: drawer

:PROPERTIES:
ID: <unique-id>
:END:
#+TITLE: Eggs

%?

shopping.org is then linked to this file using a unique ID

#+TITLE: Shopping list

* Shopping list:
- [[id:<unique-id-to-eggs>][Eggs]]
- Milk
- Bread

When I'm in the linked notes about eggs, I can also access a menu to view backlinks

Eggs     <- current note
Backlinks (1)
Shopping List (top)     <- list of linked files, their hierarchy in the note tree, and their content

* Here's what I need to buy:
- Eggs
- Milk
- Bread

check out https://github.com/nvim-neorg/neorg it has built in support for links, though not unique ids. personally I only write prose. I'd tried org-roam and doom emacs. but I had issues when working from different machines, (Intel Mac, Apple Silicon Macs, linux laptops) with neorg, I have to manually enter the note name, esc into normal mode, press enter while cursor is over the link name and it generates a new note. though there isn't a link, using your example, in eggs.org to go back to shopping.org.

but again I'm a prose writer and have a hard enough time getting plugins to work. let alone figure out capture templates etc.

on the plus side, I read somewhere that org and neorg are going to be natively supported in Neovim 0.10

@CaryWill
Copy link

I'm trying to clone org-roam for neovim, an ideal goal would be to have one to one feature parity with org-roam.

But in beginning I'm only considering: adding nodes through org-roam-capture and find a node using org-roam-node-find, the part of finding a node is easy and simple but the "capture part" is where things fall apart.

When org-roam creates a new file node it uses org-entry-properties org-heading-components org-get-outline-path etc which return elisp lists and org roam stores those lists directly in its database.

I think these functions should be provided by this plugin. But returning elisp lists ?? ehhh

I forked your repo, and also does some modify on org-roam-ui, the basic need can be met for myself : p

https://github.com/CaryWill/org-roam-ui.nvim
https://github.com/CaryWill/org-roam.nvim

@chipsenkbeil
Copy link
Contributor

@kristijanhusak we can close this now that #702 is just about finished, right?

@kristijanhusak
Copy link
Member

@chipsenkbeil is the plugin ready? Let me know and we'll close this with the link to your repo.

@chipsenkbeil
Copy link
Contributor

@chipsenkbeil is the plugin ready? Let me know and we'll close this with the link to your repo.

I believe it's ready 😄 Just updated the README and DOCS to reflect that the tag 0.1.0 of org-roam.nvim is compatible with nvim-orgmode tag 0.3.4.

@megalithic
Copy link
Author

Time for a screencast of the plug-in usage! 😁💯

@chipsenkbeil
Copy link
Contributor

Time for a screencast of the plug-in usage! 😁💯

Should eventually show up at https://youtu.be/02lE-yGJWvc

@kristijanhusak
Copy link
Member

Awesome work @chipsenkbeil ! Looks great!
Added the link to the Plugins section in readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-feature Feature is in orgmode core plugin Needs to be implemented via external plugin
Projects
None yet
Development

No branches or pull requests