79 lines
2.5 KiB
Org Mode
79 lines
2.5 KiB
Org Mode
#+TITLE: Literate Programming with Org
|
|
#+AUTHOR: Howard X. Abrams
|
|
#+EMAIL: howard.abrams@gmail.com
|
|
#+DATE: 2021-11-05
|
|
#+FILETAGS: :emacs:
|
|
|
|
This section is primarily about development in a literate way, especially focused on [[http://howardism.org/Technical/Emacs/literate-devops.html][literate devops]].
|
|
|
|
#+BEGIN_SRC emacs-lisp :exports none
|
|
;;; ha-org-babel.el --- -*- lexical-binding: t; -*-
|
|
;;
|
|
;; Copyright (C) 2021 Howard X. Abrams
|
|
;;
|
|
;; Author: Howard X. Abrams <http://gitlab.com/howardabrams>
|
|
;; Maintainer: Howard X. Abrams <howard.abrams@gmail.com>
|
|
;; Created: November 5, 2021
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;; *NB:* Do not edit this file. Instead, edit the original literate file at:
|
|
;; ~/other/hamacs/ha-org-babel.org
|
|
;; And tangle the file to recreate this one.
|
|
;;
|
|
;;; Code:
|
|
#+END_SRC
|
|
|
|
* Introduction
|
|
Let's turn on all the languages:
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package org
|
|
:init
|
|
(setq org-confirm-babel-evaluate nil
|
|
org-src-fontify-natively t
|
|
org-src-tab-acts-natively t)
|
|
:config
|
|
(add-to-list 'org-src-lang-modes '("dot" . "graphviz-dot"))
|
|
|
|
(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
|
|
|
|
#+RESULTS:
|
|
: t
|
|
|
|
|
|
|
|
* Technical Artifacts :noexport:
|
|
|
|
Let's provide a name so that the file can be required:
|
|
|
|
#+BEGIN_SRC emacs-lisp :exports none
|
|
(provide 'ha-org-babel)
|
|
;;; ha-org-babel.el ends here
|
|
#+END_SRC
|
|
|
|
Before you can build this on a new system, make sure that you put the cursor over any of these properties, and hit: ~C-c C-c~
|
|
|
|
#+DESCRIPTION:
|
|
|
|
#+PROPERTY: header-args:sh :tangle no
|
|
#+PROPERTY: header-args:emacs-lisp :tangle yes
|
|
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
|
|
|
|
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
|
|
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
|
|
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
|
|
|
# Local Variables:
|
|
# eval: (add-hook 'after-save-hook #'org-babel-tangle t t)
|
|
# End:
|