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
331 stars 14 forks source link

md-roam-follow-wiki-link looks for node without stripping 'roam:' prefix #68

Closed arnab-basu closed 2 years ago

arnab-basu commented 2 years ago

Steps to reproduce:

  1. After setting up md-roam, insert link to org-roam node (.org file) using completion
  2. Link inserted looks like [[roam:2022_06_10]]
  3. With cursor on link press enter
  4. Capture process is activated. *Messages* shows No org-roam node found for "roam:2022_06_10"
  5. Remove roam: from wikilink manually
  6. With cursor on link press enter
  7. Expected node is opened

Expected:

arnab-basu commented 2 years ago

This impacts outgoing links from md files (to both org and md files). Outgoing links from org files work fine

nobiot commented 2 years ago

should not need to strip roam: manually

You don’t need it: just normal Markdown-mode wiki.

arnab-basu commented 2 years ago

Right but it's being added by the link completion functionality, I'm guessing this code? How do I disable the prefix addition in markdown files?

I'm using doom emacs and this config.

nobiot commented 2 years ago

Is it org-roam-completion-everywhere? It's a user option; you can turn it off. But I am not sure what is the relationship between your issue and the "this config".

What "completion" do you do? In

After setting up md-roam, insert link to org-roam node (.org file) using completion

Md-roam is for markdown files. What does .org file have to do with this? Ensure you are in markdown mode... Or you would need to be more specific and detailed -- I don't have the same issue.

arnab-basu commented 2 years ago

I recorded a gif to explain what is hapenning. Let me know if this helps

OrgMdRoamLinking

nobiot commented 2 years ago

You'd need to turn off org-roam-completion-everywhere. I don't use it so I don't support it (Md-roam is just a personal package shared with others as is; hence, not on MELPA or others) -- I confirmed the behaviour of org-roam-completion-everywhere; if it's off, it works fine.

Having said this, I will have a look if this can be easily done.

nobiot commented 2 years ago

Done. You might need to relaunch Emacs after updating md-roam. It's lightly tested and don't have much capacity today to do more -- I might have broken something, especially if you use both Org and Markdown. Let me know if you notice something.

arnab-basu commented 2 years ago

Initial testing shows that this is working fine. Will comment here if I see anything that does not work.

Thanks a lot for your great work and responsiveness!!