totally unhelpful commit message

;)
This commit is contained in:
Case Duckworth 2021-10-12 18:40:17 -05:00
parent 244dc53be8
commit 1433a39160
3 changed files with 58 additions and 60 deletions

43
init.el
View File

@ -515,7 +515,12 @@
"Setup eww bookmark integration." "Setup eww bookmark integration."
(setq-local bookmark-make-record-function #'bookmark-eww--make))) (setq-local bookmark-make-record-function #'bookmark-eww--make)))
(:bind "b" #'bookmark-set (:bind "RET" (defun eww/browse-url (arg)
(interactive "P")
(if-let ((url (thing-at-point 'url)))
(browse-url url)
(call-interactively #'acdw/link-hint-open-link)))
"b" #'bookmark-set
"B" #'bookmark-jump "B" #'bookmark-jump
"M-n" nil "M-n" nil
"M-p" nil)) "M-p" nil))
@ -525,6 +530,9 @@
(add-hook 'after-save-hook (add-hook 'after-save-hook
#'executable-make-buffer-file-executable-if-script-p)) #'executable-make-buffer-file-executable-if-script-p))
(setup elec-pair
(electric-pair-mode +1))
(setup files (setup files
(:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t)) (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t))
auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t) auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t)
@ -978,8 +986,7 @@ specific to most general, they are these:
shr-max-width fill-column shr-max-width fill-column
shr-max-image-proportion 0.6 shr-max-image-proportion 0.6
shr-image-animate t shr-image-animate t
shr-discard-aria-hidden t shr-discard-aria-hidden t))
shr-folding-mode t))
(setup text (setup text
(:hook turn-on-auto-fill (:hook turn-on-auto-fill
@ -1235,7 +1242,11 @@ specific to most general, they are these:
lui-fill-remove-face-from-newline nil) lui-fill-remove-face-from-newline nil)
(:hook #'visual-fill-column-mode (:hook #'visual-fill-column-mode
#'visual-line-mode) #'visual-line-mode
#'enable-lui-track)
(:face lui-time-stamp-face
((t :inherit font-lock-comment-face)))
(:local-set visual-fill-column-extra-text-width (:local-set visual-fill-column-extra-text-width
(cons acdw-irc/left-margin 0) (cons acdw-irc/left-margin 0)
@ -1247,9 +1258,7 @@ specific to most general, they are these:
nyan-mode nil nyan-mode nil
line-number-mode nil line-number-mode nil
column-number-mode nil column-number-mode nil
file-percentage-mode nil) file-percentage-mode nil)))
(:hook #'enable-lui-track)))
(setup (:straight (consult (setup (:straight (consult
:host github :host github
@ -1533,6 +1542,7 @@ See also `crux-reopen-as-root-mode'."
(:hook #'reading-mode) (:hook #'reading-mode)
(:local-set shr-max-image-proportion 0.9 (:local-set shr-max-image-proportion 0.9
shr-width nil shr-width nil
shr-max-width nil
fill-column 0) fill-column 0)
;; see https://irreal.org/blog/?p=8885 ;; see https://irreal.org/blog/?p=8885
(:bind "SPC" (defun elfeed-scroll-up-command (&optional arg) (:bind "SPC" (defun elfeed-scroll-up-command (&optional arg)
@ -2293,25 +2303,6 @@ the default is \"/\"."
(:also-load eldoc) (:also-load eldoc)
(eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
;; (setup (:straight paredit)
;; (:bind "DEL" #'paredit-backward-delete
;; "C-<backspace>" #'paredit-backward-kill-word
;; "M-w" #'paredit-copy-as-kill
;; "RET" #'paredit-newline)
;; (:unbind "M-s" ; paredit-splice-sexp
;; "C-j" ; paredit-newline (rebound to RET)
;; )
;; (:hook-into emacs-lisp-mode
;; ielm-mode sly-repl-mode
;; lisp-mode
;; lisp-interaction-mode
;; scheme-mode)
;; (:also-load eldoc)
;; (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
(setup (:straight paren-face) (setup (:straight paren-face)
(:hook-into emacs-lisp-mode (:hook-into emacs-lisp-mode
ielm-mode sly-repl-mode ielm-mode sly-repl-mode

View File

@ -33,13 +33,18 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
(defun acdw-modeline/buffer-name () ; gonsie (defun acdw-modeline/buffer-name () ; gonsie
"Display the buffer name in a face reflecting its modified status." "Display the buffer name in a face reflecting its modified status."
(propertize (concat (format " %-20s" (truncate-string 20 (buffer-name) "~"))) (propertize
'face 'bold (concat
;; (if (buffer-modified-p) (format " %-20s"
;; 'font-lock-warning-face (truncate-string 20
;; 'font-lock-type-face) (string-trim (buffer-name) "*" "*")
'help-echo (or (buffer-file-name) "~")))
(buffer-name)))) 'face 'bold
;; (if (buffer-modified-p)
;; 'font-lock-warning-face
;; 'font-lock-type-face)
'help-echo (or (buffer-file-name)
(buffer-name))))
(defun acdw-modeline/erc () (defun acdw-modeline/erc ()
"ERC indicator for the modeline." "ERC indicator for the modeline."
@ -90,31 +95,32 @@ Otherwise, cdr should be a function that takes two points (see `count-words')."
(defun acdw-modeline/modified () ; modified from `simple-modeline' (defun acdw-modeline/modified () ; modified from `simple-modeline'
"Displays a color-coded buffer modification/read-only "Displays a color-coded buffer modification/read-only
indicator in the mode-line." indicator in the mode-line."
(if (not (string-match-p "\\*.*\\*" (buffer-name))) (let* ((read-only (and buffer-read-only (buffer-file-name)))
(let* ((read-only (and buffer-read-only (buffer-file-name))) (modified (buffer-modified-p)))
(modified (buffer-modified-p))) (propertize
(propertize (concat " "
(concat " " (cond
(cond ((string-match-p "\\*.*\\*" (buffer-name))
((derived-mode-p 'special-mode "*")
'lui-mode) ((derived-mode-p 'special-mode
"~") 'lui-mode)
(read-only "=") "~")
(modified "+") (read-only "=")
(t "-"))) (modified "+")
'help-echo (format (t "-")))
(concat "Buffer is %s and %smodified\n" 'help-echo (format
"mouse-1: Toggle read-only status.") (concat "Buffer is %s and %smodified\n"
(if read-only "read-only" "writable") "mouse-1: Toggle read-only status.")
(if modified "" "not ")) (if read-only "read-only" "writable")
'local-map (purecopy (simple-modeline-make-mouse-map (if modified "" "not "))
'mouse-1 'local-map (purecopy (simple-modeline-make-mouse-map
(lambda (event) 'mouse-1
(interactive "e") (lambda (event)
(with-selected-window (interactive "e")
(posn-window (event-start event)) (with-selected-window
(read-only-mode 'toggle))))) (posn-window (event-start event))
'mouse-face 'mode-line-highlight)))) (read-only-mode 'toggle)))))
'mouse-face 'mode-line-highlight)))
(defun acdw-modeline/narrowed () (defun acdw-modeline/narrowed ()
"Display an indication if the buffer is narrowed." "Display an indication if the buffer is narrowed."
@ -195,7 +201,7 @@ is, if point < mark."
(defun acdw-modeline/wc () (defun acdw-modeline/wc ()
"Display current `wc-buffer-stats'." "Display current `wc-buffer-stats'."
(when (bound-and-true-p wc-mode) (when (bound-and-true-p wc-mode)
(or wc-buffer-stats " [w]"))) (format "%8s" (or (cadr wc-buffer-stats) "[w]"))))
(defun acdw-modeline/winum () (defun acdw-modeline/winum ()
"Show the `winum' number of the current window in the modeline. "Show the `winum' number of the current window in the modeline.

View File

@ -465,7 +465,8 @@ probably abandon it at some point for a better solution (see:
(save-excursion (save-excursion
(save-match-data (save-match-data
(widen) (widen)
(while (not (org-entry-is-todo-p)) (while (not (or (org-entry-is-todo-p)
(org-entry-is-done-p)))
;; TODO: need a better error message ;; TODO: need a better error message
(org-previous-visible-heading 1)) (org-previous-visible-heading 1))
(org-narrow-to-subtree)))) (org-narrow-to-subtree))))