On 9/7/20, Maxim Nikulin <maniku...@gmail.com> wrote: > 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?
maybe. guessing probably. i want it to take contents of x primary selection or clipboard and get it into emacs using a capture template item. whether this requries oprg-protocl, idk. so basically fluxbox menu calls some trivial command which invokes capoture on my already-existing capture template such as the one that i already use for hte firefox org-capture extension to use. > 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). while such features would be great, my needs are modest i think. i would be delighted with just plain text. but if possible i'd want it to be inserted as utf-8 even if the terminal or deluge or whatever uses some different encoding. > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html