about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-12-11 18:32:19 -0600
committerCase Duckworth2020-12-11 18:32:19 -0600
commit8a8ee8e243c3ffc8530e4794c575744451998d2d (patch)
treebf656dbac62d1ebfce435fcb07eea811aad2bb13
parentChange to undo-fu (diff)
downloademacs-8a8ee8e243c3ffc8530e4794c575744451998d2d.tar.gz
emacs-8a8ee8e243c3ffc8530e4794c575744451998d2d.zip
Unignore {,early-}init.el
-rw-r--r--.gitignore1
-rw-r--r--README.md83
-rw-r--r--early-init.el4
-rw-r--r--init.el16
4 files changed, 82 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore index 75583aa..b841e9e 100644 --- a/.gitignore +++ b/.gitignore
@@ -4,6 +4,7 @@
4# except ... 4# except ...
5!config.org 5!config.org
6!init.el 6!init.el
7!early-init.el
7!.gitignore 8!.gitignore
8!README.md 9!README.md
9 10
diff --git a/README.md b/README.md index 242e159..a4edfdd 100644 --- a/README.md +++ b/README.md
@@ -19,6 +19,10 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
19 (expand-file-name "PortableGit/bin" 19 (expand-file-name "PortableGit/bin"
20 win-downloads) 20 win-downloads)
21 (expand-file-name "PortableGit/usr/bin" 21 (expand-file-name "PortableGit/usr/bin"
22 win-downloads)
23 (expand-file-name "m/usr/bin"
24 win-downloads)
25 (expand-file-name "m/mingw64/bin"
22 win-downloads))) 26 win-downloads)))
23 (when (file-exists-p path) 27 (when (file-exists-p path)
24 (add-to-list 'exec-path path)))) 28 (add-to-list 'exec-path path))))
@@ -93,8 +97,6 @@ This still doesn’t work under Windows – I have to manually download the [rep
93 (no-littering-expand-var-file-name "places")) 97 (no-littering-expand-var-file-name "places"))
94 (undo-fu-session-directory 98 (undo-fu-session-directory
95 (no-littering-expand-var-file-name "undos/")) 99 (no-littering-expand-var-file-name "undos/"))
96 (undohist-directory
97 (no-littering-expand-var-file-name "undos/"))
98 (elpher-certificate-directory 100 (elpher-certificate-directory
99 (no-littering-expand-var-file-name "elpher-certificates/"))) 101 (no-littering-expand-var-file-name "elpher-certificates/")))
100 102
@@ -220,6 +222,42 @@ This still doesn’t work under Windows – I have to manually download the [rep
220 (cuss indicate-empty-lines t) 222 (cuss indicate-empty-lines t)
221 223
222 224
225## Windows
226
227
228### Split windows *more* sensibly
229
230from [Stack Overflow](https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of-split-height-threshold-and-split-width-threshold-in).
231
232 (defun my-split-window-sensibly (&optional window)
233 (let ((window (or window (selected-window))))
234 (or (and (window-splittable-p window t)
235 ;; Split window horizontally.
236 (with-selected-window window
237 (split-window-right)))
238 (and (window-splittable-p window)
239 ;; Split window vertically.
240 (with-selected-window window
241 (split-window-below)))
242 (and (eq window (frame-root-window (window-frame window)))
243 (not (window-minibuffer-p window))
244 ;; If WINDOW is the only window on its frame and is not the
245 ;; minibuffer window, try to split it horizontally disregarding
246 ;; the value of `split-width-threshold'.
247 (let ((split-width-threshold 0))
248 (when (window-splittable-p window t)
249 (with-selected-window window
250 (split-window-right))))))))
251
252 (setq split-window-preferred-function #'my-split-window-sensibly)
253
254
255### Winner mode
256
257 (when (fboundp 'winner-mode)
258 (winner-mode +1))
259
260
223## Startup 261## Startup
224 262
225 (cuss inhibit-startup-screen t "Don't show Emacs' startup buffer.") 263 (cuss inhibit-startup-screen t "Don't show Emacs' startup buffer.")
@@ -271,7 +309,6 @@ This still doesn’t work under Windows – I have to manually download the [rep
271 (cuss calendar-longitude -91.1871) 309 (cuss calendar-longitude -91.1871)
272 310
273 (use-package circadian 311 (use-package circadian
274 :after solar
275 :custom 312 :custom
276 (circadian-themes '((:sunrise . modus-operandi) 313 (circadian-themes '((:sunrise . modus-operandi)
277 (:sunset . modus-vivendi))) 314 (:sunset . modus-vivendi)))
@@ -474,9 +511,18 @@ This still doesn’t work under Windows – I have to manually download the [rep
474 511
475## Undo 512## Undo
476 513
477 (use-package undohist 514 (use-package undo-fu
515 :bind
516 ("C-/" . undo-fu-only-undo)
517 ("C-?" . undo-fu-only-redo))
518
519 (use-package undo-fu-session
520 :custom
521 (undo-fu-session-incompatible-files
522 '("/COMMIT_EDITMSG\\'"
523 "/git-rebase-todo\\'"))
478 :config 524 :config
479 (undohist-initialize)) 525 (global-undo-fu-session-mode +1))
480 526
481 527
482# Editing 528# Editing
@@ -647,6 +693,7 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
647 (use-package company 693 (use-package company
648 :custom 694 :custom
649 (company-idle-delay 0.1) 695 (company-idle-delay 0.1)
696 (company-minimum-prefix-length 3)
650 697
651 :init 698 :init
652 (defun acdw/company-complete-common-or-cycle+1 () 699 (defun acdw/company-complete-common-or-cycle+1 ()
@@ -718,6 +765,13 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
718 (text-mode-hook . typo-mode)) 765 (text-mode-hook . typo-mode))
719 766
720 767
768## Insert *kaomoji*
769
770 (use-package insert-kaomoji
771 :bind
772 ("C-x 8 k" . insert-kaomoji))
773
774
721# Applications 775# Applications
722 776
723 777
@@ -733,6 +787,12 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
733I’ve put org mode under Applications, as opposed to Writing, because it’s more generally-applicable than that. 787I’ve put org mode under Applications, as opposed to Writing, because it’s more generally-applicable than that.
734 788
735 (use-package org 789 (use-package org
790 :mode ("\\.org\\'" . org-mode)
791
792 :bind (:map org-mode-map
793 ("M-n" . outline-next-visible-heading)
794 ("M-p" . outline-previous-visible-heading))
795
736 :custom 796 :custom
737 (org-hide-emphasis-markers t) 797 (org-hide-emphasis-markers t)
738 (org-fontify-done-headline t) 798 (org-fontify-done-headline t)
@@ -744,12 +804,11 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
744 (org-src-tab-acts-natively t) 804 (org-src-tab-acts-natively t)
745 (org-src-fontify-natively t) 805 (org-src-fontify-natively t)
746 (org-src-window-setup 'current-window) 806 (org-src-window-setup 'current-window)
747 (org-confirm-babel-evaluate nil)) 807 (org-confirm-babel-evaluate nil)
748 808
749 809 :config
750### Export to markdown 810 (require 'org-tempo)
751 811 (require 'ox-md))
752 (require 'ox-md)
753 812
754 813
755### Make bullets look like bullets 814### Make bullets look like bullets
@@ -970,7 +1029,7 @@ inspired by ["Lazy Elfeed"](https://karthinks.com/software/lazy-elfeed/).
970 (use-package elfeed 1029 (use-package elfeed
971 :when (executable-find "curl") 1030 :when (executable-find "curl")
972 :hook 1031 :hook
973 (elfeed-show-mode . visual-fill-column-mode)) 1032 (elfeed-show-mode-hook . visual-fill-column-mode))
974 1033
975 (use-package elfeed-org 1034 (use-package elfeed-org
976 :custom 1035 :custom
diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..f9d4a97 --- /dev/null +++ b/early-init.el
@@ -0,0 +1,4 @@
1;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*-
2
3(setq load-prefer-newer t)
4(setq frame-inhibit-implied-resize t)
diff --git a/init.el b/init.el index 5af6473..5230d23 100644 --- a/init.el +++ b/init.el
@@ -1,11 +1,7 @@
1 ;; This file replaces itself with the actual configuration when first run. To keep only this version in git, run this command: 1;; init.el -*- lexical-binding: t -*-
2 ;; git update-index --assume-unchanged init.el
3 ;;
4 ;; If it needs to be changed, start tracking it again thusly:
5 ;; git update-index --no-assume-unchanged init.el
6 2
7 (require 'org) 3(let ((conf (expand-file-name "config"
8 (find-file (concat user-emacs-directory "config.org")) 4 user-emacs-directory)))
9 (org-babel-tangle) 5 (unless (load conf 'no-error)
10 (load-file (concat user-emacs-directory "early-init.el")) 6 (require 'org)
11 (load-file (concat user-emacs-directory "init.el")) 7 (org-babel-load-file (concat conf ".org"))))