From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4C5dL7hS92EqYQAAgWs5BA (envelope-from ) for ; Mon, 31 Jan 2022 04:08:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cPc4KLhS92HzoQAAG6o9tA (envelope-from ) for ; Mon, 31 Jan 2022 04:08:40 +0100 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 2AA452C379 for ; Mon, 31 Jan 2022 04:08:40 +0100 (CET) Received: from localhost ([::1]:43114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEN3W-0002wc-TC for larch@yhetil.org; Sun, 30 Jan 2022 22:08:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEN2H-0002wT-Uj for emacs-orgmode@gnu.org; Sun, 30 Jan 2022 22:07:21 -0500 Received: from [2a00:1450:4864:20::32c] (port=46823 helo=mail-wm1-x32c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEN2F-0005Ef-FC for emacs-orgmode@gnu.org; Sun, 30 Jan 2022 22:07:21 -0500 Received: by mail-wm1-x32c.google.com with SMTP id c190-20020a1c9ac7000000b0035081bc722dso8385073wme.5 for ; Sun, 30 Jan 2022 19:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TIouZJ1Y1WhY8EdhKP2B56PAzFGo66ASoGoUFmqQQoM=; b=OrAX9fTDmPSTmb3Gb4j01gFcBfIwROZyNpNLl8FdT1+sCR7nVJAm2FTDztLgKQKc/5 hibbqlnlIeDzsSE80iV67V+tv3/HUe2A+QnsBOQQKJPNh9Ltnf/wlVThydU66pqea03I 8vPHUcpm+5PUs4q+/mk/06Tjwv4SA30KfxH7eU8jcQZ3Hea0N5wnJLM7OLAqXAzs7QTM jra+/kXyprJFs5MfADP1thDcN1LU+KwEuJeQfrq+8lOjQoYpeykXIGyFSigd92oNFK86 W7ZjxFtXoRYGabr7xu5aXXaXDxo5TUv06gYSS3sJPrq6GdyT1PnQPGq7oUxfnxaXcyqX ca+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TIouZJ1Y1WhY8EdhKP2B56PAzFGo66ASoGoUFmqQQoM=; b=yA9vI7PQAWo6SoKLYVBJPZwxSh0DhiCdzztn/6tbr4924Id5VhXQdCdof6QrrZTEfQ /BA4WZgYb90eXjBrZeIcnBHkw00bacVDVgGTanXgJd2vwInfnLOUNeZD366K1fqFfl9E G01j+7yBBE3a5plmAEirgKRrbiO5qasVbJ2QdnDq16+8bx+CVvxNIa+x9jl5z0GHmUFI 3+7IXVFO530jdJSyLlOTPoeiKaOVwHJggh66fp1adDq3opkx94gaW3wvvWl+Tf+lrH1i gMhzGxAfcDkR71CDlBP2iwOTfNDBFAbJ48V2DRw1ZmztCHmF7So2wOC1eCcVrfxzjffs TqPw== X-Gm-Message-State: AOAM5306uWLHhjHyHYPrSQkqgr5ChyjfK7m3/XZGSAaV+ORKwJP4eEs4 lcWek47hl3lLNZ7VN/njougUwEyl94g= X-Google-Smtp-Source: ABdhPJxsnVq8aYzXCtcPcLz1J4+002LHWBRLz0h2/RKH+WYVq13edW/83aoJZVfXS7azmC9uQKUILA== X-Received: by 2002:a1c:5401:: with SMTP id i1mr19412712wmb.169.1643598422669; Sun, 30 Jan 2022 19:07:02 -0800 (PST) Received: from pluto.localnet (alagny-552-1-21-233.w83-200.abo.wanadoo.fr. [83.200.40.233]) by smtp.gmail.com with ESMTPSA id i2sm9096759wmq.23.2022.01.30.19.07.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jan 2022 19:07:02 -0800 (PST) From: chris To: emacs-orgmode@gnu.org Subject: Re: looking for examples of `org-capture-templates` working with `org-protocol://capture` Date: Mon, 31 Jan 2022 04:07:01 +0100 Message-ID: <4933995.AmxDJHG10n@pluto> In-Reply-To: <8993061.SSAKWaIIEW@pluto> References: <8993061.SSAKWaIIEW@pluto> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart1939886.AnGXQVqpbM" Content-Transfer-Encoding: 7Bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=inkbottle007@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643598520; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=TIouZJ1Y1WhY8EdhKP2B56PAzFGo66ASoGoUFmqQQoM=; b=iefRGub85y+nSI/MV9E3JqrfO3GljyemGVcdNfF0rOM9weIDn023uSEd6t+Hjrq2ZexoLR ZV9Bv746uXrPmljI0TwZgHKAD5z5OSJ03m2ZACOuzJ7B9FEdKlORy4HaFTYxFp5yDge1Bf XBl7viIq61xAEx+0fBPDdseXGkAumW+maB+IMODV8TmeElLT8ExVCXbOjx7Ick1Tr6+djn e9QK6bgoo0cqeFmhTs9nAWpP4dVbGV0KjJqJ4AGJWY+azD8nammmyR202nYlS2QP/5bUxY f1ug+FGfGjQV+Hkit/hCikjzNNmys630f9ugHrpHD+V1qNWlchYNHfUYcVquBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643598520; a=rsa-sha256; cv=none; b=QEnou24722zwnlBUi6pjWTwZY8ysQ9b0bwMZVOeg6h5VXqznxZ4wGeRJXgf299xmD4r75s 8XN3IynvvWshVR6Vu1MZx1zxBdhDjiuYgUg0CCwJXk1/SpZkLVGLLoA8guQuqI2Szi5AeH slLFt7+IuC5hSQtwe1Rd+8m+dZn6UW/zV2ugMFXt5LgVKvM2v9Q4IaReXhAz8ErygrJHhq VaozYZb/9z/lh+QGJramhd+h2Kv2O84ftLoEkvcbQlhjkuNODZHNgWQt/p7tNKMmZNF8uh ROgPyvKr9rRAt8WfZpAs9RAeHurtor52jzNOUTJ8Q8qMo6skXcNLlWKbtUOHNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OrAX9fTD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OrAX9fTD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2AA452C379 X-Spam-Score: -3.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: inp4ST5Xs2Gn This is a multi-part message in MIME format. --nextPart1939886.AnGXQVqpbM Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" On Monday, 31 January 2022 03:30:41 CET chris wrote: > Hi, > When you do > `emacsclient "org-protocol://capture? > template=X&url=URL&title=TITLE&body=BODY"` > I don't understand at all how you make use of `url` `title` and `body` in > `org- capture-template`. > I understand there is some sort of "encoding" that doesn't make use of the > keywords `url` `title` or `body`, but it's dense. > There are no indications of how to do that here: > https://orgmode.org/manual/The-capture-protocol.html[1] > I haven't found any example that I've been able to reproduce in the whole > web. I've spent hours on the documentation and the source code of > https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el[2 > ] And I have absolutely no idea of how to use `url` `title` and `body` in > `org-capture- template`. The last example in https://blog.jethro.dev/posts/capturing_inbox/[1], namely: ```emacs-lisp (setq org-capture-templates `(("l" "org-protocol-capture" entry (file "~/path/inbox.org") "* TODO [[%:link][%:description]]\n\n %i" :immediate-finish t))) ``` Seems to work consistently with: `xdg-open "org-protocol://capture?template=l&url=URL$(date --iso-8601=s)&title=TITLE$ (date --iso-86 01=s)&body=BODY$(date --iso-8601=s)"` Provided I have opened at least one org buffer before hand, otherwise it opens a buffer named `"org-protocol://capture?template=l&url=URL&title=TITLE&body=BODY" ` at what point it can get messy. Probably I have to "start" somehow "org-mode" first, and it doesn't get enough started from my `init.el`. Goal is to have the capturing work in the background, with emacs started as a daemon, but with no opened emacsclient frame: capture, simply, silently, unobtrusively. > Chris > > -------- > [1] https://orgmode.org/manual/The-capture-protocol.html > [2] > https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el -------- [1] https://blog.jethro.dev/posts/capturing_inbox/ --nextPart1939886.AnGXQVqpbM Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8"

On Monday, 31 January 2022 03:30:41 CET chris wrote:

>= ; Hi,

>= ; When you do

>= ; `emacsclient "org-protocol://capture?

>= ; template=3DX&url=3DURL&title=3DTITLE&body=3DBODY"`

>= ; I don't understand at all how you make use of `url` `title` and `body` in=

>= ; `org- capture-template`.

>= ; I understand there is some sort of "encoding" that doesn't make= use of the

>= ; keywords `url` `title` or `body`, but it's dense.

>= ; There are no indications of how to do that here:

>= ; https://orgmode.org/manual/The-capture-protocol.html[1]

>= ; I haven't found any example that I've been able to reproduce in the whole=

>= ; web. I've spent hours on the documentation and the source code of

>= ; https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.e= l[2

>= ; ] And I have absolutely no idea of how to use `url` `title` and `body` in=

>= ; `org-capture- template`.

The= last example in https://blog.jethro.dev/posts/capturing_inbox/, namely:

```= emacs-lisp

(se= tq org-capture-templates

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 `(("l" "org-protocol-capture&quo= t; entry

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (file "~/path/inbox.org&= quot;)

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "* TODO [[%:link][%:descriptio= n]]\n\n %i"

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :immediate-finish t)))

```=

See= ms to work consistently with:

`xdg-open "org-protocol://capture?te= mplate=3Dl&url=3DURL$(date --iso-8601=3Ds)&title=3DTITLE$(date --is= o-86
01=3Ds)&body=3DBODY$(date --iso-8601=3Ds= )"`

Pro= vided I have opened at least one org buffer before hand, otherwise it opens= a buffer named `"org-protocol://capture?template=3Dl&url=3DURL&am= p;title=3DTITLE&body=3DBODY"
` at what point it can get messy= =2E Probably I have to "start" somehow "org-mode" first= , and it doesn't get enough started from my `init.el`.

Goa= l is to have the capturing work in the background, with emacs started as a = daemon, but with no opened emacsclient frame:

cap= ture, simply, silently, unobtrusively.

>= ; Chris

>= ;

>= ; --------

>= ; [1] https://orgmode.org/manual/The-capture-protocol.html

>= ; [2]

>= ; https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.e= l

--nextPart1939886.AnGXQVqpbM--