emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting X selection reliably (Re: idea for capture anywhere in x)


From: Max Nikulin
Subject: Re: Getting X selection reliably (Re: idea for capture anywhere in x)
Date: Fri, 28 Oct 2022 12:16:20 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 28/10/2022 11:59, Samuel Wales wrote:

i launch emacs from xinit or fluxbox menu.  sometimes from a shell.  i
run emacs as a cli batch thing from a shell.

Then you should always have an X11 Emacs frame, maybe behind other windows, and the following command should work

emacsclient --eval '(org-capture nil "p")'

with appropriate template key name, e.g. as defined by the following silly example:

("p" "primary" entry
       (file "/tmp/capture-test.org")
       "* Primary
%U

%(org-get-x-clipboard 'PRIMARY)
"
        :immediate-finish t)

However to be at the safe side I would check if (org-get-x-clipboard 'PRIMARY) value is not nil at first.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]