nobiot / md-roam

Use Org-roam with markdown files by adding Md-roam as a plug-in. Mix org and markdown files in a single Org-roam database.
GNU General Public License v3.0
333 stars 15 forks source link

org-roam-node-insert with new note #66

Closed TomMago closed 2 years ago

TomMago commented 2 years ago

Hi,

when I use org-roam-node-insert and type a new name to create a new note, after closing the capture buffer with C-c C-c, md-roam inserts an org-roam like link [[id:...][new note]].

Any ideas to fix this to insert the md-like link without id ?

Greetings

nobiot commented 2 years ago

Hmm. This may be because you are using org-roam-node-insert within an Org file? Otherwise, I can't reproduce the issue you report. If I'm writing in a markdown file, I can just insert [[title]] with org-roam-node-insert.

TomMago commented 2 years ago

Hmm, no, I'm working in a md file. Note that the [[title]] works when inserting a reference to an existing note, the problem only occures when creating a new note using org-roam-node-insert.

nobiot commented 2 years ago

Oh I see, I didn't realize it was only when you create a new note. It looks like I don't support it yet -- I don't use org-roam-node-insert to create a new note. You'd need to override org-roam-capture--finalize-insert-link by the looks of it.

What you can do for now instead is to type [[title of a new note]]. When you follow the link (e.g. C-c C-o), you can create a new note.

I'll see if I can implement what you wish to do, but it won't be a quick one -- maybe on the weekend. I cannot make any commitment

TomMago commented 2 years ago

Thanks for the answer and your effort!

I think it would be cool to have.

I could try to implement it as well, if I find the time but I don't have much experience with lisp so I'll see :'D

nobiot commented 2 years ago

I believe it's fixed with the latest commit. Thanks. Feel free to reopen if it is not the case.