From 9ae0ec4072e47a4f852a382f2a04aba066ba1739 Mon Sep 17 00:00:00 2001
From: Vitalii <4005032+Crandel@users.noreply.github.com>
Date: Wed, 3 Apr 2024 19:01:38 +0200
Subject: [PATCH] Fix org-mode templates (#52)
---
templates/org.eld | 50 ++++++++++++++++++++++-------------------------
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/templates/org.eld b/templates/org.eld
index b3c6017..8467db0 100644
--- a/templates/org.eld
+++ b/templates/org.eld
@@ -1,35 +1,31 @@
org-mode
-(ttl & "#+title: " p n "#+author: " p n "#+language: " p n n)
-(qt & "#+begin_quote" n> r> n> "#+end_quote")
-(exmpl & "#+begin_example" n> r> n> "#+end_example")
-(cntr & "#+begin_center" n> r> n> "#+end_center")
-(comm & "#+begin_comment" n> r> n> "#+end_comment")
+(ttl & "#+title: " p n "#+author: " p n "#+language: " p n n)
+(bgn & "#+begin_" (s name) n r n "#+end_" name)
+(exmpl & "#+begin_example" n> r> n> "#+end_example")
+(cntr & "#+begin_center" n> r> n> "#+end_center")
+(comm & "#+begin_comment" n> r> n> "#+end_comment")
+(mrginnte & "#+begin_marginnote" n> r> n "#+end_marginnote")
+(qt & "#+begin_quote" n> r> n> "#+end_quote")
+(sdnt & "#+begin_sidenote" n> r> n "#+end_sidenote")
+(src & "#+begin_src " p n r n "#+end_src"
+ :post (org-edit-src-code))
+(rst & "#+begin_src restclient" p n r n "#+end_src"
+ :post (org-edit-src-code))
+(elsp & "#+begin_src emacs-lisp" n r n "#+end_src"
+ :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))
(vrs & "#+begin_verse" n> r> n> "#+end_verse")
-(src & "#+begin_src " p n r n "#+end_src" :post (org-edit-src-code))
-(rst & "#+begin_src restclient" p n r n "#+end_src" :post (org-edit-src-code))
-(elsp & "#+begin_src emacs-lisp" n r n "#+end_src" :post (org-edit-src-code))
-(readonly ":tangle yes :tangle-mode (identity #o444) :mkdirp yes" n)
-(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:")
-(readmecollapse "*** " (p "Heading") n "#+HTML: " (p "sub-heading") "
" n (r> "link or any comments") n n "#+HTML: " n)
+(rdnly ":tangle yes :tangle-mode (identity #o444) :mkdirp yes" n)
+(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:")
+(rdmecollapse "*** " (p "Heading") n "#+HTML: " (p "sub-heading") "
" n
+ (r> "link or any comments") n n "#+HTML: " n)
;; taken from https://github.com/minad/tempel/blob/5b09f612cfd805dba5e90bf06580583cab045499/README.org#template-file-format
-(caption & "#+caption: ")
-(drawer & ":" p ":" n r ":end:")
-(begin & "#+begin_" (s name) n r n "#+end_" name)
-(quote & "#+begin_quote" n> r> n "#+end_quote")
-(sidenote & "#+begin_sidenote" n> r> n "#+end_sidenote")
-(marginnote & "#+begin_marginnote" n> r> n "#+end_marginnote")
-(example & "#+begin_example" n> r> n "#+end_example")
-(center & "#+begin_center" n> r> n "#+end_center")
-(ascii & "#+begin_export ascii" n> r> n "#+end_export")
-(html & "#+begin_export html" n> r> n "#+end_export")
-(latex & "#+begin_export latex" n> r> n "#+end_export")
-(comment & "#+begin_comment" n> r> n "#+end_comment")
-(verse & "#+begin_verse" n> r> n "#+end_verse")
-(gnuplot & "#+begin_src gnuplot :var data=" (p "table") " :file " (p "plot.png") n r n "#+end_src" :post (org-edit-src-code))
-(elisp & "#+begin_src emacs-lisp" n r n "#+end_src" :post (org-edit-src-code))
+(cptn & "#+caption: ")
+(drwr & ":" p ":" n r ":end:")
(inlsrc "src_" p "{" q "}")
-(title & "#+title: " p n "#+author: " p n "#+language: " p n n)