sprig / org-capture-extension

A Chrome and firefox extension facilitating org-capture in emacs
MIT License
538 stars 56 forks source link

Allow setting of tags and description when capturing #66

Open Aquan1412 opened 5 years ago

Aquan1412 commented 5 years ago

Hello,

I'm using your extension mainly as a replacement for the built-in bookmarking feature of Firefox. Therefore it would be nice, if it would be possible to set relevant tags and a short description directly in Firefox when I capture a new link. Similar to whats been done in #55. Some kind of pop-up window would also be useful with regard to unwanted captures (for example when the hotkey is pressed by chance), as you could directly cancel the capturing process instead of having to go to your org-file and delete the unwanted link.

aaronbieber commented 4 years ago

This request would be messy to implement because the Org Capture protocol allows for only three variables to be passed: url, title, and body. #55 simply binds a key that lets you manually enter a value for body, which is normally extracted from selected text in the page.

The capture template on the Emacs side just interpolates the values into your template, it can't do anything fancy with them or evaluate them in any way, so that makes capturing additional "types" of data difficult if not impossible. The only way this could be achieved is to create your own data structure expressed through the body string and advise the Emacs capture functions to parse it out before the template is loaded up. That, to me, sounds pretty fragile.

That said, I have some suggestions based on your requests:

I hope these suggestions get you closer to the workflow that you want without making changes to this project.