summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--README.md80
-rw-r--r--config.org5
2 files changed, 66 insertions, 19 deletions
diff --git a/README.md b/README.md index dfcc845..39430ab 100644 --- a/README.md +++ b/README.md
@@ -103,6 +103,12 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
103 (make-directory (no-littering-expand-var-file-name dir) t)) 103 (make-directory (no-littering-expand-var-file-name dir) t))
104 104
105 105
106## About me
107
108 (setq user-full-name "Case Duckworth"
109 user-mail-address "acdw@acdw.net")
110
111
106# Look and Feel 112# Look and Feel
107 113
108 114
@@ -256,21 +262,6 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
256 (load-theme 'modus-operandi t)) 262 (load-theme 'modus-operandi t))
257 263
258 264
259### Modeline
260
261 (custom-set-faces
262 '(mode-line ((t (:height 0.8
263 :overline t
264 :box nil
265 :foreground "black"
266 :background "white"))))
267 '(mode-line-inactive ((t (:height 0.8
268 :overline t
269 :box nil
270 :foreground "#808080"
271 :background "white")))))
272
273
274### Fonts 265### Fonts
275 266
2761. Define fonts 2671. Define fonts
@@ -310,9 +301,9 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
310 "Linux Libertine O-12" 301 "Linux Libertine O-12"
311 "Georgia-11")) 302 "Georgia-11"))
312 303
313 (remove-hook 'window-setup-hook #'acdw/setup-fonts))) 304 (remove-hook 'after-init-hook #'acdw/setup-fonts)))
314 305
315 (add-hook 'window-setup-hook #'acdw/setup-fonts) 306 (add-hook 'after-init-hook #'acdw/setup-fonts)
316 307
3172. Variable-pitch in text modes 3082. Variable-pitch in text modes
318 309
@@ -620,6 +611,13 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
620 (add-hook 'prog-mode-hook #'acdw/enable-line-numbers) 611 (add-hook 'prog-mode-hook #'acdw/enable-line-numbers)
621 612
622 613
614## Indenting
615
616 (use-package aggressive-indent
617 :config
618 (global-aggressive-indent-mode +1))
619
620
623# Writing 621# Writing
624 622
625 623
@@ -764,6 +762,54 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
764 'scimax/org-return) 762 'scimax/org-return)
765 763
766 764
765### Insert blank lines
766
767from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-headings-and-before-contents).
768
769 ;;;###autoload
770 (defun unpackaged/org-fix-blank-lines (&optional prefix)
771 "Ensure that blank lines exist between headings and between headings and their contents.
772 With prefix, operate on whole buffer. Ensures that blank lines
773 exist after each headings's drawers."
774 (interactive "P")
775 (org-map-entries (lambda ()
776 (org-with-wide-buffer
777 ;; `org-map-entries' narrows the buffer, which prevents us from seeing
778 ;; newlines before the current heading, so we do this part widened.
779 (while (not (looking-back "\n\n" nil))
780 ;; Insert blank lines before heading.
781 (insert "\n")))
782 (let ((end (org-entry-end-position)))
783 ;; Insert blank lines before entry content
784 (forward-line)
785 (while (and (org-at-planning-p)
786 (< (point) (point-max)))
787 ;; Skip planning lines
788 (forward-line))
789 (while (re-search-forward org-drawer-regexp end t)
790 ;; Skip drawers. You might think that `org-at-drawer-p' would suffice, but
791 ;; for some reason it doesn't work correctly when operating on hidden text.
792 ;; This works, taken from `org-agenda-get-some-entry-text'.
793 (re-search-forward "^[ \t]*:END:.*\n?" end t)
794 (goto-char (match-end 0)))
795 (unless (or (= (point) (point-max))
796 (org-at-heading-p)
797 (looking-at-p "\n"))
798 (insert "\n"))))
799 t (if prefix
800 nil
801 'tree)))
802
8031. Add a before-save-hook
804
805 (defun cribbed/org-mode-fix-blank-lines ()
806 (when (eq major-mode 'org-mode)
807 (let ((current-prefix-arg 4)) ; Emulate C-u
808 (call-interactively 'unpackaged/org-fix-blank-lines))))
809
810 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines)
811
812
767# Appendices 813# Appendices
768 814
769 815
diff --git a/config.org b/config.org index 8f101d0..35922e6 100644 --- a/config.org +++ b/config.org
@@ -4,7 +4,7 @@
4#+EXPORT_FILE_NAME: README.md 4#+EXPORT_FILE_NAME: README.md
5#+OPTIONS: toc:nil 5#+OPTIONS: toc:nil
6#+BANKRUPTCY_COUNT: 3 6#+BANKRUPTCY_COUNT: 3
7#+Time-stamp: <2020-12-10 00:15:33 acdw> 7#+Time-stamp: <2020-12-10 00:40:50 acdw>
8 8
9Let’s configure Emacs using Org mode, they said. It’ll be fun, they said. 9Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
10 10
@@ -329,7 +329,7 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
329 "Linux Libertine Mono O-11" 329 "Linux Libertine Mono O-11"
330 "Go Mono-10" 330 "Go Mono-10"
331 "Consolas-10")) 331 "Consolas-10"))
332 332
333 (set-face-attribute 'fixed-pitch nil 333 (set-face-attribute 'fixed-pitch nil
334 :font 334 :font
335 (font-candidate 335 (font-candidate
@@ -370,6 +370,7 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
370 (unicode-fonts-setup)) 370 (unicode-fonts-setup))
371#+end_src 371#+end_src
372 372
373
373* Interactivity 374* Interactivity
374 375
375** Selectrum 376** Selectrum