Re: custom function for org-babel src block export

2023-12-26 Thread David Bremner
Rudolf Adamkovič writes: > How about: > > (defvar stacker-base > "\href{https://www.example.com/stacker/?program=%s}{execute on stacker}") > > (defun org-babel-execute:stacker (body params) > (format stacker-base > (org-link-encode body '(?? ? ?( ?) ?\n > Thanks, that's a

Re: custom function for org-babel src block export

2023-12-26 Thread Rudolf Adamkovič
How about: (defvar stacker-base "\href{https://www.example.com/stacker/?program=%s}{execute on stacker}") (defun org-babel-execute:stacker (body params) (format stacker-base (org-link-encode body '(?? ? ?( ?) ?\n It works with noweb too: #+NAME: last #+BEGIN_SRC stacker

Re: custom function for org-babel src block export

2023-12-25 Thread David Bremner
David Bremner writes: > Ihor Radchenko writes: > >> David Bremner writes: >> >>> I am generating slides using org-beamer. I would like certain code >>> blocks to export as links containing URL-encoded content of the >>> block. >> >> Check out

Re: custom function for org-babel src block export

2023-12-25 Thread David Bremner
Ihor Radchenko writes: > David Bremner writes: > >> I am generating slides using org-beamer. I would like certain code >> blocks to export as links containing URL-encoded content of the >> block. > > Check out https://orgmode.org/manual/Advanced-Export-Configuration.html > You may use export

Re: custom function for org-babel src block export

2023-12-25 Thread Ihor Radchenko
David Bremner writes: > I am generating slides using org-beamer. I would like certain code > blocks to export as links containing URL-encoded content of the > block. Check out https://orgmode.org/manual/Advanced-Export-Configuration.html You may use export filter or extend ox-beamer backend,

custom function for org-babel src block export

2023-12-25 Thread David Bremner
I am generating slides using org-beamer. I would like certain code blocks to export as links containing URL-encoded content of the block. As an example I would like the following block #+begin_src stacker (defvar x 1) (deffun (f) (defvar y 2) (deffun (h) (+ x y)) (h)) (f) #+end_src