From: Max Nikulin <email@example.com>
Subject: Re: looking for examples of `org-capture-templates` working with `org-protocol://capture`
Date: Thu, 3 Feb 2022 19:57:36 +0700 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
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
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
> > first, and it doesn't get enough started from my `init.el`.
You need something like
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.
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.
prev parent reply other threads:[~2022-02-03 13:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 2:30 chris
2022-01-31 3:07 ` chris
2022-01-31 4:23 ` chris
2022-02-03 12:57 ` Max Nikulin [this message]
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
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).