From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Capture, template expansion and keyword for link type
Date: Sun, 14 Jul 2024 15:22:01 +0700 [thread overview]
Message-ID: <v701ra$duv$1@ciao.gmane.io> (raw)
In-Reply-To: <87v81atvr5.fsf@k-7.ch>
On 12/07/2024 23:34, Sébastien Gendre wrote:
> Max Nikulin writes:
>> See specific store link functions, e.g. `org-gnus-store-link'.
>
> Reading the `org-gnus-store-link' function, I see that is set: type,
> file, node, link and description.
I see :from :to :subject :message-id :group, :date. Other keywords
mentioned in the manual are added by `org-link-store-props'.
> I wonder if I can write an Elisp function that retrieve all the
> properties set for each org link types and tell we at which mode they
> are used. After all, with Elisp code could be data too.
It may require non-trivial analysis of code.
> I think I will need to make another subprotocol.
> Maybe a "capture-plus" that will accept any keys and make all of them
> accessible as a '%:keymord'.
I do not think there is any blocker that does not allow you to define
your own subprotocol. If you find it useful then you will have
opportunity to contribute it.
>> Not all books have authors in metadata. Some have editors since every
>> chapter has its own author. To avoid handling such logic in capture
>> templates I decided to resort to formatting inside an extension (or
>> formatting performed by a dedicated tool if site has API, e.g.
>> GitHub).
>
> Can you tell me more about this ?
What particular you are interested in? Are you surprised that some books
have several authors and some do not have it in citations? I believe
that elisp code embedded into capture templates is inconvenient to
debug, that is why I prefer to run formatter in some other way.
>> If you are using Emacs-30 I would suggest to keep away from
>> org-protocol hacks and to rely on `server-eval-args-left' handled by a
>> dedicated function
>>
>> emacsclient --eval '(my-capture)' 'my-proto://something?param=value'
>>
>> For older versions you may either use backslash hell like in
>> emacsclient-mail.desktop or to define custom subprotocol for
>> org-protocol.
>
> Is there any change planned for org-protocole in Emacs 30 ?
I do not expect it. Almost certainly only important fixes will be
committed to that branch.
> The big advantage for org-protocole, is that it's based on an URL that
> any external software can recognize and pass to Emacs and it's easy to
> write a custom sub-protocole.
`server-eval-args-left' allows to do the same without a set of ugly
enough hacks that were unavoidable to make org-protocol working.
next prev parent reply other threads:[~2024-07-14 8:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87sewga4ni.fsf@k-7.ch>
2024-07-11 6:59 ` Capture, template expansion and keyword for link type Sébastien Gendre
2024-07-11 13:56 ` Ihor Radchenko
2024-07-11 20:47 ` Sébastien Gendre
2024-07-11 14:05 ` Max Nikulin
2024-07-11 20:36 ` Sébastien Gendre
2024-07-12 12:00 ` Max Nikulin
2024-07-12 16:34 ` Sébastien Gendre
2024-07-14 8:22 ` Max Nikulin [this message]
2024-07-11 3:42 Sébastien Gendre
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='v701ra$duv$1@ciao.gmane.io' \
--to=manikulin@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
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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.