From 5cb7aaba8a170e6e5823355b9081c3e5e6c4d7e8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 00:22:28 -0500 Subject: Remove electric-buffer-list It's buggy or something --- init.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 6eaab7b..be53c2f 100644 --- a/init.el +++ b/init.el @@ -609,11 +609,7 @@ like a dumbass." (mode . gemini-mode) (mode . eww-mode)))))) - (global-set-key (kbd "C-x C-b") - (defun list-buffers-or-ibuffer (arg) - "`list-buffers', or with a prefix arg, `ibuffer'." - (interactive "P") - (if arg (ibuffer) (electric-buffer-list nil)))) + (global-set-key (kbd "C-x C-b") #'ibuffer) (add-hook 'ibuffer-mode-hook (defun ibuffer@filter-to-default () -- cgit 1.4.1-21-gabe81 From df2e4a3650d23eebf05a5ae7b2b3eb4f4b640e77 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 00:22:42 -0500 Subject: Add 'alert Still need to think of how to set it up. --- init.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index be53c2f..7555dad 100644 --- a/init.el +++ b/init.el @@ -1092,6 +1092,11 @@ like a dumbass." (setq ace-link-fallback-function #'ace-link-addr) (global-set-key key #'ace-link))) +(setup (:straight alert) + (:option alert-default-style (acdw/system + (:home 'libnotify) + (_ 'message)))) + (setup (:straight avy) (:global "C-'" avy-goto-char-timer "M-g f" avy-goto-line -- cgit 1.4.1-21-gabe81 From 61777b71bd91965a23ec90aaca670c351f485252 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 00:23:01 -0500 Subject: Comment out all the things (with helpful-mode) --- init.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 7555dad..04abefa 100644 --- a/init.el +++ b/init.el @@ -1421,7 +1421,7 @@ successive invocations." (setup (:straight helpful) (:option helpful-max-buffers 5 - helpful-switch-buffer-function #'pop-to-buffer + ;; helpful-switch-buffer-function #'pop-to-buffer ;; helpful-switch-buffer-function ;; (lambda (buf) ;; (pop-to-buffer buf @@ -1435,13 +1435,14 @@ successive invocations." " k" helpful-key " o" helpful-symbol "C-c C-d" helpful-at-point) - (with-eval-after-load 'helpful - (define-key helpful-mode-map "q" - (defun helpful-mode|quit () - (interactive) - (bury-buffer) - (unless (window-parameter (frame-selected-window) 'no-other-window) - (delete-window)))))) + ;; (with-eval-after-load 'helpful + ;; (define-key helpful-mode-map "q" + ;; (defun helpful-mode|quit () + ;; (interactive) + ;; (bury-buffer) + ;; (unless (window-parameter (frame-selected-window) 'no-other-window) + ;; (delete-window))))) + ) (setup (:straight iscroll) (:hook-into text-mode)) -- cgit 1.4.1-21-gabe81 From 47df2733de3f5e5ba8384cc4e11a31235a9cfc5b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 00:23:56 -0500 Subject: Buttonize major mode in modeline --- init.el | 2 +- lisp/acdw-modeline.el | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 04abefa..e174823 100644 --- a/init.el +++ b/init.el @@ -1700,7 +1700,7 @@ successive invocations." acdw-modeline/winum acdw-modeline/minions acdw-modeline/narrowed - simple-modeline-segment-major-mode))) + acdw-modeline/major-mode))) ;; I've put in a pull request to add the (- 0 right-margin) bit here. (advice-add 'simple-modeline--format :override diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 5784148..00eb056 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -40,7 +40,35 @@ (defun acdw-modeline/god-mode-indicator () "Display an indicator if `god-local-mode' is active." (when (bound-and-true-p god-local-mode) - " God")) + " Ω")) + +(defun acdw-modeline/major-mode () + "Displays the current major mode in the mode-line." + (propertize + (concat " " + (or (and (boundp 'delighted-modes) + (cadr (assq major-mode delighted-modes))) + (format-mode-line mode-name))) + 'face 'bold + 'keymap mode-line-major-mode-keymap + 'mouse-face 'mode-line-highlight)) + +(defun acdw-modeline/minions () ; by me + "Display a button for `minions-minor-modes-menu'." + (concat + " " + (propertize + "&" + 'help-echo (format + "Minor modes menu\nmouse-1: show menu.") + 'local-map (purecopy (simple-modeline-make-mouse-map + 'mouse-1 + (lambda (event) + (interactive "e") + (with-selected-window (posn-window + (event-start event)) + (minions-minor-modes-menu))))) + 'mouse-face 'mode-line-highlight))) (defun acdw-modeline/modified () ; modified from `simple-modeline' "Displays a color-coded buffer modification/read-only -- cgit 1.4.1-21-gabe81 From 782cc6e31b08d73dfe4b0770f0cf6a20fc9d9859 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 23:08:17 -0500 Subject: Change to circe --- init.el | 76 ++++++++++++++++++++++++++++++++++++++++++++-- lisp/acdw-irc.el | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ lisp/acdw-modeline.el | 5 +++ 3 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 lisp/acdw-irc.el (limited to 'init.el') diff --git a/init.el b/init.el index e174823..5ab1559 100644 --- a/init.el +++ b/init.el @@ -323,6 +323,7 @@ (:option erc-auto-discard-away t + erc-auto-set-away t erc-autoaway-idle-seconds 600 erc-autoaway-message "BRB (autoaway: %i seconds)" erc-button-url-regexp browse-url-button-regexp @@ -333,7 +334,7 @@ erc-fill-static-center 14 erc-format-nick-function #'erc-format-truncate-@nick erc-header-line-face-method #'erc/update-header-line-show-disconnected - erc-hide-list '("NICK" "MODE" "JOIN" "PART" "QUIT") + erc-hide-list '("NICK" "MODE" "JOIN" "PART" "QUIT" "AWAY") erc-interpret-controls-p t erc-interpret-mirc-color t erc-join-buffer 'bury @@ -353,7 +354,9 @@ erc-server-coding-system '(utf-8 . utf-8) erc-timestamp-intangible t erc-track-exclude-types (append erc-hide-list - '("AWAY" + '("AWAY" ; for some reason this triggers + ; track anyway... so it's in + ; `erc-hide-list' "353" "324" "329" "332" "333" "477")) erc-track-exclude-server-buffer t erc-track-position-in-mode-line 'before-modes @@ -1109,6 +1112,74 @@ like a dumbass." (setup (:straight (beginend)) (beginend-global-mode +1)) +(setup (:straight circe) + (require 'circe) + (require 'acdw-irc) + + (setq acdw-irc/post-my-nick "-> ") + + (setq circe-default-part-message "See You, Space Cowpokes . . ." + circe-highlight-nick-type 'all + ;; circe-network-options in private.el + circe-reduce-lurker-spam t + circe-server-auto-join-default-type :after-auth) + + (add-hook 'circe-chat-mode-hook + (defun circe-chat@setup () + (lui-set-prompt + (concat (propertize (acdw-irc/margin-format (buffer-name) + "" + ">") + 'face 'circe-prompt-face + 'read-only t 'intangible t + 'cursor-intangible t) + " ")) + (enable-circe-color-nicks) + (enable-circe-display-images) + (enable-circe-new-day-notifier))) + + (setq circe-format-say (format "%s%s%d%s%s%s" + acdw-irc/pre-nick + "{nick:" + (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-nick) + (length acdw-irc/post-nick))) + "s} " + acdw-irc/post-nick + "{body}") + circe-format-self-say (format "%s%s%d%s%s%s" + acdw-irc/pre-my-nick + "{nick:" + (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-my-nick) + (length acdw-irc/post-my-nick))) + "s} " + acdw-irc/post-my-nick + "{body}") + circe-format-action (concat "*" + (repeat-string (- acdw-irc/left-margin 3) + " ") + "* {nick} {body}") + circe-format-self-action (concat "-*" + (repeat-string (- acdw-irc/left-margin 4) + " ") + "* {nick} {body}") + lui-fill-type (concat + (repeat-string (- acdw-irc/left-margin 2) + " ") + " ")) + + (setq lui-time-stamp-position 'right-margin + lui-time-stamp-format "%H:%M") + (add-hook 'lui-mode-hook + (defun lui-mode@setup () + (setq right-margin-width 5 + scroll-margin 0 + fringes-outside-margins t + word-wrap t + wrap-prefix (repeat-string + (1+ acdw-irc/left-margin) " "))))) + (setup (:straight (consult :host github :repo "minad/consult")) @@ -1696,6 +1767,7 @@ successive invocations." acdw-modeline/wc acdw-modeline/text-scale simple-modeline-segment-process + acdw-modeline/track acdw-modeline/god-mode-indicator acdw-modeline/winum acdw-modeline/minions diff --git a/lisp/acdw-irc.el b/lisp/acdw-irc.el new file mode 100644 index 0000000..193275c --- /dev/null +++ b/lisp/acdw-irc.el @@ -0,0 +1,84 @@ +;;; acdw-irc.el -*- lexical-binding: t; coding: utf-8-unix -*- + +(require 's nil :noerror) + +(defgroup acdw-irc nil + "Customizations for IRC." + :group 'applications) + +(defcustom acdw-irc/left-margin 16 + "The size of the margin for nicks, etc. on the left." + :type 'integer) + +(defcustom acdw-irc/pre-nick "" + "What to show before a nick." + :type 'string) + +(defcustom acdw-irc/post-nick " | " + "What to show after a nick." + :type 'string) + +(defcustom acdw-irc/pre-my-nick "-" + "What to show before the current user's nick." + :type 'string) + +(defcustom acdw-irc/post-my-nick "-> " + "What to show after the current user's nick." + :type 'string) + +(defcustom acdw-irc/ellipsis "~" + "The ellipsis for when a string is too long." + :type 'string) + + +;;; Convenience functions (I don't want to /depend/ on s.el) + +(if (fboundp 's-repeat) + (defalias 'repeat-string 's-repeat) + (defun repeat-string (num s) + "Make a string of STR repeated NUM times. +Stolen from s.el." + (declare (pure t) (side-effect-free t)) + (let (ss) + (while (> num 0) + (setq ss (cons str ss) + num (1- num))) + (apply #'concat ss)))) + +(if (fboundp 's-truncate) + (defalias 'truncate-string 's-truncate) + (defun truncate-string (len s &optional ellipsis) + "If STR is longer than LEN, cut it down and add ELLIPSIS to the end. +When not specified, ELLIPSIS defaults to '...'." + (declare (pure t) (side-effect-free t)) + (unless ellipsis + (setq ellipsis "...")) + (if (> (length s) len) + (format "%s%s" (substring s 0 (- len (length ellipsis))) ellipsis) + s))) + + +;;; IRC stuff + +(defun acdw-irc/margin-format (str &optional before after alignment) + "Print STR to fit in `acdw-irc/left-margin'. +Optional arguments BEFORE and AFTER specify strings to go +... before and after the string. ALIGNMENT aligns left on nil +and right on t." + (let* ((before (or before "")) + (after (or after "")) + (str-length (length str)) + (before-length (length before)) + (after-length (length after)) + (max-length (- acdw-irc/left-margin 1 (+ before-length after-length))) + (left-over (max 0 (- max-length str-length)))) + (format "%s%s%s%s%s" + before + (if alignment (repeat-string left-over " ") "") + (truncate-string max-length str acdw-irc/ellipsis) + (if alignment "" (repeat-string left-over " ")) + after))) + + +(provide 'acdw-irc) +;;; acdw-irc.el ends here diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index df2811f..6a11418 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -155,6 +155,11 @@ is, if point < mark." " (%-d)") text-scale-mode-amount))) +(defun acdw-modeline/track () + "Display `tracking-mode' information." + (when tracking-mode + tracking-mode-line-buffers)) + (defun acdw-modeline/vc-branch () "Display the version control branch of the current buffer in the modeline." ;; from https://www.gonsie.com/blorg/modeline.html, from Doom -- cgit 1.4.1-21-gabe81 From 66fde316d31605bcd5dad42c0c7caa6c355f1a56 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 23:09:15 -0500 Subject: Fancify browse-url-set-handlers --- init.el | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 5ab1559..4de92d4 100644 --- a/init.el +++ b/init.el @@ -81,15 +81,31 @@ browse-url-firefox-new-window-is-tab t) (acdw/browse-url-set-handlers - `(("\\.jpe?g\\'" . ,(if (executable-find "feh") - #'browse-url-feh - #'eww-browse-url)) - ("youtube\\.com\\|youtu\\.be" . ,(if (executable-find "mpv") - #'browse-url-mpv - #'eww-browse-url)) - ("google\\.com" . browse-url-default-browser) - ("\\(twitter\\.com\\|t\\.co\\)" . acdw/eww-browse-twitter-url) - ("." . eww-browse-url))) + (list + (cons (rx (seq "." (or "jpeg" "jpg" ; images + "png") + eos)) + (lambda (&rest args) + (apply (if (executable-find "feh") + #'browse-url-feh + #'eww-browse-url) + args))) + (cons (rx (or "youtube.com" ; videos + "youtu.be" + (seq "." (or "mp4" + "gif") + eos))) + (lambda (&rest args) + (apply (if (executable-find "mpv") + #'browse-url-mpv + browse-url-secondary-browser-function) + args))) + (cons (rx (or "google.com" ; websites that don't work with eww + "reddit.com" + "twitter.com")) + browse-url-secondary-browser-function) + (cons "." ; everything else + #'eww-browse-url))) ;; Buttonize gemini:// links. (acdw/add-button-url-regexp-protocol "gemini")) -- cgit 1.4.1-21-gabe81 From 58f6e3c968d526aa90952b5ef58983740c915914 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 29 Aug 2021 10:37:02 -0500 Subject: Change circe nick formatting --- init.el | 72 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 4de92d4..08f3381 100644 --- a/init.el +++ b/init.el @@ -1154,47 +1154,47 @@ like a dumbass." (enable-circe-display-images) (enable-circe-new-day-notifier))) - (setq circe-format-say (format "%s%s%d%s%s%s" - acdw-irc/pre-nick - "{nick:" - (- acdw-irc/left-margin 1 - (+ (length acdw-irc/pre-nick) - (length acdw-irc/post-nick))) - "s} " - acdw-irc/post-nick - "{body}") - circe-format-self-say (format "%s%s%d%s%s%s" - acdw-irc/pre-my-nick - "{nick:" - (- acdw-irc/left-margin 1 - (+ (length acdw-irc/pre-my-nick) - (length acdw-irc/post-my-nick))) - "s} " - acdw-irc/post-my-nick - "{body}") - circe-format-action (concat "*" - (repeat-string (- acdw-irc/left-margin 3) - " ") - "* {nick} {body}") - circe-format-self-action (concat "-*" - (repeat-string (- acdw-irc/left-margin 4) - " ") - "* {nick} {body}") - lui-fill-type (concat - (repeat-string (- acdw-irc/left-margin 2) - " ") - " ")) + (let ((len (number-to-string (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-nick) + (length acdw-irc/post-nick))))) + (my-len (number-to-string (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-my-nick) + (length acdw-irc/post-my-nick)))))) + (setq circe-format-say (concat acdw-irc/pre-nick + "{nick:" len "." len "s} " + acdw-irc/post-nick + "{body}") + circe-format-self-say (concat acdw-irc/pre-my-nick + "{nick:" my-len "." my-len "s} " + acdw-irc/post-my-nick + "{body}") + circe-format-action (concat "*" + (repeat-string + (- acdw-irc/left-margin 3) + " ") + "* {nick} {body}") + circe-format-self-action (concat "-*" + (repeat-string + (- acdw-irc/left-margin 4) + " ") + "* {nick} {body}") + lui-fill-type (concat + (repeat-string (- acdw-irc/left-margin 2) + " ") + " "))) (setq lui-time-stamp-position 'right-margin lui-time-stamp-format "%H:%M") (add-hook 'lui-mode-hook (defun lui-mode@setup () - (setq right-margin-width 5 - scroll-margin 0 - fringes-outside-margins t - word-wrap t - wrap-prefix (repeat-string - (1+ acdw-irc/left-margin) " "))))) + (setq-local fringes-outside-margins t + lui-track-bar-behavior 'before-switch-to-buffer + right-margin-width 5 + scroll-margin 0 + word-wrap t + wrap-prefix (repeat-string + (1+ acdw-irc/left-margin) " ")) + (enable-lui-track-bar)))) (setup (:straight (consult :host github -- cgit 1.4.1-21-gabe81 From 33afd74544b69900435746be987990e5d60b03dd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 29 Aug 2021 10:37:15 -0500 Subject: Properly detect edit-server frames --- init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 08f3381..d075bef 100644 --- a/init.el +++ b/init.el @@ -1351,7 +1351,10 @@ like a dumbass." (when (and (daemonp) (require 'edit-server nil :noerror)) (edit-server-start) - (add-hook 'edit-server-done-hook #'unfill-buffer))) + + (advice-add 'edit-server-make-frame :before + (defun edit-server@set-a-variable (&rest _) + (setq edit-server-frame-p t))))) (setup (:straight (electric-cursor :host github @@ -2026,7 +2029,7 @@ call `zzz-to-char'." (add-hook 'after-make-frame-functions (defun after-make-frame@maximize (frame) - (unless (or edit-server-edit-mode) + (unless (bound-and-true-p edit-server-frame-p) (toggle-frame-maximized frame))))) ;;;; Work -- cgit 1.4.1-21-gabe81 From 866870ca2abc735b07b65d31b8c83290e574dfcd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 29 Aug 2021 10:37:28 -0500 Subject: Add markdown-mode --- init.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index d075bef..b089cda 100644 --- a/init.el +++ b/init.el @@ -1584,6 +1584,8 @@ successive invocations." (acdw/sunrise-sunset #'modus-themes-load-operandi #'modus-themes-load-vivendi)) +(setup (:straight markdown-mode)) + (setup (:straight mwim) (:global "C-a" mwim-beginning "C-e" mwim-end)) -- cgit 1.4.1-21-gabe81 From a7031b6da3cdb2551fd4077b2a954c62eeb705ea Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 30 Aug 2021 08:51:21 -0500 Subject: Add toggle bindings --- init.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index b089cda..e17687f 100644 --- a/init.el +++ b/init.el @@ -169,8 +169,7 @@ ("Variables" "^\\(?:Show Value\\|Hide\\) \\([^:\n]*\\)" 1)))))) (setup debugger - (:hook visual-line-mode) - (:global "C-c d" toggle-debug-on-error)) + (:hook visual-line-mode)) (setup dired (setq-default dired-recursive-copies 'always @@ -1033,13 +1032,24 @@ like a dumbass." "C-c c" capitalize-dwim "C-c u" upcase-dwim "C-c l" downcase-dwim - "C-c t" acdw/insert-iso-date) + "C-c d" acdw/insert-iso-date + "M-`" nil) + + ;; toggle bindings + (defvar toggle-map (make-sparse-keymap) + "A keymap for toggling!") + (global-set-key (kbd "C-c t") toggle-map) + + (:with-map toggle-map + (:bind "c" column-number-mode + "l" display-line-numbers-mode + "d" toggle-debug-on-error)) (defalias 'forward-word-with-case 'forward-word "Alias for `forward-word' for use in `case-repeat-map'.") (defalias 'backward-word-with-case 'backward-word "Alias for `backward-word for use in `case-repeat-map'.") - + (defvar case-repeat-map (let ((map (make-sparse-keymap))) (define-key map "c" #'capitalize-word) @@ -1050,6 +1060,7 @@ like a dumbass." (define-key map "b" #'backward-word-with-case) map) "A map to repeat word-casing commands. For use with `repeat-mode'.") + (dolist (command '(capitalize-word capitalize-dwim upcase-word -- cgit 1.4.1-21-gabe81 From 8e3d3480f13c986397ef33fb5651557882b91f29 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 30 Aug 2021 08:51:46 -0500 Subject: Make mastodon-mode better --- init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index e17687f..aaa6c13 100644 --- a/init.el +++ b/init.el @@ -1020,8 +1020,7 @@ like a dumbass." kill-read-only-ok t load-prefer-newer t native-comp-async-report-warnings-errors nil - set-mark-command-repeat-pop t - ) + set-mark-command-repeat-pop t) (when (fboundp 'command-completion-default-include-p) (setq read-extended-command-predicate @@ -1118,6 +1117,8 @@ like a dumbass." (define-key gnus-article-mode-map key #'ace-link-gnus)) (with-eval-after-load 'ert (define-key ert-results-mode-map "o" #'ace-link-help)) + (with-eval-after-load 'mastodon + (define-key mastodon-mode-map "o" #'ace-link-addr)) ;; And still everything else (setq ace-link-fallback-function #'ace-link-addr) (global-set-key key #'ace-link))) @@ -1579,7 +1580,9 @@ successive invocations." (:straight request) (:option mastodon-instance-url "https://writing.exchange" mastodon-auth-source-file (car auth-sources) - mastodon-client--token-file (acdw/dir "mastodon.plstore"))) + mastodon-client--token-file (acdw/dir "mastodon.plstore")) + (:hook hl-line-mode + olivetti-mode)) (setup (:straight (modus-themes :host gitlab -- cgit 1.4.1-21-gabe81 From ce5f177d5926387eef92127390889aae96a4b66f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 30 Aug 2021 08:51:54 -0500 Subject: Add persistent-scratch --- init.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index aaa6c13..e4b87ab 100644 --- a/init.el +++ b/init.el @@ -1780,6 +1780,11 @@ successive invocations." (dolist (mode lispy-modes) (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode))) +(setup (:straight persistent-scratch) + (:option persistent-scratch-backup-directory (acdw/dir "scratch" t) + persistent-scratch-keep-n-newest-backups 12)) +(persistent-scratch-setup-default)) + (setup (:straight restart-emacs) (defun emacs-upgrade (&optional update-packages) "Pull config, upgrade packages, restart Emacs." -- cgit 1.4.1-21-gabe81 From c1921f7238de60d33b0655c65b179977f7ab973a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 30 Aug 2021 08:54:30 -0500 Subject: Delete commented flyspell blocks It ... /just works/ ??? --- init.el | 68 ----------------------------------------------------------------- 1 file changed, 68 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index e4b87ab..74f3258 100644 --- a/init.el +++ b/init.el @@ -505,74 +505,6 @@ like a dumbass." (define-key flyspell-mode-map (kbd (car keybind)) (cdr keybind)))))) -;; (setup flyspell -;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae -;; ;; in short: -;; ;; - download hunspell from GitHub and put in ~/usr/bin -;; ;; - download LibreOffice English dictionaries and put in -;; ;; ~/usr/share/hunspell -;; (setq-default -;; flyspell-issue-message-flag nil -;; ispell-program-name "hunspell" -;; ispell-dictionary "default" -;; ispell-personal-dictionary "~/.hunspell_personal" -;; ispell-local-dictionary-alist '(("default" -;; "[[:alpha:]]" "[^[:alpha:]]" -;; "[']" nil -;; ("-d" "en_US") nil utf-8))) - -;; (acdw/system -;; (:work (let ((dicpath (expand-file-name "~/usr/share/hunspell/"))) -;; (setenv "DICPATH" dicpath)))) - -;; ;; new variable `ispell-hunspell-dictionary-alist' is defined in Emacs -;; ;; If it's nil, Emacs tries to automatically set up the dictionaries. -;; (when (boundp 'ispell-hunspell-dictionary-alist) -;; (setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist)) - -;; (:needs ispell-program-name) ; don't proceed if not installed - -;; (unless (file-exists-p ispell-personal-dictionary) -;; (write-region "" nil ispell-personal-dictionary nil 0)) - -;; (when (executable-find ispell-program-name) -;; (add-hook 'text-mode-hook #'flyspell-mode) -;; (add-hook 'prog-mode-hook #'flyspell-prog-mode)) - -;; (:when-loaded -;; (setup (:straight flyspell-correct) -;; (:with-map flyspell-mode-map -;; (:bind "C-;" flyspell-correct-wrapper -;; ;; Remove all other binds -;; "C-," nil -;; "C-." nil -;; "C-M-i" nil))))) - -;; (setup flyspell -;; (:option -;; flyspell-issue-message-flag nil -;; ispell-program-name "aspell" -;; ispell-dictionary "en_US" -;; ispell-personal-dictionary "~/.dictionary" -;; ispell-extra-args '("--sug-mode=ultra" "--lang=en_US")) - -;; (:needs ispell-program-name) - -;; (unless (file-exists-p ispell-personal-dictionary) -;; (write-region "" nil ispell-personal-dictionary nil 0)) - -;; (add-hook 'text-mode-hook #'flyspell-mode) -;; (add-hook 'prog-mode-hook #'flyspell-prog-mode) - -;; (:when-loaded -;; (setup (:straight flyspell-correct) -;; (:with-map flyspell-mode-map -;; (:bind "C-;" flyspell-correct-wrapper -;; ;; Remove other binds -;; "C-," nil -;; "C-." nil -;; "C-M-i" nil))))) - (setup frames (:option frame-title-format '("%b@" (:eval -- cgit 1.4.1-21-gabe81