emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: idea for capture anywhere in x
Date: Thu, 10 Sep 2020 21:23:01 +0700	[thread overview]
Message-ID: <rjdcs6$4d5$1@ciao.gmane.io> (raw)
In-Reply-To: <rj9n2g$11b7$1@ciao.gmane.io>

09.09.2020 11:52, Maxim Nikulin wrote:
> 
> Capture templates allow calling of arbitrary lisp code, so you could 
> take value from kill ring or call low level gui-get-selection function. 
> The latter would allow separate templates for primary selection and for 
> clipboard.

Today I have noticed that there are %c and %x substitutions for capture 
templates (thanks to the patch suggesting %L). With default preferences 
emacs listen to X clipboard and adds its contents to kill-ring, so 
current clipboard content is available as %c. %x at first tries primary 
selection. So there is no need to call gui-get-selection directly. By 
default both variants of selection are available through substitutions. 
If emacs is tuned to use primary selection, there is a compatibility 
function org-get-x-clipboard.



  reply	other threads:[~2020-09-10 14:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  4:22 Samuel Wales
2020-09-08  5:01 ` Tim Cross
2020-09-08  5:05   ` Samuel Wales
2020-09-08  5:21     ` Tim Cross
2020-09-08  7:18       ` Maxim Nikulin
2020-09-08  8:03         ` Diego Zamboni
2020-09-08 16:08           ` Maxim Nikulin
2020-09-08  5:39     ` Maxim Nikulin
2020-09-08 22:40       ` Samuel Wales
2020-09-09  4:52         ` Maxim Nikulin
2020-09-10 14:23           ` Maxim Nikulin [this message]
2020-09-12  8:48             ` Nick Econopouly
2020-09-09  8:40     ` Russell Adams
2020-09-09 21:11       ` Samuel Wales
2020-09-09  1:07 ` Ihor Radchenko
     [not found] <mailman.51.1599580808.12104.emacs-orgmode@gnu.org>
2020-09-08 23:15 ` No Wayman
2020-09-13 20:29   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='rjdcs6$4d5$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: idea for capture anywhere in x' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).