[emacs] Update to org 9 noweb references

This commit is contained in:
Correl Roush 2019-03-25 16:11:15 -04:00
parent 0f25020d3b
commit 55e1f0706e

View file

@ -3,7 +3,7 @@
* Startup * Startup
** Disable the emacs startup screen. ** Disable the emacs startup screen.
#+name: startup #+HEADER: :noweb-ref startup
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq inhibit-startup-screen +1) (setq inhibit-startup-screen +1)
#+END_SRC #+END_SRC
@ -11,7 +11,7 @@
Store options set via =customize-*= in a separate file (Emacs stores Store options set via =customize-*= in a separate file (Emacs stores
them in =init.el= by default). them in =init.el= by default).
#+name: custom-settings #+HEADER: :noweb-ref custom-settings
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq custom-file "~/.emacs.d/custom.el") (setq custom-file "~/.emacs.d/custom.el")
(if (file-exists-p custom-file) (if (file-exists-p custom-file)
@ -21,13 +21,13 @@ them in =init.el= by default).
#+END_SRC #+END_SRC
* UI * UI
** Highlight the current line ** Highlight the current line
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(global-hl-line-mode +1) (global-hl-line-mode +1)
#+END_SRC #+END_SRC
** Powerline ** Powerline
Make the mode line prettier. Make the mode line prettier.
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package powerline (use-package powerline
:ensure t :ensure t
@ -37,7 +37,7 @@ Make the mode line prettier.
#+END_SRC #+END_SRC
** Nyan-mode ** Nyan-mode
Visualize the current position within the buffer in the modeline with nyancat! Visualize the current position within the buffer in the modeline with nyancat!
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package nyan-mode (use-package nyan-mode
:ensure t :ensure t
@ -46,7 +46,7 @@ Visualize the current position within the buffer in the modeline with nyancat!
(nyan-start-animation)) (nyan-start-animation))
#+END_SRC #+END_SRC
** Display Time & Battery Status ** Display Time & Battery Status
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq display-time-24hr-format t) (setq display-time-24hr-format t)
(setq display-time-load-average-threshold 0.9) (setq display-time-load-average-threshold 0.9)
@ -57,7 +57,7 @@ Visualize the current position within the buffer in the modeline with nyancat!
(display-battery-mode t) (display-battery-mode t)
#+END_SRC #+END_SRC
** Theme ** Theme
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package moe-theme (use-package moe-theme
:ensure t :ensure t
@ -75,7 +75,7 @@ Visualize the current position within the buffer in the modeline with nyancat!
#+END_SRC #+END_SRC
** Major mode icons ** Major mode icons
Display major-mode names as icons in the mode line when possible. Display major-mode names as icons in the mode line when possible.
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package mode-icons (use-package mode-icons
:ensure t :ensure t
@ -84,7 +84,7 @@ Display major-mode names as icons in the mode line when possible.
#+END_SRC #+END_SRC
** Which-Key ** Which-Key
Display key binding completions after a delay. Display key binding completions after a delay.
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package which-key (use-package which-key
:ensure t :ensure t
@ -94,7 +94,7 @@ Display key binding completions after a delay.
(which-key-mode)) (which-key-mode))
#+END_SRC #+END_SRC
** Helm ** Helm
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package helm (use-package helm
:ensure t :ensure t
@ -115,7 +115,7 @@ Display key binding completions after a delay.
(define-key eshell-mode-map (kbd "C-c C-l") 'helm-eshell-history))))) (define-key eshell-mode-map (kbd "C-c C-l") 'helm-eshell-history)))))
#+END_SRC #+END_SRC
*** helm-descbinds *** helm-descbinds
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package helm-descbinds (use-package helm-descbinds
:ensure t :ensure t
@ -124,14 +124,14 @@ Display key binding completions after a delay.
#+END_SRC #+END_SRC
*** helm-ag *** helm-ag
Helm search plugin for [[Ag%20(The%20Silver%20Searcher)][Ag (The Silver Searcher)]] Helm search plugin for [[Ag%20(The%20Silver%20Searcher)][Ag (The Silver Searcher)]]
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package helm-ag (use-package helm-ag
:ensure t :ensure t
:commands (helm-ag)) :commands (helm-ag))
#+END_SRC #+END_SRC
*** helm-flyspell *** helm-flyspell
#+name: packages #+HEADER: :noweb-ref packages
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package helm-flyspell (use-package helm-flyspell
:ensure t :ensure t
@ -148,7 +148,7 @@ Quite usefully, using prefix arguments expands the lines of context
shown around the search results. shown around the search results.
#+END_NOTES #+END_NOTES
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package helm-swoop (use-package helm-swoop
:ensure t :ensure t
@ -168,7 +168,7 @@ shown around the search results.
Visualize and traverse undo history as a directed graph. Visualize and traverse undo history as a directed graph.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package undo-tree (use-package undo-tree
:ensure t :ensure t
@ -176,7 +176,7 @@ Visualize and traverse undo history as a directed graph.
:config (global-undo-tree-mode)) :config (global-undo-tree-mode))
#+END_SRC #+END_SRC
** Multiple Cursors ** Multiple Cursors
#+name: look-and-feel #+HEADER: :noweb-ref look-and-feel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package multiple-cursors (use-package multiple-cursors
:bind (("C-S-c C-S-c" . mc/edit-lines) :bind (("C-S-c C-S-c" . mc/edit-lines)
@ -188,7 +188,7 @@ Visualize and traverse undo history as a directed graph.
* Coding * Coding
** Languages ** Languages
*** Lisps *** Lisps
#+name: lisps #+NAME: lisps
| Mode | Description | | Mode | Description |
|------------+---------------------------| |------------+---------------------------|
| lisp | Common Lisp | | lisp | Common Lisp |
@ -198,7 +198,7 @@ Visualize and traverse undo history as a directed graph.
| clojure | Clojure | | clojure | Clojure |
| hy | Hy (Lisp-flavored Python) | | hy | Hy (Lisp-flavored Python) |
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp :noweb yes #+BEGIN_SRC emacs-lisp :noweb yes
;; SLIME ;; SLIME
(if (file-exists-p "~/quicklisp/slime-helper.el") (if (file-exists-p "~/quicklisp/slime-helper.el")
@ -235,14 +235,14 @@ Visualize and traverse undo history as a directed graph.
lisp-mode-hooks))) lisp-mode-hooks)))
#+END_SRC #+END_SRC
**** Lisp-Flavored Erlang **** Lisp-Flavored Erlang
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lfe-mode (use-package lfe-mode
:ensure t :ensure t
:mode "\\.lfe$") :mode "\\.lfe$")
#+END_SRC #+END_SRC
**** Clojure **** Clojure
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package clojure-mode (use-package clojure-mode
:ensure t :ensure t
@ -251,7 +251,7 @@ Visualize and traverse undo history as a directed graph.
#+END_SRC #+END_SRC
***** Cider ***** Cider
Communicates with the clojure REPL. Communicates with the clojure REPL.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package cider (use-package cider
:ensure t :ensure t
@ -259,7 +259,7 @@ Communicates with the clojure REPL.
:config (setq org-babel-clojure-backend 'cider)) :config (setq org-babel-clojure-backend 'cider))
#+END_SRC #+END_SRC
**** Hy **** Hy
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package hy-mode (use-package hy-mode
:ensure t :ensure t
@ -271,7 +271,7 @@ Communicates with the clojure REPL.
#+END_SRC #+END_SRC
*** Erlang *** Erlang
A distributed, fault-tolerant functional language. A distributed, fault-tolerant functional language.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package erlang (use-package erlang
:ensure t :ensure t
@ -283,7 +283,7 @@ A distributed, fault-tolerant functional language.
#+END_SRC #+END_SRC
*** Elixir *** Elixir
Ruby-flavoured Erlang. Ruby-flavoured Erlang.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package elixir-mode (use-package elixir-mode
:ensure t :ensure t
@ -299,7 +299,7 @@ Ruby-flavoured Erlang.
#+END_SRC #+END_SRC
*** Haskell *** Haskell
A strongly typed, pure functional language. A strongly typed, pure functional language.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package haskell-mode (use-package haskell-mode
:ensure t :ensure t
@ -314,7 +314,7 @@ A strongly typed, pure functional language.
A functional, reactive language for the web that compiles to A functional, reactive language for the web that compiles to
JavaScript. JavaScript.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package elm-mode (use-package elm-mode
:ensure t :ensure t
@ -328,7 +328,7 @@ JavaScript.
A functional language with dependent types. A functional language with dependent types.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package idris-mode (use-package idris-mode
:ensure t :ensure t
@ -336,14 +336,14 @@ A functional language with dependent types.
#+END_SRC #+END_SRC
*** Web *** Web
**** HTML **** HTML
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package web-mode (use-package web-mode
:ensure t :ensure t
:mode "\\.html?$") :mode "\\.html?$")
#+END_SRC #+END_SRC
**** SCSS **** SCSS
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package scss-mode (use-package scss-mode
:ensure t :ensure t
@ -354,14 +354,14 @@ A functional language with dependent types.
(setq css-indent-offset 2)))) (setq css-indent-offset 2))))
#+END_SRC #+END_SRC
*** JavaScript *** JavaScript
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package js2-mode (use-package js2-mode
:ensure t :ensure t
:mode ".js$") :mode ".js$")
#+END_SRC #+END_SRC
*** PHP *** PHP
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package php-mode (use-package php-mode
:ensure t :ensure t
@ -374,7 +374,7 @@ A functional language with dependent types.
(c-set-offset 'case-label '+)))) (c-set-offset 'case-label '+))))
#+END_SRC #+END_SRC
*** Python *** Python
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package python-mode (use-package python-mode
:ensure t :ensure t
@ -399,7 +399,7 @@ installed:
pip install yapf pip install yapf
#+END_SRC #+END_SRC
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package elpy (use-package elpy
:ensure t :ensure t
@ -407,7 +407,7 @@ installed:
:config (elpy-enable)) :config (elpy-enable))
#+END_SRC #+END_SRC
**** Cython **** Cython
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package cython-mode (use-package cython-mode
:ensure t :ensure t
@ -415,7 +415,7 @@ installed:
#+END_SRC #+END_SRC
**** Company-Jedi **** Company-Jedi
Configure jedi and company-mode to provide auto-completion for python. Configure jedi and company-mode to provide auto-completion for python.
#+name: programming #+HEADER: :noweb-ref programming
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package jedi (use-package jedi
:ensure t :ensure t
@ -443,7 +443,7 @@ Configure jedi and company-mode to provide auto-completion for python.
#+end_src #+end_src
*** Ruby *** Ruby
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package rvm (use-package rvm
:ensure t :ensure t
@ -451,21 +451,21 @@ Configure jedi and company-mode to provide auto-completion for python.
rvm-use-default)) rvm-use-default))
#+END_SRC #+END_SRC
*** Yaml *** Yaml
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package yaml-mode (use-package yaml-mode
:ensure t :ensure t
:mode "\.yml$") :mode "\.yml$")
#+END_SRC #+END_SRC
*** Docker *** Docker
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package dockerfile-mode (use-package dockerfile-mode
:ensure t :ensure t
:mode "^Dockerfile$") :mode "^Dockerfile$")
#+END_SRC #+END_SRC
*** Graphviz *** Graphviz
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package graphviz-dot-mode (use-package graphviz-dot-mode
:ensure t :ensure t
@ -474,14 +474,14 @@ Configure jedi and company-mode to provide auto-completion for python.
(setq graphviz-dot-indent-width 2)) (setq graphviz-dot-indent-width 2))
#+END_SRC #+END_SRC
*** Gnuplot *** Gnuplot
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package gnuplot (use-package gnuplot
:ensure t) :ensure t)
#+END_SRC #+END_SRC
*** PlantUML *** PlantUML
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package plantuml-mode (use-package plantuml-mode
:ensure t :ensure t
@ -497,7 +497,7 @@ system.
Editor-agnostic coding style configuration. Editor-agnostic coding style configuration.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package editorconfig (use-package editorconfig
:ensure t :ensure t
@ -507,7 +507,7 @@ Editor-agnostic coding style configuration.
#+END_SRC #+END_SRC
*** Projectile *** Projectile
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package projectile (use-package projectile
:ensure t :ensure t
@ -527,7 +527,7 @@ Editor-agnostic coding style configuration.
Install and configure Company for auto-completion. Install and configure Company for auto-completion.
#+name: autocomplete #+HEADER: :noweb-ref autocomplete
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package company (use-package company
:ensure t :ensure t
@ -543,7 +543,7 @@ Install and configure Company for auto-completion.
Not using this for auto-completion anymore, but several packages Not using this for auto-completion anymore, but several packages
require it. require it.
#+name: autocomplete #+HEADER: :noweb-ref autocomplete
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package auto-complete (use-package auto-complete
:ensure t :ensure t
@ -551,7 +551,7 @@ require it.
#+end_src #+end_src
*** Flycheck *** Flycheck
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package flycheck (use-package flycheck
:ensure t :ensure t
@ -560,7 +560,7 @@ require it.
(add-hook 'after-init-hook #'global-flycheck-mode)) (add-hook 'after-init-hook #'global-flycheck-mode))
#+END_SRC #+END_SRC
*** Web Mode *** Web Mode
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package web-mode (use-package web-mode
:ensure t :ensure t
@ -573,7 +573,7 @@ require it.
*** Skewer *** Skewer
Live web development in Emacs. Live web development in Emacs.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package skewer-mode (use-package skewer-mode
:ensure t :ensure t
@ -586,7 +586,7 @@ Live web development in Emacs.
(add-hook 'html-mode-hook 'skewer-html-mode))) (add-hook 'html-mode-hook 'skewer-html-mode)))
#+END_SRC #+END_SRC
*** Yasnippet *** Yasnippet
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package yasnippet (use-package yasnippet
:ensure t :ensure t
@ -598,7 +598,7 @@ Live web development in Emacs.
This is a code searching tool that replaces =ack=, and is an order of This is a code searching tool that replaces =ack=, and is an order of
magnitude faster. magnitude faster.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ag (use-package ag
:ensure t :ensure t
@ -607,7 +607,7 @@ magnitude faster.
*** Expand Region *** Expand Region
Increase selected region by semantic units. Increase selected region by semantic units.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package expand-region (use-package expand-region
:ensure t :ensure t
@ -630,7 +630,7 @@ Hide package namespaces in emacs-lisp code.
*** Dash *** Dash
A modern list api for Emacs. No 'cl required. A modern list api for Emacs. No 'cl required.
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package dash (use-package dash
:ensure t :ensure t
@ -640,7 +640,7 @@ A modern list api for Emacs. No 'cl required.
Lazy sequences in Emacs (compatible with seq.el). Lazy sequences in Emacs (compatible with seq.el).
#+name: programming #+HEADER: :noweb-ref programming
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package stream (use-package stream
:ensure t :ensure t
@ -650,24 +650,24 @@ Lazy sequences in Emacs (compatible with seq.el).
* Writing * Writing
** Style ** Style
*** End sentences with a single space *** End sentences with a single space
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq sentence-end-double-space nil) (setq sentence-end-double-space nil)
#+END_SRC #+END_SRC
** Formats ** Formats
*** Org *** Org
**** Pretty bullets **** Pretty bullets
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-bullets (use-package org-bullets
:ensure t :ensure t
:hook (org-mode . org-bullets-mode)) :hook (org-mode . org-bullets-mode))
#+END_SRC #+END_SRC
**** Modules **** Modules
#+name: org-module-table #+NAME: org-module-table
| org-habit | | org-habit |
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp :noweb yes #+BEGIN_SRC emacs-lisp :noweb yes
(let ((modules (mapcar (lambda (m) (intern (car m))) (let ((modules (mapcar (lambda (m) (intern (car m)))
'<<org-module-table()>>))) '<<org-module-table()>>)))
@ -685,19 +685,19 @@ be marked done.
org-enforce-todo-checkbox-dependencies t) org-enforce-todo-checkbox-dependencies t)
#+END_SRC #+END_SRC
***** Keep logs in their own drawer ***** Keep logs in their own drawer
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-log-into-drawer t) (setq org-log-into-drawer t)
#+END_SRC #+END_SRC
***** Log completion ***** Log completion
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-log-done 'time) (setq org-log-done 'time)
#+END_SRC #+END_SRC
***** Habits ***** Habits
Shift the consistency graph over a bit to make room for task Shift the consistency graph over a bit to make room for task
names. names.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-habit-graph-column 70) (setq org-habit-graph-column 70)
(setq org-habit-show-habits-only-for-today nil) (setq org-habit-show-habits-only-for-today nil)
@ -708,12 +708,12 @@ names.
#+END_SRC #+END_SRC
**** Babel **** Babel
***** Syntax highlighting ***** Syntax highlighting
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq-default org-src-fontify-natively t) (setq-default org-src-fontify-natively t)
#+END_SRC #+END_SRC
***** HTTP ***** HTTP
#+name: packages #+HEADER: :noweb-ref packages
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ob-http (use-package ob-http
:ensure t :ensure t
@ -725,7 +725,7 @@ Org-babel evaluation will be turned on for the following
languages. Setting ~Confirm Evaluation~ to ~No~ disables the languages. Setting ~Confirm Evaluation~ to ~No~ disables the
[[http://orgmode.org/manual/Code-evaluation-security.html][security prompt]] for that language. [[http://orgmode.org/manual/Code-evaluation-security.html][security prompt]] for that language.
#+name: org-babel-languages #+NAME: org-babel-languages
| Language | Alias | Confirm Evaluation? | Description | | Language | Alias | Confirm Evaluation? | Description |
|--------------+-------+---------------------+---------------------------------| |--------------+-------+---------------------+---------------------------------|
| emacs-lisp | | Yes | Emacs Lisp | | emacs-lisp | | Yes | Emacs Lisp |
@ -743,7 +743,7 @@ languages. Setting ~Confirm Evaluation~ to ~No~ disables the
| sql | | No | SQL Queries | | sql | | No | SQL Queries |
| ledger | | No | Double-Entry Accounting | | ledger | | No | Double-Entry Accounting |
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp :noweb yes #+BEGIN_SRC emacs-lisp :noweb yes
(defvar my/org-babel-evaluated-languages ()) (defvar my/org-babel-evaluated-languages ())
(defvar my/org-src-lang-modes ()) (defvar my/org-src-lang-modes ())
@ -779,7 +779,7 @@ languages. Setting ~Confirm Evaluation~ to ~No~ disables the
(setq org-confirm-babel-evaluate 'my/org-confirm-babel-evaluate) (setq org-confirm-babel-evaluate 'my/org-confirm-babel-evaluate)
#+END_SRC #+END_SRC
***** Reload images on source execution ***** Reload images on source execution
#+name: packages #+HEADER: :noweb-ref packages
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/redisplay-org-images () (defun my/redisplay-org-images ()
(when org-inline-image-overlays (when org-inline-image-overlays
@ -792,7 +792,7 @@ languages. Setting ~Confirm Evaluation~ to ~No~ disables the
A useful snippet for marking a region and wrapping it in an org block. A useful snippet for marking a region and wrapping it in an org block.
Taken from [[http://pragmaticemacs.com/emacs/wrap-text-in-an-org-mode-block/][Pragmatic Emacs]] Taken from [[http://pragmaticemacs.com/emacs/wrap-text-in-an-org-mode-block/][Pragmatic Emacs]]
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; function to wrap blocks of text in org templates ;; ;; function to wrap blocks of text in org templates ;;
@ -843,7 +843,7 @@ Taken from [[http://pragmaticemacs.com/emacs/wrap-text-in-an-org-mode-block/][Pr
**** Complete keywords with Company **** Complete keywords with Company
Taken from https://emacs.stackexchange.com/a/30691. Taken from https://emacs.stackexchange.com/a/30691.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun org-keyword-backend (command &optional arg &rest ignored) (defun org-keyword-backend (command &optional arg &rest ignored)
(interactive (list 'interactive)) (interactive (list 'interactive))
@ -866,7 +866,7 @@ Taken from https://emacs.stackexchange.com/a/30691.
#+END_SRC #+END_SRC
**** Exporting **** Exporting
***** LaTeX ***** LaTeX
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp :noweb yes #+BEGIN_SRC emacs-lisp :noweb yes
(use-package ox-latex (use-package ox-latex
:defer t :defer t
@ -884,7 +884,7 @@ including:
- [[https://ctan.org/pkg/tufte-latex?lang=en][Tufte]] - [[https://ctan.org/pkg/tufte-latex?lang=en][Tufte]]
- [[https://ctan.org/pkg/labbook?lang=en][Labbook]] (based on KOMA-Script) - [[https://ctan.org/pkg/labbook?lang=en][Labbook]] (based on KOMA-Script)
#+name: configure-ox-latex #+HEADER: :noweb-ref configure-ox-latex
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(seq-map (apply-partially #'add-to-list 'org-latex-classes) (seq-map (apply-partially #'add-to-list 'org-latex-classes)
'(("koma-letter" '(("koma-letter"
@ -990,7 +990,7 @@ Configure org-mode LaTeX export to use minted for syntax highlighting.
Some languages / markups I use aren't supported by minted, so I map Some languages / markups I use aren't supported by minted, so I map
them here so they don't fail. them here so they don't fail.
#+name: ox-latex-minted-mappings #+NAME: ox-latex-minted-mappings
#+CAPTION: Minted language mappings #+CAPTION: Minted language mappings
| Language | Mapping | | Language | Mapping |
|----------+--------------| |----------+--------------|
@ -1001,7 +1001,7 @@ them here so they don't fail.
| csv | text | | csv | text |
| conf | linux-config | | conf | linux-config |
#+name: configure-ox-latex #+HEADER: :noweb-ref configure-ox-latex
#+BEGIN_SRC emacs-lisp :noweb yes #+BEGIN_SRC emacs-lisp :noweb yes
(setq org-latex-listings 'minted) (setq org-latex-listings 'minted)
(setq org-latex-minted-options (setq org-latex-minted-options
@ -1024,7 +1024,7 @@ override the latex compiler using the file-level =LATEX_COMPILER=
directive. directive.
#+END_NOTES #+END_NOTES
#+name: configure-ox-latex #+HEADER: :noweb-ref configure-ox-latex
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-latex-pdf-process (setq org-latex-pdf-process
(-repeat 3 "%latex -shell-escape -interaction nonstopmode -output-directory %o %f")) (-repeat 3 "%latex -shell-escape -interaction nonstopmode -output-directory %o %f"))
@ -1035,14 +1035,14 @@ directive.
#+END_SRC #+END_SRC
*** LaTeX *** LaTeX
**** AUCTeX **** AUCTeX
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package tex-site (use-package tex-site
:ensure auctex :ensure auctex
:mode ("\\.tex$" . TeX-latex-mode)) :mode ("\\.tex$" . TeX-latex-mode))
#+END_SRC #+END_SRC
**** LaTeX-Extra **** LaTeX-Extra
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package latex-extra (use-package latex-extra
:ensure t :ensure t
@ -1051,7 +1051,7 @@ directive.
:init (add-hook 'LaTeX-mode-hook #'latex-extra-mode)) :init (add-hook 'LaTeX-mode-hook #'latex-extra-mode))
#+END_SRC #+END_SRC
*** Markdown *** Markdown
#+name: packages #+HEADER: :noweb-ref packages
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package markdown-mode (use-package markdown-mode
:ensure t :ensure t
@ -1059,7 +1059,7 @@ directive.
#+end_src #+end_src
** Tools ** Tools
*** Flyspell *** Flyspell
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package flyspell (use-package flyspell
:ensure t :ensure t
@ -1073,7 +1073,7 @@ directive.
*** Auto-Fill *** Auto-Fill
Automatically wrap paragraphs while writing in text modes. Automatically wrap paragraphs while writing in text modes.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(mapcar (lambda (mode-hook) (mapcar (lambda (mode-hook)
(add-hook mode-hook #'auto-fill-mode)) (add-hook mode-hook #'auto-fill-mode))
@ -1085,7 +1085,7 @@ Re-flowing paragraphs with =fill-paragraph= is nice, but there are
occasions when it's useful to do the inverse, and get rid of the line occasions when it's useful to do the inverse, and get rid of the line
breaks. breaks.
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package unfill (use-package unfill
:ensure t :ensure t
@ -1094,7 +1094,7 @@ breaks.
:bind ("M-Q" . unfill-paragraph)) :bind ("M-Q" . unfill-paragraph))
#+END_SRC #+END_SRC
*** Writegood *** Writegood
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package writegood-mode (use-package writegood-mode
:ensure t :ensure t
@ -1107,7 +1107,7 @@ breaks.
#+END_SRC #+END_SRC
*** Define Word *** Define Word
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package define-word (use-package define-word
:ensure t :ensure t
@ -1119,7 +1119,7 @@ breaks.
Command-line double-entry accounting system. Command-line double-entry accounting system.
https://www.ledger-cli.org/ https://www.ledger-cli.org/
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ledger-mode (use-package ledger-mode
:ensure t :ensure t
@ -1128,7 +1128,7 @@ https://www.ledger-cli.org/
#+END_SRC #+END_SRC
* Mail * Mail
** Gnus ** Gnus
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package gnus (use-package gnus
:commands gnus :commands gnus
@ -1138,14 +1138,14 @@ https://www.ledger-cli.org/
(setq gnus-before-startup-hook 'my/configure-gnus))) (setq gnus-before-startup-hook 'my/configure-gnus)))
#+END_SRC #+END_SRC
*** Avoid rich-text messages *** Avoid rich-text messages
#+name: gnus #+HEADER: :noweb-ref gnus
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq mm-discouraged-alternatives '("text/html" "text/richtext")) (setq mm-discouraged-alternatives '("text/html" "text/richtext"))
#+END_SRC #+END_SRC
*** Summary view formatting *** Summary view formatting
Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a673a74356e7141f Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a673a74356e7141f
#+name: gnus #+HEADER: :noweb-ref gnus
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(when window-system (when window-system
(setq gnus-sum-thread-tree-indent " ") (setq gnus-sum-thread-tree-indent " ")
@ -1169,7 +1169,7 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
(setq gnus-summary-display-arrow t) (setq gnus-summary-display-arrow t)
#+END_SRC #+END_SRC
*** Inline images *** Inline images
#+name: gnus #+HEADER: :noweb-ref gnus
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(require 'mm-decode) (require 'mm-decode)
@ -1178,7 +1178,7 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
#+END_SRC #+END_SRC
* Publishing * Publishing
** Htmlize ** Htmlize
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package htmlize (use-package htmlize
:ensure t :ensure t
@ -1186,7 +1186,7 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
#+END_SRC #+END_SRC
* Source Control * Source Control
** Git-Gutter ** Git-Gutter
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package git-gutter (use-package git-gutter
:ensure t :ensure t
@ -1207,7 +1207,7 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
(global-git-gutter-mode t))))) (global-git-gutter-mode t)))))
#+END_SRC #+END_SRC
** Magit ** Magit
#+name: packages #+HEADER: :noweb-ref packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package magit (use-package magit
:ensure t :ensure t
@ -1239,7 +1239,7 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
#+END_SRC #+END_SRC
* Other functionality * Other functionality
** Disable tab indenting by default ** Disable tab indenting by default
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq-default indent-tabs-mode nil) (setq-default indent-tabs-mode nil)
#+END_SRC #+END_SRC
@ -1247,13 +1247,13 @@ Taken from http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/a6
New credentials will be stored in the gpg-encrypted authinfo by New credentials will be stored in the gpg-encrypted authinfo by
default. default.
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")) (setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
#+END_SRC #+END_SRC
** Rename file and buffer ** Rename file and buffer
Taken from [[http://emacsredux.com/blog/2013/05/04/rename-file-and-buffer/][Emacs Redux]] Taken from [[http://emacsredux.com/blog/2013/05/04/rename-file-and-buffer/][Emacs Redux]]
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; emacsredux.com ;; emacsredux.com
(defun rename-file-and-buffer () (defun rename-file-and-buffer ()
@ -1273,7 +1273,7 @@ Taken from [[http://emacsredux.com/blog/2013/05/04/rename-file-and-buffer/][Emac
#+END_SRC #+END_SRC
** Eval and Replace ** Eval and Replace
Taken from [[http://emacsredux.com/blog/2013/06/21/eval-and-replace/][Emacs Redux]] Taken from [[http://emacsredux.com/blog/2013/06/21/eval-and-replace/][Emacs Redux]]
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun eval-and-replace () (defun eval-and-replace ()
"Replace the preceding sexp with its value." "Replace the preceding sexp with its value."
@ -1289,7 +1289,7 @@ Taken from [[http://emacsredux.com/blog/2013/06/21/eval-and-replace/][Emacs Redu
#+END_SRC #+END_SRC
** Smarter navigation to the beginning of a line ** Smarter navigation to the beginning of a line
Taken from [[http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/][Emacs Redux]] Taken from [[http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/][Emacs Redux]]
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun smarter-move-beginning-of-line (arg) (defun smarter-move-beginning-of-line (arg)
"Move point back to indentation of beginning of line. "Move point back to indentation of beginning of line.
@ -1320,7 +1320,7 @@ Taken from [[http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beg
#+END_SRC #+END_SRC
** Edit file with sudo ** Edit file with sudo
Taken from [[http://www.emacswiki.org/TrampMode#toc32][EmacsWiki]] Taken from [[http://www.emacswiki.org/TrampMode#toc32][EmacsWiki]]
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(require 'dired) (require 'dired)
(defun sudo-edit-current-file () (defun sudo-edit-current-file ()
@ -1359,14 +1359,14 @@ https://github.com/sachac/.emacs.d/
This is one of the things people usually want to change right away. By default, Emacs saves backup files in the current directory. These are the files ending in =~= that are cluttering up your directory lists. The following code stashes them all in =~/.emacs.d/backups=, where I can find them with =C-x C-f= (=find-file=) if I really need to. This is one of the things people usually want to change right away. By default, Emacs saves backup files in the current directory. These are the files ending in =~= that are cluttering up your directory lists. The following code stashes them all in =~/.emacs.d/backups=, where I can find them with =C-x C-f= (=find-file=) if I really need to.
#+name: other #+HEADER: :noweb-ref other
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) (setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
#+end_src #+end_src
Disk space is cheap. Save lots. Disk space is cheap. Save lots.
#+name: other #+HEADER: :noweb-ref other
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq delete-old-versions -1) (setq delete-old-versions -1)
(setq version-control t) (setq version-control t)
@ -1376,14 +1376,14 @@ Disk space is cheap. Save lots.
** Disable lock files ** Disable lock files
Lock files have only ever gotten in my way. Lock files have only ever gotten in my way.
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq create-lockfiles nil) (setq create-lockfiles nil)
#+END_SRC #+END_SRC
** History ** History
From http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html From http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html
#+name: other #+HEADER: :noweb-ref other
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq savehist-file "~/.emacs.d/savehist") (setq savehist-file "~/.emacs.d/savehist")
(savehist-mode 1) (savehist-mode 1)
@ -1400,7 +1400,7 @@ From http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.htm
http://emacsredux.com/blog/2013/03/27/copy-filename-to-the-clipboard/ http://emacsredux.com/blog/2013/03/27/copy-filename-to-the-clipboard/
https://github.com/bbatsov/prelude https://github.com/bbatsov/prelude
#+name: other #+HEADER: :noweb-ref other
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun prelude-copy-file-name-to-clipboard () (defun prelude-copy-file-name-to-clipboard ()
"Copy the current buffer file name to the clipboard." "Copy the current buffer file name to the clipboard."
@ -1415,7 +1415,7 @@ https://github.com/bbatsov/prelude
** Prompt for 'y or n' instead of 'yes or no' ** Prompt for 'y or n' instead of 'yes or no'
Because typing out "yes" and "no" is irritating. Because typing out "yes" and "no" is irritating.
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defalias 'yes-or-no-p #'y-or-n-p) (defalias 'yes-or-no-p #'y-or-n-p)
#+END_SRC #+END_SRC
@ -1423,7 +1423,7 @@ Because typing out "yes" and "no" is irritating.
http://stackoverflow.com/a/13408008 http://stackoverflow.com/a/13408008
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(require 'ansi-color) (require 'ansi-color)
(defun colorize-compilation-buffer () (defun colorize-compilation-buffer ()
@ -1442,7 +1442,7 @@ The control keys are typically pretty terrible, too, but I find it
easier to rebind Caps Lock to Control in the system preferences (which easier to rebind Caps Lock to Control in the system preferences (which
is a nice thing to do in other environments, as well). is a nice thing to do in other environments, as well).
#+name: other #+HEADER: :noweb-ref other
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(when (equal 'darwin system-type) (when (equal 'darwin system-type)
;; Command as meta, because alt/option's placement is terrible on ;; Command as meta, because alt/option's placement is terrible on
@ -1457,7 +1457,7 @@ automatically loaded.
I usually use this is a testing ground for new configuration before I usually use this is a testing ground for new configuration before
adding it here, and also for any personal / sensitive configuration. adding it here, and also for any personal / sensitive configuration.
#+name: auto-load #+HEADER: :noweb-ref auto-load
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun my/load-elisp-directory (path) (defun my/load-elisp-directory (path)
(let ((file-pattern "\\.elc?$")) (let ((file-pattern "\\.elc?$"))