guixconfig/home/emacs/templates

87 lines
2.7 KiB
Text
Raw Normal View History

2023-11-30 14:20:14 +00:00
fundamental-mode
(sign "-- DZ " (format-time-string "%Y-%m-%d"))
prog-mode
(vip-title (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) " " (make-string (length str) ?=) " " n
(if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) " " (s str) " " n
(if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) " " (make-string (length str) ?=) " " n)
(fixme (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "FIXME ")
(todo (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "TODO ")
(bug (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "BUG ")
(hack (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "HACK ")
2023-12-08 09:46:43 +00:00
scheme-mode
(define-guix-egg
"(define-public chicken-" (s egg-name)
n> "(package"
n> "(name \"chicken-" egg-name "\")"
n> "(version \"" (s egg-version) "\")"
n> "(source"
n> "(origin"
n> "(method url-fetch)"
n> "(uri (egg-uri \"" egg-name "\" version))"
n> "(sha256"
n> "(base32"
n> "\"0z05x7f154n9bgmainrsmncf5i6dil43r9ymr3rdgwbg4wnxmz4s\"))))"
n> "(propagated-inputs"
n> "(list " (s inputs) "))"
n> "(native-inputs"
n> "(list " (s native-inputs) "))"
n> "(build-system chicken-build-system)"
n> "(arguments '(#:egg-name \"" egg-name "\"))"
n> "(synopsis \"" (s synopsis) "\")"
n> "(home-page \"https://wiki.call-cc.org/eggref/5/" egg-name "\")"
n> "(description \"" synopsis "\")"
n> "(license license:" (s license) ")))")
2023-12-09 15:32:29 +00:00
org-mode
(src
"#+begin_src " p
n p n
"#+end_src")
2023-12-11 10:59:44 +00:00
(advent-of-code-day
"* Day " (s day) ": " p
n> n> "Get the puzzle solution as [[./day" day ".scm][tangled .scm file]]."
n> n> "** Part One"
n> n> "#+NAME: day" day "-imports"
n> "#+begin_src scheme :exports none :noweb yes :tangle day" day ".scm"
n>
n> "#+end_src"
n> n> "#+NAME: day" day "-input-scm"
n> "#+begin_src scheme :exports none :noweb yes :tangle day" day ".scm"
n> "(define input \""
n> "<<day" day "-input>>\")"
n> "#+end_src"
n> n> "*** Quest"
n> n> "*** Puzzle Solution"
n> n> "**** Calculation"
n> n> "#+NAME: day" day "-part1-calc-fn"
n> "#+begin_src scheme :tangle day" day ".scm :noweb strip-tangle"
n> ""
n> "#+end_src"
n> n> "#+CALL: day" day "-part1-calc-fn[:var input=day" day "-input[] :epilogue \"(calc-part-1)\"]()"
n> n> "** Part Two"
n> n> "*** Quest"
n> n> "*** Puzzle Solution"
n> n> "**** Calculation"
n> n> "#+NAME: day" day "-part2-calc-fn"
n> "#+begin_src scheme :tangle day" day ".scm :noweb strip-tangle"
n> ""
n> "#+end_src"
n>n> "#+CALL: day" day "-part2-calc-fn[:var input=day" day "-input[] :epilogue \"(calc-part-2)\"]()"
n> n> "** Puzzle Input"
n> n> "#+NAME: day" day "-input"
n> "#+begin_src fundamental"
n> "#+end_src")
2023-11-30 14:20:14 +00:00
;; Local Variables:
;; mode: lisp-data
;; outline-regexp: "[a-z]"
;; End: