Finally found some time to put my quick hack to open/bookmark pages from a running chromium session in emacs using eww and org-store-link utilizing org-protocol in a publically available repository:
Decided to hack in a few more things, mainly support for capture templates to be used on selections and a options page to configure those.
If you just want to use capture functionalities there's already the awesome "Org Capture" Chrome Extension (https://github.com/sprig/org-capture-extension) that does this job exceptionally well. Just hacked it in out of the personal reason of preferring only having to install one extension for my chromium->emacs needs.
@theesm I had a hunch this was using the Org protocol and chrewwmium.js confirms it.
I really wonder if that protocol should be generalized as an Emacs feature because it can, as your script shows, be used to implement all kinds of things.
I have a question though, I'd love to know what motivated you to create this extension-package combo because that would help me understand your workflow a bit more :)
@grtcdr org-protocols name is a bit misleading for what it actually does:
> org-protocol intercepts calls from emacsclient to trigger custom actions without external dependencies.
(https://orgmode.org/worg/org-contrib/org-protocol.html)
as there are plenty of usecases outside of org-mode one could utilize it for; having it generalized as an Emacs feature would be awesome though & is a good suggestion!
@grtcdr regarding my motivation: I prefer reading longer articles directly in eww as its a more text-centric experience and I store away notes on what I read in denote; however most of my workday I have to use chromium for browsing (as my works messenger relies on JS/webapp). Often I want to either open a link I just discovered in eww instead of a chromium tab for my note taking workflow or store it away as a eww bookmark to read it later. Making this easier is what chrewwmium solves for me.
@theesm That makes so much sense, thanks for sharing your rationale :)
I'd love to take it for a spin, do you happen to know what I can do to get this to work with Firefox? - and I don't mind getting my hands dirty.
I see you've listed some alternatives but yours is more specialized.