diff options
author | 2025-02-26 19:16:46 -0500 | |
---|---|---|
committer | 2025-02-26 19:17:26 -0500 | |
commit | f295e5d45255181e18ece88c42e3ed67d940ef4e (patch) | |
tree | 9774ddca3dbf8d9207e643ad4c41f45c6395b70c /.emacs.d | |
parent | 2fb274f4921d4a2e8fa2fd228a714fcbff96d95c (diff) | |
download | configs-f295e5d45255181e18ece88c42e3ed67d940ef4e.tar.gz configs-f295e5d45255181e18ece88c42e3ed67d940ef4e.tar.xz configs-f295e5d45255181e18ece88c42e3ed67d940ef4e.zip |
Various updates
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/eshell/alias | 2 | ||||
-rw-r--r-- | .emacs.d/init.el | 10 | ||||
-rw-r--r-- | .emacs.d/lisp/bandali-essentials.el | 18 | ||||
-rw-r--r-- | .emacs.d/lisp/bandali-gnus.el | 16 | ||||
-rw-r--r-- | .emacs.d/lisp/bandali-ibuffer.el | 6 | ||||
-rw-r--r-- | .emacs.d/lisp/bandali-misc.el | 80 |
6 files changed, 120 insertions, 12 deletions
diff --git a/.emacs.d/eshell/alias b/.emacs.d/eshell/alias index 450b8e2..a1a1e40 100644 --- a/.emacs.d/eshell/alias +++ b/.emacs.d/eshell/alias @@ -17,4 +17,4 @@ alias vi find-file $1 alias vim find-file $1 alias mbsync mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc $* alias getmail getmail --getmaildir $XDG_CONFIG_HOME/getmail --rcfile getmailrc $* -alias m mbsync kelar; getmail +alias m mbsync kelar; mbsync ia; getmail diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3b6c40a..7ced652 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -113,7 +113,12 @@ plain variables. This means that `setopt' will execute any ;; are used, and also to have NonGNU ELPA on older Emacsel as well. package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("nongnu" . "https://elpa.nongnu.org/nongnu/")) + ("nongnu" . "https://elpa.nongnu.org/nongnu/") + ("melpa" . "https://melpa.org/packages/")) + package-archive-priorities + '(("gnu" . 3) + ("nongnu" . 2) + ("melpa" . 1)) ;; List of the packages I use from GNU ELPA and NonGNU ELPA. package-selected-packages '(delight @@ -121,7 +126,8 @@ plain variables. This means that `setopt' will execute any elpher eat vertico marginalia orderless corfu consult embark embark-consult - wgrep)) + wgrep + slack)) (unless package-archive-contents (package-refresh-contents)) diff --git a/.emacs.d/lisp/bandali-essentials.el b/.emacs.d/lisp/bandali-essentials.el index e7024af..27e1836 100644 --- a/.emacs.d/lisp/bandali-essentials.el +++ b/.emacs.d/lisp/bandali-essentials.el @@ -364,16 +364,16 @@ ;; `version' (b/keymap-global-set "C-c e v" #'emacs-version) -;; Add prompt indicator to `completing-read-multiple'. +;; Prompt indicator for `completing-read-multiple' for older Emacsen. ;; https://bugs.gnu.org/76028 -(defun crm-indicator (args) - (cons (format "[CRM%s] %s" - (replace-regexp-in-string - "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" - crm-separator) - (car args)) - (cdr args))) -(advice-add #'completing-read-multiple :filter-args #'crm-indicator) +(when (< emacs-major-version 31) + (advice-add + #'completing-read-multiple :filter-args + (lambda (args) + (cons (format "[CRM%s] %s" + (string-replace "[ \t]*" "" crm-separator) + (car args)) + (cdr args))))) (with-eval-after-load 'vertico (setopt diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el index 61a7d34..97d3527 100644 --- a/.emacs.d/lisp/bandali-gnus.el +++ b/.emacs.d/lisp/bandali-gnus.el @@ -53,6 +53,17 @@ (nnmail-fancy-expiry-targets (("from" ".*" "nnimap+kelar:Archive.%Y")))) (nnimap + "ia" + (nnimap-stream plain) + (nnimap-address "127.0.0.1") + (nnimap-server-port 143) + (nnimap-authenticator plain) + (nnimap-user "bandali@archive.local") + ;; (nnmail-expiry-wait immediate) + (nnmail-expiry-target nnmail-fancy-expiry-target) + (nnmail-fancy-expiry-targets + (("from" ".*" "nnimap+ia:Archive.%Y")))) + (nnimap "shemshak" (nnimap-stream plain) (nnimap-address "127.0.0.1") @@ -250,6 +261,10 @@ (address "bandali@kelar.org") ("X-Message-SMTP-Method" "smtp mail.kelar.org 587") (gcc "nnimap+kelar:INBOX")) + ("nnimap\\+ia:.*" + (address "bandali@archive.org") + ("X-Message-SMTP-Method" "smtp mail.archive.org 587") + (gcc "nnimap+ia:INBOX")) ("nnimap\\+shemshak:.*" (address "amin@shemshak.org") ("X-Message-SMTP-Method" "smtp mail.shemshak.org 587") @@ -336,6 +351,7 @@ `(("Gnus" visible nil nil) (("misc" visible nil nil)) (("csc" visible nil nil)) + (("ia" visible nil nil)) (("kelar" visible nil nil)) (("shemshak" visible nil nil)) (("debian" visible nil nil)) diff --git a/.emacs.d/lisp/bandali-ibuffer.el b/.emacs.d/lisp/bandali-ibuffer.el index 909f7b8..930b000 100644 --- a/.emacs.d/lisp/bandali-ibuffer.el +++ b/.emacs.d/lisp/bandali-ibuffer.el @@ -42,6 +42,12 @@ (mode . eshell-mode) (mode . shell-mode) (mode . term-mode))) + ("slack" + (or + (mode . slack-mode) + (mode . slack-buffer-mode) + (mode . slack-message-buffer-mode) + (name . "\\*slack.+"))) ("tex" (or (mode . tex-mode) diff --git a/.emacs.d/lisp/bandali-misc.el b/.emacs.d/lisp/bandali-misc.el index eccee15..7a74888 100644 --- a/.emacs.d/lisp/bandali-misc.el +++ b/.emacs.d/lisp/bandali-misc.el @@ -125,5 +125,85 @@ (b/keymap-set m "C-x C-q" #'wgrep-change-to-wgrep-mode) (b/keymap-set m "C-c C-c" #'wgrep-finish-edit))) +(with-eval-after-load 'slack + (slack-register-team + :name "archive" + :token + (auth-source-pick-first-password + :host "iaslack" :user "bandalies") + :cookie + (auth-source-pick-first-password + :host "iaslack" :user "bandalies^cookie") + :default t + :subscribed-channels nil) + (slack-register-team + :name "archive-canada" + :token + (auth-source-pick-first-password + :host "iacslack" :user "bandalies") + :cookie + (auth-source-pick-first-password + :host "iacslack" :user "bandalies^cookie") + :subscribed-channels nil) + (setopt + slack-display-team-name nil + slack-prefer-current-team nil) + (b/keymap-global-set "C-c s l j" #'slack-select-rooms) + (b/keymap-global-set "C-c s l u" #'slack-select-unread-rooms) + (b/keymap-global-set "C-c s l U" #'slack-user-select) + (b/keymap-global-set "C-c s l E" #'slack-insert-emoji) + ;; (b/keymap-global-set "C-c s l E" #'emojify-insert-emoji) + (b/keymap-global-set "C-c s l i" #'slack-im-select) + (b/keymap-global-set "C-c s l e" #'slack-message-edit) + (b/keymap-global-set "C-c s l g" #'slack-message-redisplay) + (b/keymap-global-set "C-c s l r" #'slack-message-add-reaction) + (b/keymap-global-set "C-c s l t" #'slack-thread-show-or-create) + (b/keymap-global-set "C-c s l G" #'slack-conversations-list-update-quick) + (b/keymap-global-set "C-c s l q" #'slack-quote-and-reply) + (b/keymap-global-set "C-c s l Q" #'slack-quote-and-reply-with-link) + (let ((m slack-mode-map)) + (b/keymap-set m "@" #'slack-message-embed-mention) + (b/keymap-set m "#" #'slack-message-embed-channel)) + (let ((m slack-thread-message-buffer-mode-map)) + (b/keymap-set m "C-c '" #'slack-message-write-another-buffer) + (b/keymap-set m "@" #'slack-message-embed-mention) + (b/keymap-set m "#" #'slack-message-embed-channel)) + (let ((m slack-message-buffer-mode-map)) + (b/keymap-set m "C-c '" #'slack-message-write-another-buffer))) +(defvar b/slack-ws--reconnect-timer nil) +(advice-add + 'slack-start + :before + (lambda (&rest _) + (unless b/slack-ws--reconnect-timer + (setq + b/slack-ws--reconnect-timer + (run-with-timer + 0 (* 25 60) + (lambda () + (slack-ws--reconnect (oref slack-current-team :id) t) + ;; (slack-im-list-update) + )))))) +(advice-add + 'slack-stop + :before + (lambda (&rest _) + (when b/slack-ws--reconnect-timer + (cancel-timer b/slack-ws--reconnect-timer) + (setq b/slack-ws--reconnect-timer nil)))) +(b/keymap-global-set "C-c s l s" #'slack-start) +(b/keymap-global-set "C-c s l k" #'slack-stop) +(add-hook 'slack-message-buffer-mode-hook #'emojify-mode) +(add-hook 'slack-thread-message-buffer-mode-hook #'emojify-mode) +(add-hook 'slack-message-buffer-mode-hook #'visual-line-mode) +(add-hook 'slack-thread-message-buffer-mode-hook #'visual-line-mode) + +(with-eval-after-load 'alert + (setopt alert-default-style 'notifications)) + +(with-eval-after-load 'emojify + (setopt + emojify-display-style 'unicode)) + (provide 'bandali-misc) ;;; bandali-misc.el ends here |