|
From: | Max Nikulin |
Subject: | Re: idea for capture anywhere in x |
Date: | Sun, 9 Oct 2022 23:40:30 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
On 09/10/2022 21:47, Jean Louis wrote:
I have basic concept to capture X selection in file and get it in Emacs. It is not really related to Org, one can capture X selection and record it anyhow. There is no need for org-protocol this way. File: ~/bin/capture-x-selection.sh #!/usr/bin/bash TEMP=/tmp/xselection.txt xsel -o > $TEMP
Jean, take a breath and think several minutes on your recipe. You will figure out that (perhaps unsafe) intermediate file is redundant. Emacs can access text/plain target of PRIMARY_SELECTION and CLIPBOARD directly (anyway xsel, unlike xclip, is not your friend if you need more). In default configuration C-y yanks from CLIPBOARD, mouse middle click from PRIMARY_SELECTION.
The idea of org-protocol is to pass more data. Outside of Org there is e.g. remember mode (info "remember") https://www.gnu.org/software/emacs/manual/html_mono/remember.html You might notice remnants of org-remember in docs related to org-capture.
[Prev in Thread] | Current Thread | [Next in Thread] |