summaryrefslogtreecommitdiff
path: root/mms-ox.org
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-01-19 15:22:13 +0100
committermms <michal@sapka.me>2024-01-19 15:22:13 +0100
commit9ab57ee255a03b86ed7303aa94959e3b104e1719 (patch)
tree926293dc6d9460f1eab12231573b71abc8d5ac4e /mms-ox.org
feat: extract into dedicated repo
Diffstat (limited to 'mms-ox.org')
-rw-r--r--mms-ox.org83
1 files changed, 83 insertions, 0 deletions
diff --git a/mms-ox.org b/mms-ox.org
new file mode 100644
index 0000000..f0fefee
--- /dev/null
+++ b/mms-ox.org
@@ -0,0 +1,83 @@
+#+TITLE: mms Emacs Config - OX
+#+AUTHOR: MichaƂ Sapka (https://michal.sapka.me)
+#+STARTUP: showall indent logdoneGeneral settings
+
+#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/
+#+HUGO_WEIGHT: 400
+#+HUGO_SECTION: emacs/config
+#+HUGO_CATEGORIES: emacs emacs-config
+#+HUGO_MENU :menu "emacs-config" :name "Org mode"
+#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - Org mode"
+#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "Basic org mode and babel config"
+#+EXPORT_FILE_NAME: org
+
+* Todo
+
+I want to set done date autoatically
+
+#+begin_src
+(setq org-log-done 'time)
+#+end_src
+
+
+* Babel
+
+Babel allows for evaluation of code blocks inside Org files.
+I want to use all available languages.
+
+#+begin_src emacs-lisp
+ (org-babel-do-load-languages 'org-babel-load-languages
+ '((shell . t)
+ (js . t)
+ (emacs-lisp . t)
+ (clojure . t)
+ (python . t)
+ (ruby . t)
+ (dot . t)
+ (css . t)
+ (plantuml . t)))
+#+end_src
+Don't ask for confirmation when evaluating, don't be annoying.
+
+#+begin_src emacs-lisp
+ (setq org-confirm-babel-evaluate nil)
+ (setq org-babel-default-header-args '((:eval . "never-export")
+ (:exports . "both")
+ (:cache . "no")
+ (:results . "replace")))
+#+end_src
+
+Org-tempo allows for =<s<TAB>= quick expansion into a full-blown code block.
+Pretty neat.
+
+#+begin_src emacs-lisp
+ (require 'org-tempo)
+ (setq org-structure-template-alist
+ '(("a" . "export ascii\n")
+ ("c" . "center\n")
+ ("C" . "comment\n")
+ ("e" . "example\n")
+ ("E" . "export")
+ ("h" . "export html\n")
+ ("l" . "export latex\n")
+ ("q" . "quote\n")
+ ("s" . "src")
+ ("v" . "verse\n")))
+#+end_src
+
+* Github export
+
+Why do markdown when you don't need to?
+
+#+begin_src emacs-lisp
+ (use-package ox-gfm)
+#+end_src
+
+* Fast access
+
+Lastly, let's open my org folder /fast/
+
+#+begin_src emacs-lisp
+ (mms-leader-keys
+ "o o" '((lambda () (interactive) (find-file "~/org")) :wk "Open org folder"))
+#+end_src