From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WK0VMCtFWV9zGwAA0tVLHw (envelope-from ) for ; Wed, 09 Sep 2020 21:12:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YGUdLCtFWV8nIgAAB5/wlQ (envelope-from ) for ; Wed, 09 Sep 2020 21:12:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2F5A3940224 for ; Wed, 9 Sep 2020 21:12:11 +0000 (UTC) Received: from localhost ([::1]:40150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kG7Ny-0006aG-3t for larch@yhetil.org; Wed, 09 Sep 2020 17:12:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kG7Nb-0006Zt-4U for emacs-orgmode@gnu.org; Wed, 09 Sep 2020 17:11:47 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:45084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kG7NZ-0001g9-5a for emacs-orgmode@gnu.org; Wed, 09 Sep 2020 17:11:46 -0400 Received: by mail-pf1-x435.google.com with SMTP id k15so3249212pfc.12 for ; Wed, 09 Sep 2020 14:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=LdtN6rvfWR+GpJZCITyYY3V2Po0xJdA5y2eH6jbIcQA=; b=kND2F8WxrPFmneudTo7WB2x5LybsQy4/q+0QcHM/EW2G6I1lUftJ+huqKwllqKWNe1 RUdjGLGOdkrlw63i6F11qRlQAZPIQZCrn31INLIFdacCHrVT9KOc1mj4lErT7fCNAjXq EIIvGPeB91LKm88jXv91PrBUSMfc8j9Icqj9PX2PeBqPjgdq5CBkUhu4dIeO2wF57Jxd B+7kFNBMoaXH30trxd8rMqPeShaDlkIM7ILA63JuA6V35QrrglxvVzwl9iYOwKDnJE3o e8RtOJIfx2iPpuGijha4rBhe1ZYAxBAJfU0yl+Qw1zav+d65yhWt8H5/o5+83e0CESdc bhgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LdtN6rvfWR+GpJZCITyYY3V2Po0xJdA5y2eH6jbIcQA=; b=nZW+oqWhYzKssNSHB9ylGjqL1CSzEX7bjeCf1k5wjpLGlV/ulAE9Xvl3ugCWfkMHMM 9yfl7LDcFNv2G7jZGhhrH9cqo723Z/IGrt+pKua3lOEsLVIqn+Zb/crvU4PiUOp6mg7H Vc9mOX+H6GwFZNzyBDaGK2D8g+xxUOmW0i3e3ZMlKdb6+OPvqwwWKFr5BgInSDPCn1XJ Ko5Onwy4WLtv+D7sR3VU8vr2iA3AN6cx+zK2e43Unw5GY91uFr+LauBehUsOIadb72r6 vsLMJecUjuLOTcn0YA/ChUnOM+iHwiv483rIo7PnCGUINd4D4F6vh+3lW3T5XrWsPkJ5 Z2TQ== X-Gm-Message-State: AOAM5302V9Pk/MhUqQv36lLtpgb/ED2mBI7IetHqlFXvO4e5U90rrbZ2 SAcoRAhjM+kUicRGOcGotDqsDBpzmSzvQ7TRwwvZzgMtHCfwlQ== X-Google-Smtp-Source: ABdhPJx4qf0QBKH96gfPjrsPVuScA1GMHdh0ZXd/qIvYLsTXtwJRateDCVFI0L9HSSpuAkx/phOhkVGhDEH6sFdflUM= X-Received: by 2002:a17:902:9692:: with SMTP id n18mr2587458plp.110.1599685902966; Wed, 09 Sep 2020 14:11:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:8371:0:0:0:0 with HTTP; Wed, 9 Sep 2020 14:11:42 -0700 (PDT) In-Reply-To: <20200909084002.GE1036@maokai> References: <87sgbsq2t5.fsf@gmail.com> <20200909084002.GE1036@maokai> From: Samuel Wales Date: Wed, 9 Sep 2020 14:11:42 -0700 Message-ID: Subject: Re: idea for capture anywhere in x To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=samologist@gmail.com; helo=mail-pf1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=kND2F8Wx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: NEGrwmsf84mu 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 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" 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