dotfiles

A steaming hot pile of sh...ell scripts and configuration files.
git clone https://kaka.farm/~git/dotfiles
Log | Files | Refs

commit 456d030367bdf903c608c9003cbfbb3d7f29d442
parent aa20132dc041e301233e470e04747a940344181d
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Sat, 20 Jul 2024 16:56:21 +0300

Update emacs configuration.

- Add `kakafarm/ffap-browse-urls` and bind it.
- Defer loading of packages.
- Set elfeed-feeds to kakafarm/elfeed-feeds in the use-package
  `:custom` section.
- Add some feeds to elfeed.

Diffstat:
Mconfig/emacs/elfeed-feeds.el | 8+++++++-
Mconfig/emacs/init.el | 63++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
Mconfig/emacs/kakafarm-utils.el | 25++++++++++++++++++++-----
3 files changed, 81 insertions(+), 15 deletions(-)

diff --git a/config/emacs/elfeed-feeds.el b/config/emacs/elfeed-feeds.el @@ -1,11 +1,12 @@ (require 'cl-lib) -(setq elfeed-feeds +(setq kakafarm/elfeed-feeds '( ("https://acdw.casa/feed.xml" acdw activitypub blog craftering) ("https://analognowhere.com/feed/rss.xml" comics unixsurrealism) ("https://beej.us/blog/rss.xml" blog programming) ("https://blog.benoitj.ca/posts/index.xml" blog craftering) + ("https://blog.cleancoder.com/atom.xml" blog programming unclebob) ("https://blog.codeberg.org/feeds/all.atom.xml" codeberg) ("https://blog.vaxry.net/feed" blog linux) ("https://botsin.space/@mechilim/with_replies.rss" activitypub covid israel) @@ -18,6 +19,7 @@ ("https://deidetected.com/index.php/comments/feed/" csj withreplies) ("https://deidetected.com/index.php/feed/" csj) ("https://drewdevault.com/blog/index.xml" blog drewdevault linux programming) + ("https://dthompson.us/feed.xml" blog dthompson programming scheme) ("https://erictopol.substack.com/feed" covid erictopol science) ("https://feeds.transistor.fm/collection-of-jhourneys" jhourney meditation podcast) ("https://galperel.wordpress.com/feed/" books hebrew israel) @@ -45,6 +47,7 @@ ("https://newdiscourses.com/feed/" csj) ("https://odysee.com/$/rss/@ArkhamReporter:5" arkhamreporter lovecraft video) ("https://planet.debian.org/rss20.xml" blog debian linux) + ("https://planet.emacslife.com/atom.xml" emacs emacslife planet) ("https://planet.scheme.org/atom.xml" lisp planet scheme) ("https://puri.sm/feed/" linux purism) ("https://purplg.dev/index.xml" blog craftering) @@ -66,6 +69,9 @@ ("https://tooot.im/@admin.rss" activitypub admin) ("https://torrentfreak.com/feed/" filesharing internet news pirating torrents) ("https://trevarj.github.io/rss.xml" blog craftering) + ("https://triapul.cz/feed/cesky.xml" blog cesky computing czech unix unixsurrealism) + ("https://triapul.cz/feed/english.xml" blog computing unix unixsurrealism) + ("https://triapul.cz/feed/gopher.xml" blog computing gopher unix unixsurrealism) ("https://tusharhero.codeberg.page/rss.xml" blog craftering) ("https://tylerdback.com/index.xml" blog craftering) ("https://vimeo.com/user13532867/videos/rss" danielmingram meditation) diff --git a/config/emacs/init.el b/config/emacs/init.el @@ -29,6 +29,7 @@ (add-hook 'after-init-hook 'global-company-mode)) (use-package corfu + :defer t :config (global-corfu-mode) :custom @@ -41,29 +42,44 @@ (load custom-file 'noerror 'nomessage)) (use-package dictionary + :defer t :custom (dictionary-server "localhost")) (use-package elfeed :defer t - :config + :init (load (locate-user-emacs-file "elfeed-feeds.el")) :custom (elfeed-curl-max-connections 10) - (elfeed-search-filter "@2-months +unread")) + (elfeed-search-filter "@2-months +unread") + (elfeed-feeds kakafarm/elfeed-feeds)) + +'(use-package elfeed-goodies + :config + (elfeed-goodies/setup)) (use-package emacs :ensure nil :defer :bind ;;((";" . #'kakafarm/easy-underscore)) + ("M-x" . helm-M-x) ) (use-package fontset + :defer t :config (set-fontset-font t 'hebrew "Noto Sans Hebrew")) +(use-package helm + :defer t) + +(use-package helpful + :defer t) + (use-package orderless + :defer t :custom (completion-styles '(orderless @@ -74,6 +90,7 @@ partial-completion))))) (use-package erc + :defer t :custom (erc-server "irc.libera.chat") (erc-nick "kakafarm") @@ -90,14 +107,20 @@ ) (use-package ffap + :defer t :bind - (("C-c f a p" . ffap-menu))) + ( + ("C-c f a p" . ffap-menu) + ("C-c f f a p" . kakafarm/ffap-browse-urls) + )) '(use-package mutli-vterm + :defer t :bind (("C-q" . vterm-send-next-key))) (use-package geiser + :defer t :after (scheme-mode) :config '((define-key 'geiser-mode-map) @@ -107,12 +130,13 @@ (unbind-key "C-c C-a" geiser-mode-map))) (use-package greader + :defer t :commands (greader-mode) :config (add-hook 'greader-mode-hook 'kakafarm/sentence-end-double-nilify-for-read-only-buffers) :hook ( - help-mode + Custom-mode Info-mode Man-mode elfeed-show @@ -128,11 +152,13 @@ )) (use-package icomplete + :defer t :config ;; Display completions continuously in minibuffer. (icomplete-mode 1)) (use-package magit-todos + :defer t :after magit :config (magit-todos-mode 1)) @@ -165,21 +191,26 @@ ) (use-package mule + :defer t :config ;;; https://emacs.stackexchange.com/questions/34322/set-default-coding-system-utf-8 (set-language-environment "utf-8")) (use-package info + :defer t :custom (Info-additional-directory-list '("~/infopath/"))) '(use-package nano-tts + :defer t :hook (eww-after-render nov-mode Info-mode)) (use-package nov + :defer t :mode ("\\.epub\\'" . nov-mode)) (use-package org + :defer t :config (org-babel-do-load-languages 'org-babel-load-languages @@ -187,6 +218,7 @@ (emacs-lisp . t)))) (use-package org-roam + :defer t :custom (org-roam-directory "~/mine/roam/") :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) @@ -198,24 +230,29 @@ ;; XXX: Disabled. '(use-package parinfer + :defer t :hook (emacs-lisp-mode lisp-mode scheme-mode)) (use-package paredit + :defer t :hook (emacs-lisp-mode lisp-mode scheme-mode)) (use-package paren + :defer t :config (show-paren-mode)) (use-package rainbow-delimiters + :defer t :config (rainbow-delimiters-mode)) (use-package recentf + :defer t :config (recentf-mode 1) :bind (("C-S-t" . recentf-open-files) @@ -223,11 +260,13 @@ ("C-c l" . dictionary-lookup-definition))) (use-package undo-tree + :defer :config (global-undo-tree-mode 1) (setq undo-tree-auto-save-history nil)) (use-package scheme-mode + :defer t :mode "\\.\\(scm\\|sxml\\)\\'" ;; :bind (:map scheme-mode-map ;; ("C-c C-e" . arei-mode-map) @@ -245,12 +284,14 @@ ;; Don't want tabs in any of my source files. (setq-default indent-tabs-mode nil) - (advice-add 'scratch-buffer - :after - (lambda () "Switch to text-mode." - (text-mode)))) + '(advice-add 'scratch-buffer + :after + (lambda () "Switch to text-mode." + (text-mode))) + ) (use-package window + :defer t :config (advice-add 'recenter-top-bottom :around @@ -285,7 +326,10 @@ (progn ;;; Load org-roam stuff. - (setq kakafarm/org-roam-my-publish-time 0) + (defvar kakafarm/org-roam-my-publish-time 0 + ;; TODO: Write docstring. + "TODO" + ) (setq org-publish-project-alist `(("roam" @@ -318,3 +362,4 @@ (setq gc-cons-threshold (* 200 1024 1024)) (put 'narrow-to-region 'disabled nil) (put 'upcase-region 'disabled nil) +(put 'narrow-to-page 'disabled nil) diff --git a/config/emacs/kakafarm-utils.el b/config/emacs/kakafarm-utils.el @@ -87,6 +87,22 @@ from https://www.youtube.com/watch?v=6R-73hsL5wk" feeds) #'kakafarm/elfeed-compare-feeds-urls)) +(defun kakafarm/ffap-browse-urls () + "Open all visible URLs." + (interactive) + + (let* ((urls (mapcar 'car (ffap-menu-rescan))) + (urls-newlined (mapcar (lambda (url) (concat url "\n")) + urls)) + (prompt (format "Open URLs? [y/n] + +%s" + (apply 'concat + urls-newlined)))) + (when (y-or-n-p prompt) + (dolist (url urls) + (browse-url url))))) + (defun kakafarm/kill-ring-save-unlines () "Like `kill-ring-save', but also unlines and trims the newly killed stuff." (interactive) @@ -131,11 +147,10 @@ from https://www.youtube.com/watch?v=6R-73hsL5wk" (with-temp-buffer (insert-file-contents org-filename) (org-element-map (org-element-parse-buffer) 'keyword - (lambda (keyword) - (and (kakafarm/org-roam-keyword-is-filetags-p keyword) - (kakafarm/org-roam-filetags-keyword-is-publishable-p keyword))) - nil - t))) + (lambda (keyword) + (and (kakafarm/org-roam-keyword-is-filetags-p keyword) + (kakafarm/org-roam-filetags-keyword-is-publishable-p keyword))) + nil t))) (defun kakafarm/org-roam-sitemap (title list-of-org-links) (message (format "kakafarm/org-roam-sitemap title: %S; list-of-links: %S\n"