about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-10-12 18:40:17 -0500
committerCase Duckworth2021-10-12 18:40:17 -0500
commit1433a3916049615cc3ab4880939b3842c9242c29 (patch)
treef7e9bb8a63ba5121de80287283b832e8e8c58c85
parentConfigure popper.el (diff)
downloademacs-1433a3916049615cc3ab4880939b3842c9242c29.tar.gz
emacs-1433a3916049615cc3ab4880939b3842c9242c29.zip
totally unhelpful commit message
;)
-rw-r--r--init.el43
-rw-r--r--lisp/acdw-modeline.el72
-rw-r--r--lisp/acdw-org.el3
3 files changed, 58 insertions, 60 deletions
diff --git a/init.el b/init.el index a5b77ba..e25e73f 100644 --- a/init.el +++ b/init.el
@@ -515,7 +515,12 @@
515 "Setup eww bookmark integration." 515 "Setup eww bookmark integration."
516 (setq-local bookmark-make-record-function #'bookmark-eww--make))) 516 (setq-local bookmark-make-record-function #'bookmark-eww--make)))
517 517
518 (:bind "b" #'bookmark-set 518 (:bind "RET" (defun eww/browse-url (arg)
519 (interactive "P")
520 (if-let ((url (thing-at-point 'url)))
521 (browse-url url)
522 (call-interactively #'acdw/link-hint-open-link)))
523 "b" #'bookmark-set
519 "B" #'bookmark-jump 524 "B" #'bookmark-jump
520 "M-n" nil 525 "M-n" nil
521 "M-p" nil)) 526 "M-p" nil))
@@ -525,6 +530,9 @@
525 (add-hook 'after-save-hook 530 (add-hook 'after-save-hook
526 #'executable-make-buffer-file-executable-if-script-p)) 531 #'executable-make-buffer-file-executable-if-script-p))
527 532
533(setup elec-pair
534 (electric-pair-mode +1))
535
528(setup files 536(setup files
529 (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t)) 537 (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t))
530 auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t) 538 auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t)
@@ -978,8 +986,7 @@ specific to most general, they are these:
978 shr-max-width fill-column 986 shr-max-width fill-column
979 shr-max-image-proportion 0.6 987 shr-max-image-proportion 0.6
980 shr-image-animate t 988 shr-image-animate t
981 shr-discard-aria-hidden t 989 shr-discard-aria-hidden t))
982 shr-folding-mode t))
983 990
984(setup text 991(setup text
985 (:hook turn-on-auto-fill 992 (:hook turn-on-auto-fill
@@ -1235,7 +1242,11 @@ specific to most general, they are these:
1235 lui-fill-remove-face-from-newline nil) 1242 lui-fill-remove-face-from-newline nil)
1236 1243
1237 (:hook #'visual-fill-column-mode 1244 (:hook #'visual-fill-column-mode
1238 #'visual-line-mode) 1245 #'visual-line-mode
1246 #'enable-lui-track)
1247
1248 (:face lui-time-stamp-face
1249 ((t :inherit font-lock-comment-face)))
1239 1250
1240 (:local-set visual-fill-column-extra-text-width 1251 (:local-set visual-fill-column-extra-text-width
1241 (cons acdw-irc/left-margin 0) 1252 (cons acdw-irc/left-margin 0)
@@ -1247,9 +1258,7 @@ specific to most general, they are these:
1247 nyan-mode nil 1258 nyan-mode nil
1248 line-number-mode nil 1259 line-number-mode nil
1249 column-number-mode nil 1260 column-number-mode nil
1250 file-percentage-mode nil) 1261 file-percentage-mode nil)))
1251
1252 (:hook #'enable-lui-track)))
1253 1262
1254(setup (:straight (consult 1263(setup (:straight (consult
1255 :host github 1264 :host github
@@ -1533,6 +1542,7 @@ See also `crux-reopen-as-root-mode'."
1533 (:hook #'reading-mode) 1542 (:hook #'reading-mode)
1534 (:local-set shr-max-image-proportion 0.9 1543 (:local-set shr-max-image-proportion 0.9
1535 shr-width nil 1544 shr-width nil
1545 shr-max-width nil
1536 fill-column 0) 1546 fill-column 0)
1537 ;; see https://irreal.org/blog/?p=8885 1547 ;; see https://irreal.org/blog/?p=8885
1538 (:bind "SPC" (defun elfeed-scroll-up-command (&optional arg) 1548 (:bind "SPC" (defun elfeed-scroll-up-command (&optional arg)
@@ -2293,25 +2303,6 @@ the default is \"/\"."
2293 (:also-load eldoc) 2303 (:also-load eldoc)
2294 (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) 2304 (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
2295 2305
2296;; (setup (:straight paredit)
2297;; (:bind "DEL" #'paredit-backward-delete
2298;; "C-<backspace>" #'paredit-backward-kill-word
2299;; "M-w" #'paredit-copy-as-kill
2300;; "RET" #'paredit-newline)
2301
2302;; (:unbind "M-s" ; paredit-splice-sexp
2303;; "C-j" ; paredit-newline (rebound to RET)
2304;; )
2305
2306;; (:hook-into emacs-lisp-mode
2307;; ielm-mode sly-repl-mode
2308;; lisp-mode
2309;; lisp-interaction-mode
2310;; scheme-mode)
2311
2312;; (:also-load eldoc)
2313;; (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
2314
2315(setup (:straight paren-face) 2306(setup (:straight paren-face)
2316 (:hook-into emacs-lisp-mode 2307 (:hook-into emacs-lisp-mode
2317 ielm-mode sly-repl-mode 2308 ielm-mode sly-repl-mode
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index adfcb44..d9b1c8b 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el
@@ -33,13 +33,18 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
33 33
34(defun acdw-modeline/buffer-name () ; gonsie 34(defun acdw-modeline/buffer-name () ; gonsie
35 "Display the buffer name in a face reflecting its modified status." 35 "Display the buffer name in a face reflecting its modified status."
36 (propertize (concat (format " %-20s" (truncate-string 20 (buffer-name) "~"))) 36 (propertize
37 'face 'bold 37 (concat
38 ;; (if (buffer-modified-p) 38 (format " %-20s"
39 ;; 'font-lock-warning-face 39 (truncate-string 20
40 ;; 'font-lock-type-face) 40 (string-trim (buffer-name) "*" "*")
41 'help-echo (or (buffer-file-name) 41 "~")))
42 (buffer-name)))) 42 'face 'bold
43 ;; (if (buffer-modified-p)
44 ;; 'font-lock-warning-face
45 ;; 'font-lock-type-face)
46 'help-echo (or (buffer-file-name)
47 (buffer-name))))
43 48
44(defun acdw-modeline/erc () 49(defun acdw-modeline/erc ()
45 "ERC indicator for the modeline." 50 "ERC indicator for the modeline."
@@ -90,31 +95,32 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
90(defun acdw-modeline/modified () ; modified from `simple-modeline' 95(defun acdw-modeline/modified () ; modified from `simple-modeline'
91 "Displays a color-coded buffer modification/read-only 96 "Displays a color-coded buffer modification/read-only
92indicator in the mode-line." 97indicator in the mode-line."
93 (if (not (string-match-p "\\*.*\\*" (buffer-name))) 98 (let* ((read-only (and buffer-read-only (buffer-file-name)))
94 (let* ((read-only (and buffer-read-only (buffer-file-name))) 99 (modified (buffer-modified-p)))
95 (modified (buffer-modified-p))) 100 (propertize
96 (propertize 101 (concat " "
97 (concat " " 102 (cond
98 (cond 103 ((string-match-p "\\*.*\\*" (buffer-name))
99 ((derived-mode-p 'special-mode 104 "*")
100 'lui-mode) 105 ((derived-mode-p 'special-mode
101 "~") 106 'lui-mode)
102 (read-only "=") 107 "~")
103 (modified "+") 108 (read-only "=")
104 (t "-"))) 109 (modified "+")
105 'help-echo (format 110 (t "-")))
106 (concat "Buffer is %s and %smodified\n" 111 'help-echo (format
107 "mouse-1: Toggle read-only status.") 112 (concat "Buffer is %s and %smodified\n"
108 (if read-only "read-only" "writable") 113 "mouse-1: Toggle read-only status.")
109 (if modified "" "not ")) 114 (if read-only "read-only" "writable")
110 'local-map (purecopy (simple-modeline-make-mouse-map 115 (if modified "" "not "))
111 'mouse-1 116 'local-map (purecopy (simple-modeline-make-mouse-map
112 (lambda (event) 117 'mouse-1
113 (interactive "e") 118 (lambda (event)
114 (with-selected-window 119 (interactive "e")
115 (posn-window (event-start event)) 120 (with-selected-window
116 (read-only-mode 'toggle))))) 121 (posn-window (event-start event))
117 'mouse-face 'mode-line-highlight)))) 122 (read-only-mode 'toggle)))))
123 'mouse-face 'mode-line-highlight)))
118 124
119(defun acdw-modeline/narrowed () 125(defun acdw-modeline/narrowed ()
120 "Display an indication if the buffer is narrowed." 126 "Display an indication if the buffer is narrowed."
@@ -195,7 +201,7 @@ is, if point < mark."
195(defun acdw-modeline/wc () 201(defun acdw-modeline/wc ()
196 "Display current `wc-buffer-stats'." 202 "Display current `wc-buffer-stats'."
197 (when (bound-and-true-p wc-mode) 203 (when (bound-and-true-p wc-mode)
198 (or wc-buffer-stats " [w]"))) 204 (format "%8s" (or (cadr wc-buffer-stats) "[w]"))))
199 205
200(defun acdw-modeline/winum () 206(defun acdw-modeline/winum ()
201 "Show the `winum' number of the current window in the modeline. 207 "Show the `winum' number of the current window in the modeline.
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index a1558a2..f0a1d49 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el
@@ -465,7 +465,8 @@ probably abandon it at some point for a better solution (see:
465 (save-excursion 465 (save-excursion
466 (save-match-data 466 (save-match-data
467 (widen) 467 (widen)
468 (while (not (org-entry-is-todo-p)) 468 (while (not (or (org-entry-is-todo-p)
469 (org-entry-is-done-p)))
469 ;; TODO: need a better error message 470 ;; TODO: need a better error message
470 (org-previous-visible-heading 1)) 471 (org-previous-visible-heading 1))
471 (org-narrow-to-subtree)))) 472 (org-narrow-to-subtree))))