From 027a7a96caf189958315955b7d6dde260f3295af Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 23 Dec 2020 20:30:13 -0600 Subject: Remove use-package --- README.md | 62 ++++++++-- config.org | 401 ++++++++++++++++++++++++++++--------------------------------- 2 files changed, 235 insertions(+), 228 deletions(-) diff --git a/README.md b/README.md index b4e10ba..f725e84 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ when it errors. '(use-package-custom-update :host github :repo "a13/use-package-custom-update")) + (require 'use-package-custom-update) @@ -146,6 +147,7 @@ when it errors. (cuss default-frame-alist '((tool-bar-lines . 0) (menu-bar-lines . 0))) + (menu-bar-mode -1) (tool-bar-mode -1) @@ -154,6 +156,7 @@ when it errors. (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil)) (scroll-bar-mode -1) + (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil)) (horizontal-scroll-bar-mode -1) @@ -171,6 +174,7 @@ when it errors. ### Remove the bell (cuss visible-bell (not (string= (system-name) "larry"))) + (defun acdw/ring-bell-function () "Custom bell-ringing function." (let ((orig-face (face-foreground 'mode-line))) @@ -180,6 +184,7 @@ when it errors. (lambda (fg) (set-face-foreground 'mode-line fg)) orig-face))) + (cuss ring-bell-function #'acdw/ring-bell-function) @@ -206,6 +211,7 @@ when it errors. '((width . 80) (height . 2) (vertical-scrollbars . nil))) + (set-window-scroll-bars (minibuffer-window) nil nil) 2. Keep the cursor from going into the prompt @@ -247,6 +253,7 @@ when it errors. '((up . right) (down . right) (t . nil))) + (cuss indicate-empty-lines t) @@ -411,6 +418,7 @@ from [link0ff](https://github.com/link0ff/emacs-init). :height 100) ("Consolas" :height 100))) + (set-face-from-alternatives 'fixed-pitch '(("Libertinus Mono" :height 110) @@ -420,6 +428,7 @@ from [link0ff](https://github.com/link0ff/emacs-init). :height 100) ("Consolas" :height 100))) + (set-face-from-alternatives 'variable-pitch '(("Libertinus Serif" :height 120) @@ -427,6 +436,7 @@ from [link0ff](https://github.com/link0ff/emacs-init). :height 120) ("Georgia" :height 110))) + (remove-function after-focus-change-function #'acdw/setup-fonts))) (add-function :before after-focus-change-function #'acdw/setup-fonts) @@ -454,6 +464,7 @@ from [link0ff](https://github.com/link0ff/emacs-init). (straight-use-package 'async) (autoload 'dired-async-mode "dired-async.el" nil t) (dired-async-mode +1) + (async-bytecomp-package-mode +1) @@ -511,6 +522,7 @@ from [link0ff](https://github.com/link0ff/emacs-init). (" a" . consult-apropos)) :init (fset 'multi-occur #'consult-multi-occur)) + (use-package consult-selectrum :straight (consult-selectrum :host github @@ -620,8 +632,11 @@ Also from link0ff. See the above for a link. '(kill-ring search-ring regexp-search-ring)) + (cuss savehist-save-minibuffer-history t) + (cuss history-length t) + (cuss history-delete-duplicates t) (savehist-mode +1) @@ -643,6 +658,7 @@ Also from link0ff. See the above for a link. (cuss recentf-max-menu-items 100) (cuss recentf-max-saved-items 100) + (with-eval-after-load 'no-littering (add-to-list 'recentf-exclude no-littering-var-directory) (add-to-list 'recentf-exclude no-littering-etc-directory)) @@ -762,10 +778,10 @@ Also from link0ff. See the above for a link. from [Emacs Wiki](https://www.emacswiki.org/emacs/EndOfLineTips). (defun ewiki/no-junk-please-were-unixish () - "Convert line endings to UNIX, dammit." - (let ((coding-str (symbol-name buffer-file-coding-system))) - (when (string-match "-\\(?:dos\\|mac\\)$" coding-str) - (set-buffer-file-coding-system 'unix)))) + "Convert line endings to UNIX, dammit." + (let ((coding-str (symbol-name buffer-file-coding-system))) + (when (string-match "-\\(?:dos\\|mac\\)$" coding-str) + (set-buffer-file-coding-system 'unix)))) I add it to the `find-file-hook` *and* `before-save-hook` because I don't want to ever work with anything other than UNIX line endings ever again. I just don't care. Even Microsoft Notepad can handle UNIX line endings, so I don't want to hear it. @@ -845,23 +861,30 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t :custom (company-idle-delay 0.1) (company-minimum-prefix-length 3) + :init (defun acdw/company-complete-common-or-cycle+1 () (interactive) (company-complete-common-or-cycle +1)) + (defun acdw/company-complete-common-or-cycle-1 () (interactive) (company-complete-common-or-cycle -1)) + :bind (:map company-active-map ("C-n" . acdw/company-complete-common-or-cycle+1) ("C-p" . acdw/company-complete-common-or-cycle-1)) + :hook (prog-mode-hook . company-mode)) + (use-package company-prescient :hook (company-mode-hook . company-prescient-mode)) + ;; this comes with company-quickhelp, so.... + (use-package company-posframe :after (company) :config @@ -962,6 +985,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m ### Org Agenda (cuss org-agenda-files (no-littering-expand-etc-file-name "agenda-files")) + (if (and (stringp org-agenda-files) (not (file-exists-p org-agenda-files))) (with-temp-buffer (write-file org-agenda-files))) @@ -981,6 +1005,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m ### [A better return in Org mode](http://kitchingroup.cheme.cmu.edu/blog/2017/04/09/A-better-return-in-org-mode/) (require 'org-inlinetask) + (defun scimax/org-return (&optional ignore) "Add new list item, heading or table row with RET. A double return on an empty element deletes it. @@ -989,20 +1014,25 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (if ignore (org-return) (cond + ((eq 'line-break (car (org-element-context))) (org-return t)) + ;; Open links like usual, unless point is at the end of a line. ;; and if at beginning of line, just press enter. ((or (and (eq 'link (car (org-element-context))) (not (eolp))) (bolp)) (org-return)) + ;; It doesn't make sense to add headings in inline tasks. Thanks Anders ;; Johansson! ((org-inlinetask-in-task-p) (org-return)) + ;; checkboxes too ((org-at-item-checkbox-p) (org-insert-todo-heading nil)) + ;; lists end with two blank lines, so we need to make sure we are also not ;; at the beginning of a line to avoid a loop where a new entry gets ;; created with only one blank line. @@ -1012,6 +1042,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (beginning-of-line) (delete-region (line-beginning-position) (line-end-position)) (org-return))) + ;; org-heading ((org-at-heading-p) (if (not (string= "" (org-element-property :title (org-element-context)))) @@ -1021,6 +1052,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (beginning-of-line) (setf (buffer-substring (line-beginning-position) (line-end-position)) ""))) + ;; tables ((org-at-table-p) (if (-any? @@ -1034,9 +1066,12 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (setf (buffer-substring (line-beginning-position) (line-end-position)) "") (org-return))) + ;; fall-through case (t (org-return))))) + + (define-key org-mode-map (kbd "RET") 'scimax/org-return) @@ -1087,16 +1122,10 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin (when (eq major-mode 'org-mode) (let ((current-prefix-arg 4)) ; Emulate C-u (call-interactively 'unpackaged/org-fix-blank-lines)))) + (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) -### Agenda - - (bind-key "C-a" #'org-agenda 'acdw/map) - (cuss org-agenda-files - '("~/todo.org")) - - ## Elpher (use-package elpher @@ -1210,10 +1239,12 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin from [karthinks](https://karthinks.com/software/more-batteries-included-with-emacs/#regexp-builder--m-x-re-builder). (require 'browse-url) + (when (executable-find "mpv") (defun browse-url-mpv (url &optional single) (start-process "mpv" nil (if single "mpv" "umpv") (shell-quote-wildcard-pattern url))) + (defun browse-url-at-point-mpv (&optional single) "Open a link in mpv." (interactive "P") @@ -1224,6 +1255,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema (browse-url-mpv url t)) #'browse-url-mpv))) (browse-url-at-point))) + (cuss browse-url-browser-function '(("https?:\\/\\/www\\.youtu\\.*be." . browse-url-mpv) ("." . browse-url-generic)))) @@ -1300,8 +1332,8 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema ;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*- - (setq load-prefer-newer t) - (setq frame-inhibit-implied-resize t) + (setq load-prefer-newer t) + (setq frame-inhibit-implied-resize t) ## Ease tangling and loading of Emacs' init @@ -1336,6 +1368,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema (defun acdw/refresh-emacs-no-load () (refresh-emacs 'disable-load)) + (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load) @@ -1355,6 +1388,7 @@ Here’s a wrapper script that’ll start `emacs –daemon` if there isn’t one ## License Copyright © 2020 Case Duckworth + This work is free. You can redistribute it and/or modify it under the terms of the Do What the Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the `LICENSE` file, tangled from the @@ -1370,6 +1404,7 @@ following source block, for details. this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. @@ -1379,5 +1414,6 @@ following source block, for details. It's highly likely that the WTFPL is completely incompatible with the GPL, for what should be fairly obvious reasons. To that, I say: + **SUE ME, RMS!** diff --git a/config.org b/config.org index 5cb5ee2..27cfb10 100644 --- a/config.org +++ b/config.org @@ -4,7 +4,7 @@ #+EXPORT_FILE_NAME: README.md #+OPTIONS: toc:nil #+BANKRUPTCY_COUNT: 3 -#+Time-stamp: <2020-12-22 20:48:48 acdw> +#+Time-stamp: <2020-12-23 20:27:53 acdw> Let’s configure Emacs using Org mode, they said. It’ll be fun, they said. @@ -72,27 +72,6 @@ when it errors. (acdw/bootstrap-straight)) #+end_src -*** Use-package - - #+begin_src emacs-lisp - (setq straight-use-package-by-default t) - (setq use-package-hook-name-suffix nil) - (straight-use-package 'use-package) - #+end_src - -*** Extra use-package keywords - -**** :custom-update - -#+begin_src emacs-lisp - (straight-use-package - '(use-package-custom-update - :host github - :repo "a13/use-package-custom-update")) - - (require 'use-package-custom-update) -#+end_src - ** Customize variables *** Put customizations in a separate file @@ -554,37 +533,29 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of (with-eval-after-load 'prescient (with-eval-after-load 'selectrum (selectrum-prescient-mode +1))) - - (straight-use-package 'company-prescient) - - (with-eval-after-load 'prescient - (with-eval-after-load 'company - (company-prescient-mode +1))) #+end_src *** Consult #+begin_src emacs-lisp - (use-package consult - :after (selectrum) - :straight (consult - :host github - :repo "minad/consult") - :bind - (("C-x b" . consult-buffer) - ("C-x 4 b" . consult-buffer-other-window) - ("C-x 5 b" . consult-buffer-other-frame) - ("M-g o" . consult-outline) - ("M-g l" . consult-line) - ("M-y" . consult-yank-pop) - (" a" . consult-apropos)) - :init - (fset 'multi-occur #'consult-multi-occur)) - - (use-package consult-selectrum - :straight (consult-selectrum - :host github - :repo "minad/consult")) + (straight-use-package '(consult + :host github + :repo "minad/consult")) + (require 'consult) + + (define-key ctl-x-map "b" #'consult-buffer) + (define-key ctl-x-map "4b" #'consult-buffer-other-window) + (define-key ctl-x-map "5b" #'consult-buffer-other-frame) + (define-key goto-map "o" #'consult-outline) + (define-key goto-map "l" #'consult-line) + (global-set-key (kbd "M-y") #'consult-yank-pop) + (define-key help-map "a" #'consult-apropos) + + (fset 'multi-occur #'consult-multi-occur) + + (straight-use-package '(consult-selectrum + :host github + :repo "minad/consult")) #+end_src *** Marginalia @@ -596,11 +567,11 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of :branch "main")) (cuss marginalia-annotators - (if (eq system-type 'windows-nt) - '(marginalia-annotators-light - marginalia-annotators-heavy) - '(marginalia-annotators-heavy - marginalia-annotators-light))) + (if (eq system-type 'windows-nt) + '(marginalia-annotators-light + marginalia-annotators-heavy) + '(marginalia-annotators-heavy + marginalia-annotators-light))) (marginalia-mode +1) #+end_src @@ -616,16 +587,31 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of ** Search #+begin_src emacs-lisp - (use-package ctrlf - :custom - (ctrlf-show-match-count-at-eol nil) - :bind - ("C-s" . ctrlf-forward-regexp) - ("C-r" . ctrlf-backward-regexp) - ("C-M-s" . ctrlf-forward-literal) - ("C-M-r" . ctrlf-backward-literal) - :config - (ctrlf-mode +1)) + (straight-use-package 'ctrlf) + (require 'ctrlf) + + (cuss ctrlf-show-match-count-at-eol nil) + + (cuss ctrlf-mode-bindings + '(("C-s" . ctrlf-forward-regexp) + ("C-r" . ctrlf-backward-regexp) + ("C-M-s" . ctrlf-forward-literal) + ("C-M-r" . ctrlf-backward-literal) + ("M-s _" . ctrlf-forward-symbol) + ("M-s ." . ctrlf-forward-symbol-at-point))) + + (ctrlf-mode +1) +#+end_src + +** Replace + +#+begin_src emacs-lisp + (straight-use-package 'anzu) + (global-anzu-mode +1) + + (cuss anzu-replace-to-string-separator " → ") + (global-set-key (kbd "M-%") #'anzu-query-replace-regexp) + (global-set-key (kbd "M-C-%") #'anzu-query-replace) #+end_src ** Mouse @@ -639,7 +625,7 @@ This is not /quite/ correct yet. For example, scrolling in the margins with a t [right-margin wheel-down] [left-margin wheel-up] [right-margin wheel-up])) - (bind-key vec #'mwheel-scroll)) + (global-set-key vec #'mwheel-scroll)) #+end_src ** Keyboard @@ -650,7 +636,7 @@ From [[https://github.com/link0ff/emacs-init][link0ff]]. I thought they made a #+begin_src emacs-lisp (when window-system - (define-key global-map [escape] 'keyboard-escape-quit) + (global-set-key [escape] 'keyboard-escape-quit) (define-key isearch-mode-map [escape] 'isearch-cancel)) #+end_src @@ -682,7 +668,7 @@ Also from link0ff. See the above for a link. **** Switch to another window #+begin_src emacs-lisp - (bind-key "M-o" #'other-window) + (global-set-key (kbd "M-o") #'other-window) #+end_src * Persistence @@ -748,18 +734,21 @@ Also from link0ff. See the above for a link. ** Undo #+begin_src emacs-lisp - (use-package undo-fu - :bind - ("C-/" . undo-fu-only-undo) - ("C-?" . undo-fu-only-redo)) + (straight-use-package 'undo-fu) + (require 'undo-fu) + + (global-set-key (kbd "C-/") #'undo-fu-only-undo) + (global-set-key (kbd "C-?") #'undo-fu-only-redo) (straight-use-package 'undo-fu-session) + (require 'undo-fu-session) (cuss undo-fu-session-incompatible-files - '("/COMMIT_EDITMSG\\'" - "/git-rebase-todo\\'")) + '("/COMMIT_EDITMSG\\'" + "/git-rebase-todo\\'")) (global-undo-fu-session-mode +1) + #+end_src * Editing @@ -806,20 +795,20 @@ Also from link0ff. See the above for a link. ** Multiple cursors #+begin_src emacs-lisp - (use-package multiple-cursors - :bind - ("C->" . mc/mark-next-like-this) - ("C-<" . mc/mark-previous-like-this) - ("C-c C-<" . mc/mark-all-like-this)) + (straight-use-package 'multiple-cursors) + + (global-set-key (kbd "C->") #'mc/mark-next-like-this) + (global-set-key (kbd "C-<") #'mc/mark-previous-like-this) + (global-set-key (kbd "C-c C-<") #'mc/mark-all-like-this) #+end_src ** Expand region #+begin_src emacs-lisp - (use-package expand-region - :bind - (("C-=" . er/expand-region) - ("C-+" . er/contract-region))) + (straight-use-package 'expand-region) + + (global-set-key (kbd "C-=") #'er/expand-region) + (global-set-key (kbd "C-+") #'er/contract-region) #+end_src ** Highlight modified regions @@ -958,38 +947,28 @@ Also from link0ff. See the above for a link. ** Completion #+begin_src emacs-lisp - (use-package company - :custom - (company-idle-delay 0.1) - (company-minimum-prefix-length 3) - - :init - (defun acdw/company-complete-common-or-cycle+1 () - (interactive) - (company-complete-common-or-cycle +1)) - - (defun acdw/company-complete-common-or-cycle-1 () - (interactive) - (company-complete-common-or-cycle -1)) + (unless (eq system-type 'windows-nt) + (straight-use-package 'company) + (cuss company-idle-delay 0.1) + (cuss company-minimum-prefix-length 2) - :bind - (:map company-active-map - ("C-n" . acdw/company-complete-common-or-cycle+1) - ("C-p" . acdw/company-complete-common-or-cycle-1)) + (add-hook 'prog-mode-hook #'company-mode) - :hook - (prog-mode-hook . company-mode)) + (straight-use-package 'company-prescient) + (add-hook 'company-mode-hook #'company-prescient-mode) - (use-package company-prescient - :hook - (company-mode-hook . company-prescient-mode)) + (straight-use-package 'company-posframe) - ;; this comes with company-quickhelp, so.... - - (use-package company-posframe - :after (company) - :config - (company-posframe-mode +1)) + (with-eval-after-load 'company + (company-posframe-mode +1) + (define-key company-active-map (kbd "C-n") + (lambda () + (interactive) + (company-complete-common-or-cycle +1))) + (define-key company-active-map (kbd "C-p") + (lambda () + (interactive) + (company-complete-common-or-cycle -1))))) #+end_src ** Languages @@ -997,16 +976,16 @@ Also from link0ff. See the above for a link. *** Lua #+begin_src emacs-lisp - (use-package lua-mode - :mode "\\.lua\\'" - :interpreter "lua") + (straight-use-package 'lua-mode) + (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-mode)) + (add-to-list 'interpreter-mode-alist '("lua" . lua-mode)) #+end_src *** Fennel #+begin_src emacs-lisp - (use-package fennel-mode - :mode "\\.fnl\\'") + (straight-use-package 'fennel-mode) + (add-to-list 'auto-mode-alist '("\\.fnl\\'" . fennel-mode)) #+end_src *** Emacs lisp @@ -1068,16 +1047,14 @@ from [[https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of- #+begin_src emacs-lisp (straight-use-package 'typo) - (add-hook 'text-mode-hook #'typo-mode) #+end_src ** Insert /kaomoji/ #+begin_src emacs-lisp - (use-package insert-kaomoji - :bind - ("C-x 8 k" . insert-kaomoji)) + (straight-use-package 'insert-kaomoji) + (global-set-key (kbd "C-x 8 k") #'insert-kaomoji) #+end_src * Applications @@ -1085,9 +1062,9 @@ from [[https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of- ** Magit #+begin_src emacs-lisp - (use-package magit - :bind - ("C-z g" . magit-status)) + (straight-use-package 'magit) + + (define-key acdw/map "g" #'magit-status) #+end_src ** Org mode @@ -1100,8 +1077,8 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (with-eval-after-load 'org (require 'org-tempo) (require 'ox-md) - (bind-key "M-n" #'outline-next-visible-heading 'org-mode-map) - (bind-key "M-p" #'outline-previous-visible-heading 'org-mode-map)) + (define-key org-mode-map (kbd "M-n") #'outline-next-visible-heading) + (define-key org-mode-map (kbd "M-p") #'outline-previous-visible-heading)) (cuss org-hide-emphasis-markers t) (cuss org-fontify-done-headline t) @@ -1124,9 +1101,11 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (if (and (stringp org-agenda-files) (not (file-exists-p org-agenda-files))) (with-temp-buffer (write-file org-agenda-files))) + + (define-key acdw/map (kbd "C-a") #'org-agenda) #+end_src -*** Make bullets look like bullets +*** COMMENT Make bullets look like bullets #+begin_src emacs-lisp (font-lock-add-keywords @@ -1266,86 +1245,79 @@ from [[https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-hea (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) #+end_src - ** Elpher #+begin_src emacs-lisp - (use-package elpher - :straight (elpher - :repo "git://thelambdalab.xyz/elpher.git" - :branch "patch_multiple_buffers") - - :custom - (elpher-ipv4-always t) - - :custom-face - (elpher-gemini-heading1 - ((t (:inherit (modus-theme-heading-1))))) - (elpher-gemini-heading2 - ((t (:inherit (modus-theme-heading-2))))) - (elpher-gemini-heading3 - ((t (:inherit (modus-theme-heading-3))))) - - :config - (defun elpher:eww-browse-url (original url &optional new-window) - "Handle gemini/gopher links with eww." - (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url) - (require 'elpher) - (elpher-go url)) - (t (funcall original url new-window)))) - (advice-add 'eww-browse-url :around 'elpher:eww-browse-url) - - :bind (:map elpher-mode-map - ("n" . elpher-next-link) - ("p" . elpher-prev-link) - ("o" . elpher-follow-current-link) - ("G" . elpher-go-current)) - - :hook - (elpher-mode-hook . visual-fill-column-mode)) + (straight-use-package '(elpher + :repo "git://thelambdalab.xyz/elpher.git" + :branch "patch_multiple_buffers")) + + (cuss elpher-ipv4-always t) + + (custom-set-faces + `(elpher-gemini-heading1 + ((t (:inherit (modus-theme-heading1))))) + `(elpher-gemini-heading2 + ((t (:inherit (modus-theme-heading2))))) + `(elpher-gemini-heading3 + ((t (:inherit (modus-theme-heading3)))))) + + (defun elpher:eww-browse-url (original url &optional new-window) + "Handle gemini/gopher links with eww." + (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url) + (require 'elpher) + (elpher-go url)) + (t (funcall original url new-window)))) + + (advice-add 'eww-browse-url :around 'elpher:eww-browse-url) + + (unless (fboundp 'elpher-bookmarks) + (autoload #'elpher-bookmarks "elpher" nil t)) + + (define-key acdw/map "e" #'elpher-bookmarks) + + (with-eval-after-load 'elpher + (dolist (key '(("n" . elpher-next-link) + ("p" . elpher-prev-link) + ("o" . elpher-follow-current-link) + ("G" . elpher-go-current))) + (define-key elpher-mode-map (car key) (cdr key)))) + + (add-hook 'elpher-mode-hook #'visual-fill-column-mode) #+end_src *** Gemini mode #+begin_src emacs-lisp - (use-package gemini-mode - :straight (gemini-mode - :repo "https://git.carcosa.net/jmcbray/gemini.el.git") - - :mode "\\.\\(gemini|gmi\\)\\'" - - :custom-face - (gemini-heading-face-1 - ((t (:inherit (elpher-gemini-heading1))))) - (gemini-heading-face2 - ((t (:inherit (elpher-gemini-heading2))))) - (gemini-heading-face3 - ((t (:inherit (elpher-gemini-heading3))))) - - :init - (defun acdw/setup-gemini-mode () - (visual-fill-column-mode 1) - (variable-pitch-mode -1)) - - :hook - (gemini-mode-hook . acdw/setup-gemini-mode)) + (straight-use-package + '(gemini-mode + :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) + + (add-to-list 'auto-mode-alist + '("\\.\\(gemini\\|gmi\\)\\'" . gemini-mode)) + + (defun acdw/setup-gemini-mode () + (visual-fill-column-mode +1) + (variable-pitch-mode -1)) + + (add-hook 'gemini-mode-hook #'acdw/setup-gemini-mode) #+end_src *** Gemini write #+begin_src emacs-lisp - (use-package gemini-write - :straight (gemini-write - :repo "https://alexschroeder.ch/cgit/gemini-write")) + (straight-use-package + '(gemini-write + :repo "https://alexschroeder.ch/cgit/gemini-write")) #+end_src *** Ox-gemini #+begin_src emacs-lisp - (use-package ox-gemini - :straight (ox-gemini - :repo "https://git.sr.ht/~abrahms/ox-gemini" - :branch "main")) + (straight-use-package + '(ox-gemini + :repo "https://git.sr.ht/~abrahms/ox-gemini" + :branch "main")) #+end_src ** Pastebin @@ -1359,23 +1331,21 @@ from [[https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-hea ** RSS #+begin_src emacs-lisp - (use-package newsticker - :custom - (newsticker-url-list - ;; LABEL URL [START-TIME] [INERVAL] [WGET-ARGUMENTS] - '(("wsinatra" "http://lambdacreate.com/static/feed.rss") - ("elioat" "https://eli.li/feed.rss") - ("ACDW" "https://www.acdw.net/atom.xml") - ("june" "https://text.causal.agency/feed.atom") - ("kylie - notes" "https://www.somas.is/notes.atom") - ("kylie - rhizome" "https://www.somas.is/rhizome.atom") - ("brennan" "https://p1k3.com/all.xml") - ("Planet Emacs" "https://planet.emacslife.com/atom.xml") - ("nullprogram, Chris Wellons" "https://nullprogram.com/feed/") - ("Malleable Systems" "https://malleable.systems/blog/index.xml")) - ) - :hook - (newsticker-treeview-item-mode-hook . visual-fill-column-mode)) + (cuss newsticker-url-list + ;; LABEL URL [START-TIME] [INERVAL] [WGET-ARGUMENTS] + '(("wsinatra" "http://lambdacreate.com/static/feed.rss") + ("elioat" "https://eli.li/feed.rss") + ("ACDW" "https://www.acdw.net/atom.xml") + ("june" "https://text.causal.agency/feed.atom") + ("kylie - notes" "https://www.somas.is/notes.atom") + ("kylie - rhizome" "https://www.somas.is/rhizome.atom") + ("brennan" "https://p1k3.com/all.xml") + ("Planet Emacs" "https://planet.emacslife.com/atom.xml") + ("nullprogram, Chris Wellons" "https://nullprogram.com/feed/") + ("Malleable Systems" "https://malleable.systems/blog/index.xml")) + ) + + (add-hook 'newsticker-treeview-item-mode-hook #'visual-fill-column-mode) #+end_src ** Web browsing @@ -1411,18 +1381,19 @@ from [[https://karthinks.com/software/more-batteries-included-with-emacs/#regexp ** Reading e-books #+begin_src emacs-lisp - (use-package nov - :mode ("\\.epub\\'" . nov-mode) - :init - (defun acdw/setup-nov-mode () - (visual-line-mode +1) - (visual-fill-column-mode +1) - (variable-pitch-mode +1) - (setq cursor-type nil)) - :config - (cuss nov-text-width t) - :hook - (nov-mode-hook . acdw/setup-nov-mode)) + (straight-use-package 'nov) + + (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) + + (defun acdw/setup-nov-mode () + (visual-line-mode +1) + (visual-fill-column-mode +1) + (variable-pitch-mode +1) + (setq cursor-type nil)) + + (cuss nov-text-width t) + + (add-hook 'nov-mode-hook #'acdw/setup-nov-mode) #+end_src ** Eshell -- cgit 1.4.1-21-gabe81