From c12aa65373a9c4af4502cc183eee7bdb64e69efc Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sat, 18 Feb 2023 16:21:33 -0500 Subject: [PATCH] Added SRC blocks --- emacs/+orgmode.el | 5 +++++ emacs/config.org | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/emacs/+orgmode.el b/emacs/+orgmode.el index 4febe77..80e0192 100644 --- a/emacs/+orgmode.el +++ b/emacs/+orgmode.el @@ -142,6 +142,11 @@ "#+title: %<%Y-%m-%d>\n#+filetags: %<:%Y:%B::daily>\n\n* Goals\n* Logs" ("Goals"))))) +(setq org-src-fontify-natively t + org-src-preserve-indentation t + org-src-tab-acts-natively t + org-src-window-setup 'current-window) + (defun org-babel-execute:diff (body params) "Applies diff patches. Use with care. See https://emacs.stackexchange.com/questions/63517/org-mode-evaluate-diff-code-block" diff --git a/emacs/config.org b/emacs/config.org index 27786ad..d427e3b 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -777,10 +777,18 @@ Add the following the =packages.el= #+begin_src emacs-lisp :tangle "packages.el" :noweb no-export :comments no :results output silent (package! ob-mermaid) #+end_src - *** Babel stuff Babel execute can be tweaked per the syntax see orgmode docs [[https://orgmode.org/manual/Evaluating-Code-Blocks.html][here]]. +**** Src blocks +These are grabbed from [[https://www.gtrun.org/custom/config][gtrun]]'s configuration.' + +#+begin_src emacs-lisp :tangle "+orgmode.el" :noweb no-export :comments no :results output silent +(setq org-src-fontify-natively t + org-src-preserve-indentation t + org-src-tab-acts-natively t + org-src-window-setup 'current-window) +#+end_src **** Diff The snippet below is largely pulled from John Kitchin [[https://emacs.stackexchange.com/questions/63517/org-mode-evaluate-diff-code-block/63520#63520][Stackexchange Post]].