about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el118
-rw-r--r--lisp/+org.el36
-rw-r--r--machines/bob.el12
3 files changed, 101 insertions, 65 deletions
diff --git a/init.el b/init.el index 49c4ab4..b057344 100644 --- a/init.el +++ b/init.el
@@ -39,7 +39,8 @@
39 ;; ones that might not belong in a separate file. 39 ;; ones that might not belong in a separate file.
40 (:also-load +lisp) 40 (:also-load +lisp)
41 (:option truncate-string-ellipsis "…" 41 (:option truncate-string-ellipsis "…"
42 ring-bell-function 'ignore) 42 ring-bell-function 'ignore
43 read-file-name-completion-ignore-case t)
43 ;; Bindings 44 ;; Bindings
44 (:global "C-x C-k" #'kill-current-buffer 45 (:global "C-x C-k" #'kill-current-buffer
45 "C-x 4 n" #'clone-buffer 46 "C-x 4 n" #'clone-buffer
@@ -212,7 +213,8 @@
212 (defvar +invidious-host 213 (defvar +invidious-host
213 ;; TODO: Add variables for other transformations and what-not. 214 ;; TODO: Add variables for other transformations and what-not.
214 ;; ... or enable trying multiple servers 215 ;; ... or enable trying multiple servers
215 "invidious.snopyta.org" 216 ;; "yewtu.be"
217 "youtube.com"
216 "Host for invidious instance.") 218 "Host for invidious instance.")
217 ;; Set up external browsing URLs. 219 ;; Set up external browsing URLs.
218 (add-to-list '+custom-variable-allowlist 220 (add-to-list '+custom-variable-allowlist
@@ -517,20 +519,20 @@
517 (:option finger-X.500-host-regexps '(".") ; only send username 519 (:option finger-X.500-host-regexps '(".") ; only send username
518 ) 520 )
519 (with-eval-after-load 'transient 521 (with-eval-after-load 'transient
520 (transient-define-prefix net-utils () 522 (transient-define-prefix net-utils ()
521 "Networking utilities" 523 "Networking utilities"
522 ["Actions" 524 ["Actions"
523 ("p" "Ping" ping) 525 ("p" "Ping" ping)
524 ("i" "Ifconfig" ifconfig) 526 ("i" "Ifconfig" ifconfig)
525 ("w" "Iwconfig" iwconfig) 527 ("w" "Iwconfig" iwconfig)
526 ("n" "Netstat" netstat) 528 ("n" "Netstat" netstat)
527 ("a" "Arp" arp) 529 ("a" "Arp" arp)
528 ("r" "Route" route) 530 ("r" "Route" route)
529 ("h" "Nslookup host" nslookup-host) 531 ("h" "Nslookup host" nslookup-host)
530 ("d" "Dig" dig) 532 ("d" "Dig" dig)
531 ("s" "Smb Client" smbclient) 533 ("s" "Smb Client" smbclient)
532 ("t" "Traceroute" traceroute)]) 534 ("t" "Traceroute" traceroute)])
533 (:+key "C-z M-n" #'net-utils))) 535 (:+key "C-z M-n" #'net-utils)))
534 536
535(setup notmuch 537(setup notmuch
536 (:load-from "~/usr/share/emacs/site-lisp/") 538 (:load-from "~/usr/share/emacs/site-lisp/")
@@ -670,10 +672,9 @@
670 org-startup-with-inline-images t 672 org-startup-with-inline-images t
671 org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis))) 673 org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis)))
672 org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" 674 org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)"
673 "|" "DONE(d!)") 675 "|" "DONE(d!)" "ASSIGNED(a!)")
674 (sequence "|" "CANCELED(k@)") 676 (sequence "|" "CANCELED(k@)")
675 (sequence "MEETING(m)") 677 (sequence "MEETING(m)"))
676 (sequence "ASSIGNED(a@/!)" "REVIEW(r)" "|" "DONE(d!)"))
677 org-use-speed-commands t 678 org-use-speed-commands t
678 org-emphasis-alist '(("*" org-bold) 679 org-emphasis-alist '(("*" org-bold)
679 ("/" org-italic) 680 ("/" org-italic)
@@ -854,14 +855,18 @@
854 ;; from there. 855 ;; from there.
855 (+org-capture-templates-setf "s" 856 (+org-capture-templates-setf "s"
856 `("SSH Config" plain (file "~/.ssh/config") 857 `("SSH Config" plain (file "~/.ssh/config")
857 ,(concat "\n\nHost %^{Host: }" 858 ,(concat "\n\nHost %^{Host}"
858 "\nHostname %\\1" 859 "\n Hostname %\\1"
859 "\nUser %^{User:|" (user-login-name) "}" 860 "\n User %^{User|%(user-login-name)}"
860 "\nIdentityFile %?" 861 "\n IdentityFile %(read-file-name \"IdentityFile: \" \"~/.ssh/\")"
861 "\nIdentitiesOnly yes" 862 "\n IdentitiesOnly yes"
862 "\nPubkeyAuthentication yes" 863 "\n PubkeyAuthentication yes"
863 "\nPort %^{Port: |22}") 864 "\n Port %^{Port|22}")
864 :unnarrowed t)) 865 ))
866 (+org-capture-templates-setf "r"
867 `("Radio station" plain (file "~/.config/radio/stations")
868 ,(concat "%^{URL} %^{Description} %^{Tags [space delimited]}")
869 :immediate-finish t))
865 (+org-capture-sort)) 870 (+org-capture-sort))
866 871
867(setup org-id 872(setup org-id
@@ -916,8 +921,8 @@
916 (:option shell-command-prompt-show-cwd t) 921 (:option shell-command-prompt-show-cwd t)
917 (:local-set +modeline-position-function 922 (:local-set +modeline-position-function
918 (lambda () (string-replace (getenv "HOME") 923 (lambda () (string-replace (getenv "HOME")
919 "~" 924 "~"
920 default-directory))) 925 default-directory)))
921 (:hook #'form-feed-mode)) 926 (:hook #'form-feed-mode))
922 927
923(setup shr 928(setup shr
@@ -1006,7 +1011,7 @@
1006 (+ace-window-display-mode +1)) 1011 (+ace-window-display-mode +1))
1007 1012
1008(setup (:straight (actually-selected-window :host github 1013(setup (:straight (actually-selected-window :host github
1009 :repo "duckwork/actually-selected-window.el")) 1014 :repo "duckwork/actually-selected-window.el"))
1010 (actually-selected-window-mode +1)) 1015 (actually-selected-window-mode +1))
1011 1016
1012(setup (:straight adaptive-wrap) 1017(setup (:straight adaptive-wrap)
@@ -1338,7 +1343,7 @@
1338 (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs)) 1343 (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs))
1339 1344
1340(setup (:straight (clean-kill-ring :host github 1345(setup (:straight (clean-kill-ring :host github
1341 :repo "NicholasBHubbard/clean-kill-ring.el")) 1346 :repo "NicholasBHubbard/clean-kill-ring.el"))
1342 (:require) 1347 (:require)
1343 (:option clean-kill-ring-prevent-duplicates t) 1348 (:option clean-kill-ring-prevent-duplicates t)
1344 (clean-kill-ring-mode +1)) 1349 (clean-kill-ring-mode +1))
@@ -1491,8 +1496,8 @@
1491 "i" #'dired-subtree-toggle)) 1496 "i" #'dired-subtree-toggle))
1492 1497
1493(setup (:straight (discord :host github 1498(setup (:straight (discord :host github
1494 :repo "davep/discord.el" 1499 :repo "davep/discord.el"
1495 :fork (:repo "duckwork/discord.el")))) 1500 :fork (:repo "duckwork/discord.el"))))
1496 1501
1497(setup (:straight dumb-jump) 1502(setup (:straight dumb-jump)
1498 (add-hook 'xref-backend-functions #'dumb-jump-xref-activate)) 1503 (add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
@@ -1514,6 +1519,10 @@
1514(setup (:straight editorconfig) 1519(setup (:straight editorconfig)
1515 (:with-mode conf-mode 1520 (:with-mode conf-mode
1516 (:file-match (rx ".editorconfig" eos))) 1521 (:file-match (rx ".editorconfig" eos)))
1522 (dolist (m '(emacs-lisp-mode
1523 lisp-mode
1524 scheme-mode))
1525 (add-to-list 'editorconfig-exclude-modes m))
1517 (editorconfig-mode +1)) 1526 (editorconfig-mode +1))
1518 1527
1519(setup (:straight electric-cursor) 1528(setup (:straight electric-cursor)
@@ -1626,7 +1635,7 @@
1626 (:+key "C-," #'embrace-commander)) 1635 (:+key "C-," #'embrace-commander))
1627 1636
1628(setup (:straight (ement :host github 1637(setup (:straight (ement :host github
1629 :repo "alphapapa/ement.el") 1638 :repo "alphapapa/ement.el")
1630 ;; `plz' is a requirement, but isn't on an elpa. 1639 ;; `plz' is a requirement, but isn't on an elpa.
1631 (setup (:straight (plz :host github 1640 (setup (:straight (plz :host github
1632 :repo "alphapapa/plz.el")) 1641 :repo "alphapapa/plz.el"))
@@ -1683,11 +1692,11 @@
1683 "C--" #'+er/contract-or-negative-argument)) 1692 "C--" #'+er/contract-or-negative-argument))
1684 1693
1685(setup (:straight (filldent :host nil 1694(setup (:straight (filldent :host nil
1686 :repo "https://codeberg.org/acdw/filldent.el")) 1695 :repo "https://codeberg.org/acdw/filldent.el"))
1687 (:+key "M-q" #'filldent-unfill-toggle)) 1696 (:+key "M-q" #'filldent-unfill-toggle))
1688 1697
1689(setup (:straight (flymake-collection :host github 1698(setup (:straight (flymake-collection :host github
1690 :repo "mohkale/flymake-collection")) 1699 :repo "mohkale/flymake-collection"))
1691 (+ensure-after-init #'flymake-collection-hook-setup)) 1700 (+ensure-after-init #'flymake-collection-hook-setup))
1692 1701
1693(setup (:straight (flyspell-correct 1702(setup (:straight (flyspell-correct
@@ -1728,7 +1737,7 @@
1728 (global-form-feed-mode +1)) 1737 (global-form-feed-mode +1))
1729 1738
1730(setup (:straight (frowny :host nil 1739(setup (:straight (frowny :host nil
1731 :repo "https://codeberg.org/acdw/frowny.el")) 1740 :repo "https://codeberg.org/acdw/frowny.el"))
1732 (:option frowny-eyes (rx (any ":=") (opt "'") (? "-"))) 1741 (:option frowny-eyes (rx (any ":=") (opt "'") (? "-")))
1733 (global-frowny-mode +1)) 1742 (global-frowny-mode +1))
1734 1743
@@ -1774,7 +1783,7 @@
1774 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode)))) 1783 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode))))
1775 1784
1776(setup (:straight (hippie-completing-read :host nil 1785(setup (:straight (hippie-completing-read :host nil
1777 :repo "https://codeberg.org/acdw/hippie-completing-read.el")) 1786 :repo "https://codeberg.org/acdw/hippie-completing-read.el"))
1778 (:+key "M-/" #'hippie-completing-read)) 1787 (:+key "M-/" #'hippie-completing-read))
1779 1788
1780(setup (:straight hungry-delete) 1789(setup (:straight hungry-delete)
@@ -1879,9 +1888,9 @@
1879 ('dark 1.0))) 1888 ('dark 1.0)))
1880 (+mapc-some-buffers #'+jabber-colors-update 1889 (+mapc-some-buffers #'+jabber-colors-update
1881 (lambda () (derived-mode-p 'jabber-chat-mode 1890 (lambda () (derived-mode-p 'jabber-chat-mode
1882 'jabber-roster-mode 1891 'jabber-roster-mode
1883 'jabber-activity-mode 1892 'jabber-activity-mode
1884 'jabber-browse-mode))))) 1893 'jabber-browse-mode)))))
1885 (dolist (mode '(jabber-chat-mode 1894 (dolist (mode '(jabber-chat-mode
1886 jabber-browse-mode 1895 jabber-browse-mode
1887 jabber-roster-mode 1896 jabber-roster-mode
@@ -1906,7 +1915,7 @@
1906 (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo)) 1915 (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
1907 1916
1908(setup (:straight (keepassxc-shim :host nil 1917(setup (:straight (keepassxc-shim :host nil
1909 :repo "https://codeberg.org/acdw/keepassxc-shim.el")) 1918 :repo "https://codeberg.org/acdw/keepassxc-shim.el"))
1910 (keepassxc-shim-activate)) 1919 (keepassxc-shim-activate))
1911 1920
1912(setup (:straight keychain-environment 1921(setup (:straight keychain-environment
@@ -1993,7 +2002,6 @@
1993 mastodon-tl--show-avatars t 2002 mastodon-tl--show-avatars t
1994 mastodon-tl--enable-proportional-fonts nil) 2003 mastodon-tl--enable-proportional-fonts nil)
1995 (:hook #'mastodon-async-mode 2004 (:hook #'mastodon-async-mode
1996 #'visual-fill-column-mode
1997 #'variable-pitch-mode 2005 #'variable-pitch-mode
1998 #'hl-line-mode 2006 #'hl-line-mode
1999 #'lin-mode)) 2007 #'lin-mode))
@@ -2049,6 +2057,7 @@
2049 :foreground unspecified))) 2057 :foreground unspecified)))
2050 `(font-lock-comment-face 2058 `(font-lock-comment-face
2051 ((,class :inherit variable-pitch 2059 ((,class :inherit variable-pitch
2060 :slant italic
2052 :foreground ,fg-comment-yellow))) 2061 :foreground ,fg-comment-yellow)))
2053 `(font-lock-comment-delimiter-face 2062 `(font-lock-comment-delimiter-face
2054 ((,class :inherit fixed-pitch 2063 ((,class :inherit fixed-pitch
@@ -2196,20 +2205,6 @@
2196 (require 'org-taskwise) 2205 (require 'org-taskwise)
2197 (define-key org-mode-map (kbd "C-x n t") #'org-taskwise-narrow-to-task))) 2206 (define-key org-mode-map (kbd "C-x n t") #'org-taskwise-narrow-to-task)))
2198 2207
2199(setup (:straight org-visibility)
2200 (:load-after org user-save)
2201 (:option org-visibility-state-file (.etc "org-visibility")
2202 org-visibility-include-regexps '("\\.org\\'"))
2203 (with-eval-after-load 'org-visibility
2204 ;; I have to add these hooks myself since I don't want it triggering on
2205 ;; /every/ save, but just when I `user-save'.
2206 (add-hook 'user-save-hook #'org-visibility-save-noerror :append)
2207 (add-hook 'kill-buffer-hook #'org-visibility-save-noerror :append)
2208 (add-hook 'kill-emacs-hook #'org-visibility-save-all-buffers :append)
2209 (add-hook 'find-file-hook #'org-visibility-load :append)
2210 (add-hook 'first-change-hook #'org-visibility-dirty :append)
2211 (add-hook 'org-cycle-hook #'org-visibility-dirty-org-cycle :append)))
2212
2213(setup (:straight org-wc) 2208(setup (:straight org-wc)
2214 (:load-after org simple-modeline) 2209 (:load-after org simple-modeline)
2215 (:also-load +org-wc) 2210 (:also-load +org-wc)
@@ -2427,6 +2422,9 @@
2427 :repo "https://codeberg.org/acdw/titlecase.el" 2422 :repo "https://codeberg.org/acdw/titlecase.el"
2428 :files ("*"))) 2423 :files ("*")))
2429 (:require titlecase +titlecase) 2424 (:require titlecase +titlecase)
2425 (add-to-list 'titlecase-skip-words-regexps (rx word-boundary
2426 (+ (any upper digit))
2427 word-boundary))
2430 (:with-map +casing-map 2428 (:with-map +casing-map
2431 (:bind "t" #'titlecase-dwim 2429 (:bind "t" #'titlecase-dwim
2432 "M-t" #'titlecase-dwim 2430 "M-t" #'titlecase-dwim
@@ -2476,9 +2474,9 @@
2476 twtxt-following _twtxt-following)) 2474 twtxt-following _twtxt-following))
2477 2475
2478(setup (:straight undo-fu) (:quit "Trying native undo functionality") 2476(setup (:straight undo-fu) (:quit "Trying native undo functionality")
2479 (:option undo-fu-allow-undo-in-region t) 2477 (:option undo-fu-allow-undo-in-region t)
2480 (:global "C-/" #'undo-fu-only-undo 2478 (:global "C-/" #'undo-fu-only-undo
2481 "C-?" #'undo-fu-only-redo)) 2479 "C-?" #'undo-fu-only-redo))
2482 2480
2483(setup (:straight undo-fu-session) 2481(setup (:straight undo-fu-session)
2484 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" 2482 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
diff --git a/lisp/+org.el b/lisp/+org.el index 6b956ae..2557671 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -730,6 +730,42 @@ When called with a prefix ARG, will still unconditionally call
730 (t #'org-return))))) 730 (t #'org-return)))))
731 731
732 732
733;;; move org archives to a dedicated file
734(defun +org-archive-monthwise (archive-file)
735 (if (file-exists-p archive-file)
736 (with-current-buffer (find-file-noselect archive-file)
737 (let ((dir (file-name-directory (file-truename archive-file)))
738 (prog (make-progress-reporter (format "Archiving from %s..." archive-file)))
739 (keep-going t))
740 (goto-char (point-min))
741 (while keep-going
742 (when-let* ((time (or (org-entry-get (point) "ARCHIVE_TIME")
743 (org-get-deadline-time (point))))
744 (parsed-time (and time
745 (org-parse-time-string time)))
746 (refile-target (format "%s%02d-%02d.org"
747 dir
748 (decoded-time-year parsed-time)
749 (decoded-time-month parsed-time)))
750 (title-str (format "#+title: Archive for %02d-%02d (%s)\n\n"
751 (decoded-time-year parsed-time)
752 (decoded-time-month parsed-time)
753 (file-truename archive-file))))
754 (unless (file-exists-p refile-target)
755 (with-current-buffer (find-file-noselect refile-target)
756 (insert title-str)
757 (save-buffer)))
758 (org-refile nil nil (list ""
759 refile-target
760 nil
761 0)))
762 (progress-reporter-update prog)
763 (org-next-visible-heading 1)
764 (when (>= (point) (point-max))
765 (setq keep-going nil)))))
766 (message "Archive file %s does not exist!" archive-file)))
767
768
733;;; el-patch 769;;; el-patch
734 770
735(el-patch-defun org-format-outline-path (path &optional width prefix separator) 771(el-patch-defun org-format-outline-path (path &optional width prefix separator)
diff --git a/machines/bob.el b/machines/bob.el index 40db7b0..5effc5b 100644 --- a/machines/bob.el +++ b/machines/bob.el
@@ -9,14 +9,16 @@
9 9
10(defun +bob-set-faces (&rest _) 10(defun +bob-set-faces (&rest _)
11 (let (;;(base-face "IBM Plex Mono") 11 (let (;;(base-face "IBM Plex Mono")
12 (base-face "Iosevka Comfy Wide") 12 ;; (var-face "IBM Plex Sans")
13 ;; (base-face "Iosevka Comfy Wide")
14 ;; (var-face "Iosevka Comfy Duo")
15 (base-face "DejaVu Sans Mono")
16 (var-face "DejaVu Sans")
13 (base-size 100) 17 (base-size 100)
18 (var-size 1.0)
14 (italic-face nil) 19 (italic-face nil)
15 ;; (bold-face nil) 20 ;; (bold-face nil)
16 (mono-face nil) 21 (mono-face nil))
17 ;; (var-face "IBM Plex Sans")
18 (var-face "Iosevka Comfy Duo")
19 (var-size 1.0))
20 (+set-faces 22 (+set-faces
21 `((default 23 `((default
22 :family ,base-face 24 :family ,base-face