Skip to content

Commit f2c281a

Browse files
authored
Fix org-mode templates (#52)
1 parent c39bc3f commit f2c281a

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

templates/org.eld

+23-27
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
org-mode
22

33

4-
(ttl & "#+title: " p n "#+author: " p n "#+language: " p n n)
5-
(qt & "#+begin_quote" n> r> n> "#+end_quote")
6-
(exmpl & "#+begin_example" n> r> n> "#+end_example")
7-
(cntr & "#+begin_center" n> r> n> "#+end_center")
8-
(comm & "#+begin_comment" n> r> n> "#+end_comment")
4+
(ttl & "#+title: " p n "#+author: " p n "#+language: " p n n)
5+
(bgn & "#+begin_" (s name) n r n "#+end_" name)
6+
(exmpl & "#+begin_example" n> r> n> "#+end_example")
7+
(cntr & "#+begin_center" n> r> n> "#+end_center")
8+
(comm & "#+begin_comment" n> r> n> "#+end_comment")
9+
(mrginnte & "#+begin_marginnote" n> r> n "#+end_marginnote")
10+
(qt & "#+begin_quote" n> r> n> "#+end_quote")
11+
(sdnt & "#+begin_sidenote" n> r> n "#+end_sidenote")
12+
(src & "#+begin_src " p n r n "#+end_src"
13+
:post (org-edit-src-code))
14+
(rst & "#+begin_src restclient" p n r n "#+end_src"
15+
:post (org-edit-src-code))
16+
(elsp & "#+begin_src emacs-lisp" n r n "#+end_src"
17+
:post (org-edit-src-code))
18+
(gnplt & "#+begin_src gnuplot :var data=" (p "table") " :file " (p "plot.png") n r n "#+end_src"
19+
:post (org-edit-src-code))
920
(vrs & "#+begin_verse" n> r> n> "#+end_verse")
10-
(src & "#+begin_src " p n r n "#+end_src" :post (org-edit-src-code))
11-
(rst & "#+begin_src restclient" p n r n "#+end_src" :post (org-edit-src-code))
12-
(elsp & "#+begin_src emacs-lisp" n r n "#+end_src" :post (org-edit-src-code))
13-
(readonly ":tangle yes :tangle-mode (identity #o444) :mkdirp yes" n)
14-
(oxhugo & ":PROPERTIES:" n ":EXPORT_FILE_NAME: " (p "Simple Filename") n ":EXPORT_DATE: " (format-time-string "%Y-%m-%d") n ":EXPORT_HUGO_DRAFT: false" n ":END:")
15-
(readmecollapse "*** " (p "Heading") n "#+HTML: <details> <summary> " (p "sub-heading") " </summary>" n (r> "link or any comments") n n "#+HTML: </details>" n)
21+
(rdnly ":tangle yes :tangle-mode (identity #o444) :mkdirp yes" n)
22+
(oxhugo & ":PROPERTIES:" n ":EXPORT_FILE_NAME: " (p "Simple Filename") n ":EXPORT_DATE: "
23+
(format-time-string "%Y-%m-%d") n ":EXPORT_HUGO_DRAFT: false" n ":END:")
24+
(rdmecollapse "*** " (p "Heading") n "#+HTML: <details> <summary> " (p "sub-heading") " </summary>" n
25+
(r> "link or any comments") n n "#+HTML: </details>" n)
1626

1727
;; taken from https://github.com/minad/tempel/blob/5b09f612cfd805dba5e90bf06580583cab045499/README.org#template-file-format
18-
(caption & "#+caption: ")
19-
(drawer & ":" p ":" n r ":end:")
20-
(begin & "#+begin_" (s name) n r n "#+end_" name)
21-
(quote & "#+begin_quote" n> r> n "#+end_quote")
22-
(sidenote & "#+begin_sidenote" n> r> n "#+end_sidenote")
23-
(marginnote & "#+begin_marginnote" n> r> n "#+end_marginnote")
24-
(example & "#+begin_example" n> r> n "#+end_example")
25-
(center & "#+begin_center" n> r> n "#+end_center")
26-
(ascii & "#+begin_export ascii" n> r> n "#+end_export")
27-
(html & "#+begin_export html" n> r> n "#+end_export")
28-
(latex & "#+begin_export latex" n> r> n "#+end_export")
29-
(comment & "#+begin_comment" n> r> n "#+end_comment")
30-
(verse & "#+begin_verse" n> r> n "#+end_verse")
31-
(gnuplot & "#+begin_src gnuplot :var data=" (p "table") " :file " (p "plot.png") n r n "#+end_src" :post (org-edit-src-code))
32-
(elisp & "#+begin_src emacs-lisp" n r n "#+end_src" :post (org-edit-src-code))
28+
(cptn & "#+caption: ")
29+
(drwr & ":" p ":" n r ":end:")
3330
(inlsrc "src_" p "{" q "}")
34-
(title & "#+title: " p n "#+author: " p n "#+language: " p n n)
3531

0 commit comments

Comments
 (0)