From 9ce0660678bb8610c5d6f0ef36478ae00332e401 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 15 Apr 2021 23:23:32 -0500 Subject: Enable lexical-binding by default --- init.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.el b/init.el index 554f7e4..dc3062e 100644 --- a/init.el +++ b/init.el @@ -15,6 +15,10 @@ ;; - Make good choices. ;;; Code: + +;; Let's use lexical binding by default, shall we? +(setq lexical-binding t) + ;;; Necessary packages -- cgit 1.4.1-21-gabe81 From 47b7185d7d39d5cae0ba10a1c9608da6f94fb3ca Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 15 Apr 2021 23:23:50 -0500 Subject: Try to fix vertico et al --- init.el | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/init.el b/init.el index dc3062e..624af37 100644 --- a/init.el +++ b/init.el @@ -571,28 +571,24 @@ call `zzz-to-char'." (global-undo-fu-session-mode +1)) -;; (setup (:straight icomplete-vertical) -;; (:with-map icomplete-minibuffer-map -;; (:bind "" icomplete-forward-completions -;; "C-n" icomplete-forward-completions -;; "" icomplete-backward-completions -;; "C-p" icomplete-backward-completions -;; "C-v" icomplete-vertical-toggle -;; "RET" icomplete-force-complete-and-exit -;; "C-RET" minibuffer-complete-and-exit)) -;; (icomplete-vertical-mode +1)) - -(setup (:straight vertico) - (if (bound-and-true-p comp-deferred-compilation-deny-list) - (add-to-list 'comp-deferred-compilation-deny-list 'vertico)) +(if (boundp 'comp-deferred-compilation-deny-list) + (add-to-list 'comp-deferred-compilation-deny-list "vertico")) +(setup (:straight (vertico + :host github + :repo "minad/vertico")) + (setq resize-mini-windows t) (icomplete-mode -1) - (icomplete-vertical-mode -1) (vertico-mode +1)) -(setup (:straight orderless) +(setup (:straight (orderless + :host github + :repo "oantolin/orderless")) + (require 'orderless) (:option (prepend completion-styles) 'orderless)) -(setup (:straight consult) +(setup (:straight (consult + :host github + :repo "minad/consult")) ;; "Sensible" functions (defun consult-sensible-grep () -- cgit 1.4.1-21-gabe81 From 8e1f66e0e472ae8422eb544160e8d82c3de7c86b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 15 Apr 2021 23:23:58 -0500 Subject: Don't add a space after slime company completion --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 624af37..5fafdc6 100644 --- a/init.el +++ b/init.el @@ -817,7 +817,7 @@ if ripgrep is installed, otherwise `consult-grep'." (with-eval-after-load 'company (setup (:straight slime-company) (:option slime-company-completion 'fuzzy - slime-company-after-completion 'slime-company-just-one-space) + slime-company-after-completion nil) (slime-setup '(slime-fancy slime-company)))))) (when (executable-find "fennel") -- cgit 1.4.1-21-gabe81 From 014c37dc776c9a118c355dddd05029026cce31b2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 19:03:52 -0500 Subject: set lexical-binding by default --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 5fafdc6..e9cfe82 100644 --- a/init.el +++ b/init.el @@ -17,7 +17,7 @@ ;;; Code: ;; Let's use lexical binding by default, shall we? -(setq lexical-binding t) +(setq-default lexical-binding t) ;;; Necessary packages -- cgit 1.4.1-21-gabe81 From c864c0d4d73f27c71ab78d0c83f196f37185233e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 23:01:42 -0500 Subject: Re-organize org settings --- init.el | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/init.el b/init.el index e9cfe82..8bdc2c4 100644 --- a/init.el +++ b/init.el @@ -359,28 +359,30 @@ (setup (:straight (org :host nil :repo "https://code.orgmode.org/bzg/org-mode.git")) (require 'acdw-org) - (:option org-directory "~/org" - org-hide-emphasis-markers t - org-fontify-whole-heading-line t - org-fontify-done-headline t - org-fontify-quote-and-verse-blocks t - org-src-fontify-natively t - org-pretty-entities t - org-tags-column (- 0 fill-column -3) - org-src-tab-acts-natively t - org-src-window-setup 'current-window - org-confirm-babel-evaluate nil - org-adapt-indentation nil + (:option org-adapt-indentation nil org-catch-invisible-edits 'smart - org-special-ctrl-a/e t - org-special-ctrl-k t - org-imenu-depth 3 + org-confirm-babel-evaluate nil + org-export-coding-system 'utf-8-unix org-export-headline-levels 8 + org-export-with-section-numbers nil org-export-with-smart-quotes t org-export-with-sub-superscripts t - org-export-coding-system 'utf-8-unix + org-export-with-toc nil + org-fontify-done-headline t + org-fontify-quote-and-verse-blocks t + org-fontify-whole-heading-line t + org-hide-emphasis-markers t org-html-coding-system 'utf-8-unix - org-startup-truncated nil) + org-imenu-depth 3 + org-pretty-entities t + org-special-ctrl-a/e t + org-special-ctrl-k t + org-src-fontify-natively t + org-src-tab-acts-natively t + org-src-window-setup 'current-window + org-startup-truncated nil + org-tags-column (- 0 fill-column -3) + org-directory "~/org") (:bind "RET" unpackaged/org-return-dwim) (add-hook 'before-save-hook #'acdw/hook--org-mode-fix-blank-lines) (advice-add 'org-delete-backward-char :override #'acdw-org/delete-backward-char)) -- cgit 1.4.1-21-gabe81 From 6607720854a1f82e016aa14e5668070d1f693e04 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 23:01:54 -0500 Subject: Autoload `elpher-bookmarks' --- init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/init.el b/init.el index 8bdc2c4..d62798c 100644 --- a/init.el +++ b/init.el @@ -439,6 +439,7 @@ "o" elpher-follow-current-link "G" elpher-go-current) (:hook acdw/reading-mode) + (autoload 'elpher-bookmarks "elpher" nil t) ;; Make `eww' gemini/gopher aware. From Emacswiki. (advice-add 'eww-browse-url :around (defun elpher:eww-browse-url (original url &optional new-window) -- cgit 1.4.1-21-gabe81 From c1f0a14b8f751284c415ff2c8ee39c34fc370bb5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 23:02:11 -0500 Subject: Reorganize magit settings --- init.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/init.el b/init.el index d62798c..8edb672 100644 --- a/init.el +++ b/init.el @@ -486,11 +486,14 @@ (setup (:straight magit) (:leader "g" magit-status) - (:option magit-display-buffer-function - (defun magit-display-buffer-same-window (buffer) - "Display BUFFER in the selected window like God intended." - (display-buffer buffer '(display-buffer-same-window))) - magit-popup-display-buffer-action '((display-buffer-same-window)))) + + (defun magit-display-buffer-same-window (buffer) + "Display BUFFER in the selected window like God intended." + (display-buffer buffer '(display-buffer-same-window))) + + (:option magit-display-buffer-function #'magit-display-buffer-same-window + magit-popup-display-buffer-action '((display-buffer-same-window)) + magit-refresh-status-buffer nil)) (setup (:straight nov) (:option nov-text-width fill-column) -- cgit 1.4.1-21-gabe81 From 44a6df13ce4a9259a47bbb1a6be5e857d9b9b0f8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 23:02:23 -0500 Subject: Consolidate home apps --- init.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.el b/init.el index 8edb672..731e363 100644 --- a/init.el +++ b/init.el @@ -501,9 +501,8 @@ (when (eq acdw/system :home) (setup (:straight pdf-tools) - (pdf-loader-install))) + (pdf-loader-install)) -(when (eq acdw/system :home) (setup (:straight vterm))) -- cgit 1.4.1-21-gabe81 From 1b652a2ec828757aa63805fb5fc4bb2cc4b0b4c7 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 17 Apr 2021 23:02:38 -0500 Subject: Switch out company for corfu Corfu is like, alpha software, but it already seems pretty useful for what I need. --- init.el | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/init.el b/init.el index 731e363..4134eb8 100644 --- a/init.el +++ b/init.el @@ -747,18 +747,17 @@ if ripgrep is installed, otherwise `consult-grep'." (apheleia--get-formatter-command))) (indent-region (point-min) (point-max))))) -(setup (:straight company) - (:hook-into prog-mode) - (:hook company-tng-mode) - - (if (eq acdw/system :home) - (setq company-idle-delay 0.25) - (setq company-idle-delay nil)) - - (:global "M-/" company-complete) - (:with-map company-active-map - (:bind "C-d" company-show-doc-buffer - "M-." company-show-location))) +(setup (:straight (corfu + :host github + :repo "minad/corfu")) + (:option completion-cycle-threshold 3 + tab-always-indent 'complete + corfu-cycle t) + (:with-map corfu-map + (:bind "TAB" corfu-next + "S-TAB" corfu-previous)) + (:hook-into prog-mode + eshell-mode)) ;;; Lisps (defvar lispy-modes '(emacs-lisp-mode -- cgit 1.4.1-21-gabe81 From 46579be1fbacdfd58820b4f43f29b292acc6c048 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 00:21:12 -0500 Subject: Attempt to further speed up init --- early-init.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/early-init.el b/early-init.el index 9711df3..412a2c9 100644 --- a/early-init.el +++ b/early-init.el @@ -30,7 +30,8 @@ (setq load-prefer-newer noninteractive orig-file-name-handler-alist file-name-handler-alist - file-name-handler-alist nil) + file-name-handler-alist nil + inhibit-x-resources t) (acdw/gc-disable) (hook-defun post-init-reset after-init-hook @@ -110,7 +111,8 @@ package-quickstart nil straight-host-usernames '((github . "duckwork") (gitlab . "acdw")) - straight-base-dir (acdw/dir)) + straight-base-dir (acdw/dir) + straight-check-for-modifications '(check-on-save find-when-checking)) ;; 3. Bootstrap `straight'. (defvar bootstrap-version) -- cgit 1.4.1-21-gabe81 From b140de36baea753490cc87fa179016af2e6d2e44 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 00:21:22 -0500 Subject: Enable minibuffer-electric-default-mode --- init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/init.el b/init.el index 4134eb8..d89c320 100644 --- a/init.el +++ b/init.el @@ -148,6 +148,7 @@ (minibuffer-depth-indicate-mode +1) (file-name-shadow-mode +1) + (minibuffer-electric-default-mode +1) (fset 'yes-or-no-p #'y-or-n-p) ;; Completion -- cgit 1.4.1-21-gabe81 From 48396d9888cfd51cbfafced85e7e4f0df3d96705 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 00:21:36 -0500 Subject: Lower echo-keystrokes timeout --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index d89c320..4898d1a 100644 --- a/init.el +++ b/init.el @@ -188,7 +188,7 @@ tab-bar-show 1 use-dialog-box nil use-file-dialog nil - echo-keystrokes 0.25 + echo-keystrokes 0.01 recenter-positions '(top middle bottom) attempt-stack-overflow-recovery nil attempt-orderly-shutdown-on-fatal-signal nil -- cgit 1.4.1-21-gabe81 From 9259da2345f2d4e5282151e312113f8776f9ae0c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 08:24:46 -0500 Subject: Begin again with Gnus --- gnus.el | 45 +++++++++++++++++++++++++++++++++++++++++++++ init.el | 7 +++++++ 2 files changed, 52 insertions(+) create mode 100644 gnus.el diff --git a/gnus.el b/gnus.el new file mode 100644 index 0000000..d211f70 --- /dev/null +++ b/gnus.el @@ -0,0 +1,45 @@ +;;; gnus.el -*- lexical-binding: t; coding: utf-8-unix -*- + +;; Author: Case Duckworth +;; Created: Sometime during Covid-19, 2020 +;; Keywords: configuration +;; URL: https://tildegit.org/acdw/emacs + +;; This file is NOT part of GNU Emacs. + +;;; License: +;; Everyone is permitted to do whatever with this software, without +;; limitation. This software comes without any warranty whatsoever, +;; but with two pieces of advice: +;; - Don't hurt yourself. +;; - Make good choices. + +;;; Code: + +;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org + +;; searching (?) +(require 'nnir) + +;; contacts +(setup (:straight bbdb) + (require 'bbdb) + (bbdb-initialize 'message 'gnus 'sendmail) + (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) + (:option bbdb/mail-auto-create-p t + bbdb/news-auto-create-p t)) + +;; select methods +(setq gnus-select-method '(nnimap "fastmail" + (nnimap-address "imap.fastmail.com") + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnir-search-engine imap))) + +;; options +(setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date + (not gnus-thread-sort-by-number)) + gnus-use-cache t + gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject + gnus-thread-hide-subtree t + gnus-thread-ignore-subject t) diff --git a/init.el b/init.el index 4898d1a..862a2e2 100644 --- a/init.el +++ b/init.el @@ -500,6 +500,13 @@ (:option nov-text-width fill-column) (:mode "\\.epub\\'")) +(setup gnus + (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) + gnus-directory (expand-file-name "gnus/News" user-emacs-directory) + gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) + (when (not (file-exists-p gnus-directory)) + (make-directory gnus-directory :parents))) + (when (eq acdw/system :home) (setup (:straight pdf-tools) (pdf-loader-install)) -- cgit 1.4.1-21-gabe81 From 8a99f1b7225e87fb236ef9813e3432dc17d877d5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 08:26:55 -0500 Subject: Sort .gitignore and add gnus/ --- .gitignore | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8de33a1..86a0ae2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ +*~ .org-id-locations -eln-cache/ auto-save-list/ -server/ -var/ +eln-cache/ etc/ +gnus/ +racket-mode/ +server/ straight/ transient/ -racket-mode/ -*~ \ No newline at end of file +var/ \ No newline at end of file -- cgit 1.4.1-21-gabe81 From cdaaee1a1dea3aaf7857f3087b940a729f0769c9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 12:31:52 -0500 Subject: Fix `:mode' keyword in `setup' --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 862a2e2..febe047 100644 --- a/init.el +++ b/init.el @@ -51,7 +51,7 @@ (setup-define :mode (lambda (ext) - `(add-to-list 'auto-mode-alist '(,ext . setup-mode))) + `(add-to-list 'auto-mode-alist (cons ,ext setup-mode))) :documentation "Add SETUP-MODE to `auto-mode-alist' for EXTENSION." :repeatable t) -- cgit 1.4.1-21-gabe81 From 6e6f95570bf255794292d50a7be005db2944de5b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 12:32:21 -0500 Subject: Fix clipboard pasting non-ASCII characters ... at least on Windows. Solution found here: https://emacs.stackexchange.com/questions/22727/pasting-text-from-clipboard-why-m-instead-of-linebreaks Other resources: https://emacs.stackexchange.com/questions/22727/pasting-text-from-clipboard-why-m-instead-of-linebreaks https://goyoambrosio.com/2018/06/Dealing-with-utf-8-in-Emacs/ --- init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index febe047..d7829c3 100644 --- a/init.el +++ b/init.el @@ -105,7 +105,7 @@ (delete-selection-mode +1) ;; Encoding - (:option local-coding-system 'utf-8-unix + (:option locale-coding-system 'utf-8-unix coding-system-for-read 'utf-8-unix coding-system-for-write 'utf-8-unix buffer-file-coding-system 'utf-8-unix @@ -121,8 +121,13 @@ (set-default-coding-systems 'utf-8-unix) (set-terminal-coding-system 'utf-8-unix) (set-keyboard-coding-system 'utf-8-unix) - (set-selection-coding-system 'utf-8-unix) + (pcase acdw/system + (:work (set-clipboard-coding-system 'utf-16-le) + (set-selection-coding-system 'utf-16-le)) + (_ (set-selection-coding-system 'utf-8) + (set-clipboard-coding-system 'utf-8))) + ;; Cursor (:option cursor-type 'bar cursor-in-non-selected-windows 'hollow -- cgit 1.4.1-21-gabe81 From 6e8dda046c9016c35adede27f3eda87f00197a47 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 12:33:13 -0500 Subject: Move vertico-related config into its `setup' form --- init.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index d7829c3..85ccf55 100644 --- a/init.el +++ b/init.el @@ -589,12 +589,12 @@ call `zzz-to-char'." (global-undo-fu-session-mode +1)) -(if (boundp 'comp-deferred-compilation-deny-list) - (add-to-list 'comp-deferred-compilation-deny-list "vertico")) (setup (:straight (vertico :host github :repo "minad/vertico")) (setq resize-mini-windows t) + (if (boundp 'comp-deferred-compilation-deny-list) + (add-to-list 'comp-deferred-compilation-deny-list "vertico")) (icomplete-mode -1) (vertico-mode +1)) -- cgit 1.4.1-21-gabe81 From 4b7c2c092cf8f475d00a21091d30fd3a9026a63a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 14:32:10 -0500 Subject: Add (and ignore) pkg/ I'm going to put packages I develop in there. --- .gitignore | 3 ++- init.el | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 86a0ae2..474457c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ racket-mode/ server/ straight/ transient/ -var/ \ No newline at end of file +var/ +pkg/ \ No newline at end of file diff --git a/init.el b/init.el index 85ccf55..83262b7 100644 --- a/init.el +++ b/init.el @@ -61,6 +61,10 @@ no-littering-var-directory (acdw/dir)) (require 'no-littering)) +;;; My packages +(let ((default-directory (expand-file-name "pkg/" user-emacs-directory))) + (normal-top-level-add-subdirs-to-load-path)) + ;;; Good defaults -- cgit 1.4.1-21-gabe81