Skip to content

Commit

Permalink
feat: org babel python templates (#61)
Browse files Browse the repository at this point in the history
* feat: org python templates

A basic python template, one contaning `value` as a `:result` option,
and another with `output`.

* fix: shorten python to py_

This avoids any conflicts with auto-completion.

* style: move lines

Now the templates are on line 22, under the GNU Plot one, grouping the
`src` blocks together.
  • Loading branch information
gs-101 authored Sep 3, 2024
1 parent 17ae488 commit cb7367a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/org.eld
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ org-mode
:post (org-edit-src-code))
(gnplt & "#+begin_src gnuplot :var data=" (p "table") " :file " (p "plot.png") n r n "#+end_src"
:post (org-edit-src-code))
(py_ & "#+begin_src python" n r n "#+end_src"
:post (org-edit-src-code))
(py_vl & "#+begin_src python :results value" n r n "#+end_src"
:post (org-edit-src-code))
(py_otpt & "#+begin_src python :results output" n r n "#+end_src"
:post (org-edit-src-code))
(vrs & "#+begin_verse" n> r> n> "#+end_verse")
(rdnly ":tangle yes :tangle-mode (identity #o444) :mkdirp yes" n)
(oxhugo & ":PROPERTIES:" n ":EXPORT_FILE_NAME: " (p "Simple Filename") n ":EXPORT_DATE: "
Expand Down

0 comments on commit cb7367a

Please sign in to comment.