From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 sJR5BWPW+2ESmwAAgWs5BA (envelope-from ) for ; Thu, 03 Feb 2022 14:19:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KOATAmPW+2E6ZwAAauVa8A (envelope-from ) for ; Thu, 03 Feb 2022 14:19:31 +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 B77D229A89 for ; Thu, 3 Feb 2022 14:19:30 +0100 (CET) Received: from localhost ([::1]:49136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFc1J-0002CE-Tb for larch@yhetil.org; Thu, 03 Feb 2022 08:19:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFbgQ-0008Fs-1o for emacs-orgmode@gnu.org; Thu, 03 Feb 2022 07:57:55 -0500 Received: from ciao.gmane.io ([116.202.254.214]:51298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFbgN-0007L4-8r for emacs-orgmode@gnu.org; Thu, 03 Feb 2022 07:57:53 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nFbgI-00028q-Ce for emacs-orgmode@gnu.org; Thu, 03 Feb 2022 13:57:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: looking for examples of `org-capture-templates` working with `org-protocol://capture` Date: Thu, 3 Feb 2022 19:57:36 +0700 Message-ID: References: <8993061.SSAKWaIIEW@pluto> <4933995.AmxDJHG10n@pluto> <10223357.zeXQE78KxU@pluto> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US In-Reply-To: <10223357.zeXQE78KxU@pluto> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, 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=1643894370; 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; bh=L+mlJJN2EQd8xeVKoIPIvasbi1Sk0J/O5wjURn7qfzg=; b=J6+cf8EP91KOxMOnHt981EwJ5GaSURqj+43XdjoUTSYyi9c4uINLQOlEpDz3tKGnlAvbgB jKCkBE8CNpQRqRYywKwrjSbprgiE8uvcwc9PcM7gw7lgjGfHY3+BewA0LfChpm4r0+GFdT XvwQH7PLqAw1Bd+eYIaqdZ5c9HswiytEviOBC0VucaKpaY4depphLR5rXtWhSqvm3colNc G1qjnsd3MQ4NvgXTCZEfErzrCXDOoL2lKwbfh2WetLHKgryn/z2boff51LPGjyHi0H58iB tOTCfdXeMReCUQmZlReXzbdVlRM3LAQUE15lzRKSOhe1DtxyhOGqE4hvj3Eidg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643894370; a=rsa-sha256; cv=none; b=fjpSe7qu/ipcFz1Hr3OwPD7zeE2mQnuRjmzRNJCk1v6vQ/vCyXIa4yYRJUFhZMIV6N54Ju 804IpMQwjXyF/GB6JteJvPd5HS529+UzvxhNlqVPCVZcaWcYXMf7qbPOCVq3UJOIpXmvTm vmB1ynYKbB5XziRrLqTIwxccPlJs1d59azmiu0/4zOKiWhywhOR5z43w4NfmgBnSB7FiEg of7k3tp8eCCwWGEyX3JjAPK6K5+0cNGKXfb8mXlw3anzvsvdVvW7J7JziAVav3R8fy+j/t O308doGzr2811s26JyR/bhiwguxhy6FRFsdCShcdWPBNUH12ccaucHr0ZGKU4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: B77D229A89 X-Spam-Score: -2.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: WhThFcJiZnBy Chris, could you, please, be more specific with your complains? Templates are described in the manual in the sections you cited. Notice that manual may be accessed from emacs M-x info RET org RET or M-: (info "(org) The capture protocol") or using [[info:org#The capture protocol]] links in org files or as a single long HTML page https://orgmode.org/org.html On 31/01/2022 11:23, chris wrote: > > > 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`. You need something like (require 'org-protocol) in your emacs init file to setup handlers for specific "file names". Org-protocol URIs are just relative paths to files from standpoint of emcasclient. Certainly this line should be executed when directory with org package is already known. The pitfall of such line is that it makes impossible to temporary try another org version using just emacs -L ~/src/org-mode/lisp test.org it must be combined with -q or -Q. > So, reverse-engineering the example I've eventually found the relevant > points of the documentation: What do you mean by "reverse-engineering"? %:link, %:description, %i are described in "The capture protocol" https://orgmode.org/manual/The-capture-protocol.html known to you. Upper "Protocols for External Access" section contains link to "Capture" section where a couple of examples (unrelated to org-protocol however) may be found. "Template elements" and (known to you) "Template expansion" sections have detailed reference of template constituents. > https://orgmode.org/worg/org-contrib/org-protocol.html Notice that some information on this page is outdated. > (setq org-capture-templates > >       `(("l" "org-protocol-capture" entry >          (file "~/path/inbox.org") >         "* TODO [[%:link][%:description]]\n\n %:initial" >         :immediate-finish t))) :immediate-finish should be added when everything already works.