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

Question: Could you provide a basic tutorial on how to create an .md note and link to it? #49

Closed Solcany closed 2 years ago

Solcany commented 3 years ago

I installed this plugin on Doom Emacs as instructed and reloaded it.

When i use 'Org Roam Capture' command(space+n+r+c) an .org file is created instead of .md file. When I try to create an .md note manually it doesn't get registered by org roam(space+n+r+r). I can't link to it using 'Org Roam insert'(space+n+r+i) from other .md notes because i can't see the newly crated one after using the command.

my config.el:

(use-package! md-roam 
  :config
  (setq md-roam-file-extension-single "md")
  (setq org-roam-title-sources '((mdtitle title mdheadline headline) (mdalias alias))))

my package.el:

(package! md-roam
  :recipe (:host gitlab
           :repo "nobiot/md-roam"))
nobiot commented 3 years ago

Do you have this too?

(setq org-roam-file-extensions '("org" "md"))

If you need to create an md file with org-roam-insert, try to put "md" as the first one in the list (instead of "org" as in this example).

The issue of "registering"... Not sure what is exactly happening but I suspect two things:

Solcany commented 3 years ago

thank you for your help, I was able to create an .md note as after setting the file extension with insert command.

However the newly created note wouldn't still get registered in my db, since i still don't see it in org roam buffer (space+n+r+r). I do see "Md-roam active" when i start org roam.

nobiot commented 3 years ago

@Solcany

[EDIT] Sorry, I misread what you said. OK, so you see "md-roam active".

You also need to make sure you save the file. It's the same as org files for org-roam. By default, you need to wait for 2 seconds for Org-roam to "register" the file to the database.

You might need to give me a step-by-step of how you create, link and save your markdown files; and also maybe sample files.

I used to use Doom, and used to work back then. I no longer use it, so cannot really test a Doom environment.

nobiot commented 3 years ago

Depending on how you write the links in your markdown files, you might need to adjust these variables:

  (setq md-roam-use-org-file-links nil)
  (setq md-roam-use-markdown-file-links t)

If you want to use the standard Markdown link syntax, the second one needs to be turned on (default nil) -- this was because these are newly added variables, and wanted to keep old behaviours consistent. Maybe a time for review, if this is the problem you have experienced.

Let me know...

nobiot commented 2 years ago

With V2 and its README, I'm hoping the basic operation is clearer. Closing this issue.