The title becomes the selected text . ie; window.getSelection is working but body part is not working . Do anybody have any idea on what is going on and what have i done wrong ?
I suggest you edebug the function org-roam-protocol-open-ref – I don’t use org-roam-protocol but it appears the body is expected in the code. You should be able to track down what’s happening with the text in the body parameter coming from the browser.
This doesn’t really help much yet, but it at least shows that the body param is making it into the function.
Total stab in the dark: maybe my capture template is missing something that gives the body a place to go? Currently I’m using an unmodified default template.
Ok, it took some head scratching and learning but I’ve figured out what this issues is, and it’s not a bug but a combination of things which are probably not obvious to someone new to org mode (and emacs in general).
My suspicion that the root issue with body not showing up in the capture was becasue the template didn’t specificy a place to put “body” seems correct. There’s no default assumption or logic to put a parameter named “body” in capture.
It would have been easy going to prove this, but I also got seriously confused by the difference between org-roam-capture-templates and org-roam-capture-ref-templates. org-roam-protocol requires making changes to the ref templates in order to specify a place for body. Here’s a simple example:
While initially this was unintuitive, I’m really excited about how flexible this is. In combination with the templating engine this provides the basis of some powerful capture!