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.


Reply via email to