nobiot/md-roam

(help) Doom Emacs setup

vctrblck opened this issue · 12 comments

I have org-roam version 2 and org-roam-ui setup with Doom Emacs. How can I add md-roam to this setup?

@vctrblck This is the setup I use: #59 (comment)

@ehamberg Thank you 🙏
@vctrblck I suggest you try @ehamberg’s config. I don’t use Doom so I can’t really help you in detail.

I appreciate the assistance!

I have given it a try (included @ehamberg's config). I evaluate org-roam-node-find. I input the node title. Hit enter. I then get the message 'peculiar error' in the echo area . Any idea what the cause may be?

No idea. I have never seen it in the context of Md-roam. You’d need to give us more detail.

  1. Does Org-roam work without Md-roam?
  2. How do you configure Org-roam (+roam2 flag or manual config in Doom)?
  3. Do you get an error stack (toggle-debug-on-error and then do the same operation)?

Thanks for the togge-debug-on-error. The issue wasn't md-roam related.

Last thing, is the org properties drawer supposed to be visible/present in the markdown version of the org-roam node or is it only supposed to be the YAML front matter? If so, any recommendations as to how I can remove it?

I don’t understand what you mean. Could you explain, please?

In my understanding:

Each org-roam node is a .org file which has a "PROPERTIES" section at the top of the file. When I use md-roam, each org-roam node is a .md file that has a YAML front matter section at the top of the file (meaning the "PROPERTIES" section is excluded), am I correct? On my side, the org-roam node is a .md file - due to the md-roam configuration - but it has both the "PROPERTIES" section and the YAML front matter section. Is this the intended behaviour?

but it has both the "PROPERTIES" section and the YAML front matter section. Is this the intended behaviour?

I am guessing that you are talking about the result of org-roam-node-find or org-roam-capture to create a new node. Correct?
The property drawer with the ID property is added by Org-roam, so it's not an intended behaviour of Md-roam but it's expected.

There are many ways to create a markdown file, so one option to avoid this is to not use these Org-roam commands.
Org-roam has been refining how this part of the capture process works; I have yet to figure out the best way to stop it from adding the ID when the captured buffer is for Md-roam.

One way is to do something like this below. It works on my end.

(add-hook 'org-roam-capture-new-node-hook #'my/md-roam-remove-id-prop)

(defun my/md-roam-remove-id-prop ()
  (when (string-suffix-p ".md" (buffer-name))
    (org-delete-property "ID")))

I understand now. I'll have to do some tinkering on my end.

I appreciate the assistance!

@vctrblck You can also try the latest commit that I addressed the issue for myself. I'm hoping that it'll work for Doom, too.

Will do 👌🏿