From Noboru Ota to ~protesilaos/denote
Hi Prot, Please find attached the patch I promised. I tested the cases: 1. Multiple files exist for a single ID (html and Org) 2. [[denote:ID]] refers to a non-Denote file (e.g. a jpeg) -- the original issue reported in #135 – nobiot
From Noboru Ota to ~protesilaos/denote
> The discussion on getting Denote stored in the Org Roam database > is a bit strange to me. Why not just use Org Roam? Peter, I share this sentiment, too. I guess, though, probably from a different angle from yours. My suggestion is also "Why not just use Org Roam?" for database and existing visualizing capability -- but of course, another avenue you have been exploring is a great addition: "Why not direcly use files created by Denote?". Denote can be configured to create and work within normal Org files with using Org-ID (instead of Denote-specific "denote:" link type in Org). Org-roam can then store these normal Org files with the ID. All of this is possible because they all have a good, composable
From Noboru Ota to ~protesilaos/denote
Elias Storms <elias.storms@gmail.com> writes: > The good news is that Org-roam UI can be modified to include the > `denote:` type links as Peter pointed out here: > https://github.com/org-roam/org-roam-ui/issues/272 > It's as easy as redefining a function. Ah, our messages passed each other. I see Peter has an easy workaround. Sure; that's a good one, too. You too have a good day. —nobiot
From Noboru Ota to ~protesilaos/denote
Elias Storms <elias.storms@gmail.com> writes: > Indeed, we'd need to look at the internals of Org-roam (but most of it > goes over my head). If I were to make Org-roam work with the 'denote:' type link, I'd override function 'org-roam-db-insert-link', so that the db could register 'denote:' as an 'id:' Semantically both are IDs, so this is logically consistent to me. I suspect that changing this initial part might just do it (informed by my experience of implementing Md-roam): (defun org-roam-db-insert-link (link)
From Noboru Ota to ~protesilaos/denote
Elias Storms <elias.storms@gmail.com> writes: > Org-roam does pick up the Denote IDs this way, but unfortunately the default > `[[denote:id][Title]]` type of links aren't registered, resulting in a > graph without links. I probably need to use `id:` type links for this to > work. > > So perhaps some middleware is needed? One that would copy the Denote > directory and modify each file so it has the property drawer and > replaces links. Not sure what's best here. No you do not need a middleware. My simple suggestion is to *not* use 'denote:id' links, and simply use
From Noboru Ota to ~protesilaos/denote
Noboru Ota <me@nobiot.com> writes: > If you are creating a new file via `denote`, you'd need to save the > buffer and run `org-roam-db-sync`. I have just tried it with `emacs -Q` > and it worked on my end. > [...omission...] > There should be a more elegant way to automate adding new files to the > db, but I do not know a good way at the moment. On my end, I use my own > `md-roam` to interface markdown files with `org-roam` and "it just > works" -- sorry, this is just a way to say "I just got off work and do > not have a mental capacity to remember / work out how I do this > exactly". Sorry, a quick correction:
From Noboru Ota to ~protesilaos/denote
Elias Storms <elias.storms@gmail.com> writes: > Nobiot, you mentioned using Org-roam on Denote notes: > >> All you need is to change the front matter configuration to use "id" >> instead of Denote's default "identifier". Org-id will take the id >> property. Denote's backlinks work without using "denote:" link type -- >> backlinks are searched with regexp for the id. > > Can you elaborate? The Org-roam database doesn't seem to pick up Denote > identifiers, even when they are indicated with `#+id:` in the > front-matter. Or do you mean to change the link type? EFLS, happy to. Instead of the keyword `#+id:`, you would need to use a
From nobiot to ~protesilaos/denote
Peter Prevos <peter@prevos.net> writes: > Ideally, I like some Emacs code that converts the Denote folder to a > JSON, like this: > > { "nodes": [ > { "id": "20230123T085900", "name": "Denote example" }, > { "id": "20230123T085930", "name": "A linked note" } > ], > "links": [ > { "source": "20230123T085900", "target": "20230123T085930"} > ], > "tags": [ > { "id": "20230123T085900", "tag": "denote" },
From nobiot to ~protesilaos/denote
Hi Peter Nice work! > 1. Build middleware so that Denote users can use the wonderful > org-roam-ui package (perhaps after Emacs 29 lands with database > support). Denote works with Org-roam without a middleware for org files. I don not mean to discourage you from developing a middleware with additional features you wish to add. I would just like to point out that you have a starting point that you can already play with. All you need is to change the front matter configuration to use "id" instead of Denote's default "identifier". Org-id will take the id
From Noboru to ~protesilaos/denote
By the way, this can wait until we finalize the next release; perhaps you need a bit more headspace to focus on updating the manual, etc… > On 11. Dec 2022, at 16:21, Noboru <me@nobiot.com> wrote: > > >> Very well! Before proceeding with this, maybe we can do something about >> the 'denote-link--link-at-point-string' and thus have a more general >> approach? > > Of course, we can take a look. I don’t seem to able to just get the identifier without the “denote:” string. Is there a good way with this function? >