On 04/04/2025 05:05, Sébastien Gendre wrote:
The idea is, when I browse a web page I want to use as a source, to use
org-protocol to capture an org-mode entry in an bibliography.org file.
Then, to use the ox-bibtex (from org-contrib) to export the org-mode
file to a Biblatex file.

You might be interested in
https://github.com/yantar92/org-capture-ref

For academic papers perhaps it is easier to get .bib entries directly without intermediate Org headings.

But, from what I understand from the implementation of the "capture" org
sub-protocol, it only support a limited list of parameters. Is it
correct ? If yes, do you think it's better to rewrite
`org-protocol-capture` so it can accept more parameters than it support
now ? Or to implement my own sub-protocol ?

You may implement a custom sub-protocol.

Earlier I experimented with getting additional URL query parameters from capture template. E.g. for "bla"

("q" "Query test" entry
      (file
       (lambda nil
         (concat org-directory "/capture.org")))
      "* %?[[%:link][%:description]]
#+BEGIN_QUOTE
%i
#+END_QUOTE
%(let* ((query (plist-get org-store-link-plist :query))
        (bla (if query (plist-get query :bla))))
 (and bla (concat \"BLA: \" bla)))")

P.S. My opinion is that org-protocol should be reimplemented using `server-eval-args-left' with mapping of URL scheme to function handled by emacs core.

Reply via email to