org-tempo
1
provides easy templating in org-mode buffers and I use them to make it
easier to write code for the CCE. I can tab
across <s
and <q
to expand to source and quote blocks,
along with many others (and it's customisable of course through org-tempo-keywords-alist
.)
provide 'cce/literate-programming)
(use-package org-tempo
(nil
:ensure :after org)
Bernt Hansen provides a function and a hook to automatically show images after org-babel executes:
'org-babel-after-execute-hook 'bh/display-inline-images 'append)
(add-hook defun bh/display-inline-images ()
(nil
(condition-case
(org-display-inline-images)error nil))) (
Do not prompt to confirm evaluation. This may be dangerous - make sure you understand the consequences. I'm of two minds here; on the one hand, hanging to confirm every source block is terrible, but on the other hand, I'd like to have some modicum of security. In reality, I should set this only for my own files somehow.
setq org-confirm-babel-evaluate nil) (
Leave comments in the tangle to make it easier to untangle later on; I will mainly be using this in Lipu Kasi - A Plant Diary
'org-babel-default-header-args '(:comments . "link")) (add-to-list
Configure what languages I want to use for org-babel:
'org-babel-load-languages
(org-babel-do-load-languages t)
'((emacs-lisp . t)
(dot . t)
(ditaa . t)
(python . t)
(ruby . t)
(gnuplot . t)
(shell . t)
(org . t)
(plantuml . t))) (js .
Output to a lowercase'd results block.
setq org-babel-results-keyword "results") (
This helper sets web-mode to use Elixir
when I set a source block's type to eex
(defadvice org-edit-special (before org-edit-src-code activate)let ((lang (nth 0 (org-babel-get-src-block-info))))
(if (string= lang "web")
("elixir")))) (web-mode-set-engine
Finally, org-edit-src
simply cannot
steal my window configuration from me.
setq org-src-window-setup 'current-window) (
org-auto-tangle
configuration; any buffer with a keyword of #+auto_tangle
to non-nil will tangle on
save.
use-package org-auto-tangle
(t
:defer
:diminish :hook (org-mode . org-auto-tangle-mode))
setq org-plantuml-executable-path "/nix/store/gyznjv622jqc8d1x56r7c4wp2rq8md7m-plantuml-1.2023.1/bin/plantuml") (