On 12/10/2022 08:09, Samuel Wales wrote:
the thread is about doing the same thing, or as much as possible of
it, more generally in x.
Samuel, I assume that you are quite happy with org-capture Firefox
extension.
Have you managed to setup capturing text from other applications? From
my point of view all necessary moving parts have been discussed in this
or later threads. Have you assembled them to a working solution suitable
for you?
- Window manager menu item and shortcut calling
emacsclient --eval '(org-capture nil "c")'
- Capture template that fetches X PRIMARY_SELECTION or CLIPBOARD.
- Optionally try to get formatted text and convert it from HTML to Org
using pandoc.
- Perhaps try to get window title of the active application.
What I have not tried yet is if drag&drop API may provide more details
than X selection, but I am unsure if such workflow is suitable for you.
Probably it is better to discuss code in the context of particular
applications. Despite you wish a general approach, amount of information
exposed by applications may vary. Some code may depend on Emacs version
an I am unsure which one you are using currently.