Org-mode mailing list
 help / color / mirror / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: idea for capture anywhere in x
Date: Wed, 9 Sep 2020 14:11:42 -0700
Message-ID: <CAJcAo8t_g00_T5cgwSygDWJSKg=A+0sxDJbow6=piV7MTEtC+g@mail.gmail.com> (raw)
In-Reply-To: <20200909084002.GE1036@maokai>

as some have mentioned keystrokes, i just wanted to point out htat the
idea here is select with mouse and run using mouse, with no keyboard
at all.  firefox org-capture does this for me.  in case there was any
confusion.

On 9/9/20, Russell Adams <RLAdams@adamsinfoserv.com> wrote:
> On Mon, Sep 07, 2020 at 10:05:38PM -0700, Samuel Wales wrote:
>> well for a non-emacs application, i want to select text and capture
>> using wm menu.
>
> I routinely capture programming and UNIX history. I select text (X11
> clipboard), and then I have a skel/abbrev to insert it into Emacs. I
> type "pexa<space>" and it creates an example source block and pastes
> the clipboard into it with proper indentation. "pexa" stands for
> "paste example".
>
> This is *so* fast compared to creating a new source block (C-c C-, e),
> then entering it (C-c C-'), pasting (C-y), and then exiting (C-c C-').
>
> ;; Org mode skeletons instead of yasnippet
> (define-skeleton rla-paste-example
>   "Insert an Org-mode example source block and paste the clipboard into it."
> nil
>   "#+BEGIN_EXAMPLE\n"
>   ;; indent to match the src block
>   (concat "  " (replace-regexp-in-string "\n" "\n  "
> (replace-regexp-in-string "\n$" "" (current-kill 0)))) "\n"
>   "#+END_EXAMPLE\n"
>   "\n"
>   -)
>
> (define-abbrev-table 'org-mode-abbrev-table '(("pexa" "" rla-paste-example
> 0)))
>
> Mind you this is in the current buffer I'm typing in. If I wanted to
> add from the CLI, I'd use a capture template with a predefined
> location and make sure it includes the clipboard in expansion.
>
> As some of the other replies have shown, triggering capture externally
> isn't too hard. You'll just need to figure out the WM hook.
>
> ------------------------------------------------------------------
> Russell Adams                            RLAdams@AdamsInfoServ.com
>
> PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


  reply	other threads:[~2020-09-09 21:12 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
2020-09-12  8:48             ` Nick Econopouly
2020-09-09  8:40     ` Russell Adams
2020-09-09 21:11       ` Samuel Wales [this message]
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://orgmode.org

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

  git send-email \
    --in-reply-to='CAJcAo8t_g00_T5cgwSygDWJSKg=A+0sxDJbow6=piV7MTEtC+g@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git