08.09.2020 12:05, Samuel Wales wrote:
well for a non-emacs application, i want to select text and capture using wm menu.
Do you mean a tiny tool that takes content of X primary selection or clipboard and passes it to emacs-client org-protocol argument? Implementation should have a few lines of code and should allow you to bind it to window manager menu or hotkeys. On the other hand I do not see great difference from pasting text directly to emacs. Customization glue (primary selection/clipboard, name of template, etc.) is thicker than code that do the actual job.
The harder part is extracting of formatted text (that could be application specific) and converting it to org markup. I had a look into emacs sources and did not find extension points to obtain application-specific format, so external tool could provide some benefit (e.g. capturing link with description from libreoffice).