diff options
| author | Yuchen Pei <id@ypei.org> | 2026-11-22 10:23:14 +1100 |
|---|---|---|
| committer | Yuchen Pei <id@ypei.org> | 2026-11-22 10:23:14 +1100 |
| commit | 134a55d2d4ca84a003562b77e648d281313c19fd (patch) | |
| tree | b32771a88e26b07292a9152c672d0e4696471970 | |
| parent | 9a14021aa5bc48091d5623c7a50e0f1d8d8ed948 (diff) | |
[emacs] Some small fixes
- recentf includes dirs
- flyspell does not interfere with speed keys
- add message lock mode
- gnus X m default save all
- bbdb don't add noreply or undisclosed recipients
| -rw-r--r-- | emacs/.emacs.d/init/ycp-dired.el | 1 | ||||
| -rw-r--r-- | emacs/.emacs.d/init/ycp-editing.el | 9 | ||||
| -rw-r--r-- | emacs/.emacs.d/init/ycp-gnus.el | 9 | ||||
| -rw-r--r-- | emacs/.emacs.d/lisp/my/my-gnus.el | 7 |
4 files changed, 23 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init/ycp-dired.el b/emacs/.emacs.d/init/ycp-dired.el index 056bfce..e8364b1 100644 --- a/emacs/.emacs.d/init/ycp-dired.el +++ b/emacs/.emacs.d/init/ycp-dired.el @@ -46,6 +46,7 @@ "C-x C-j" #'dired-jump ;; to open a dir in dired, find-file is more than sufficient "C-x d" #'dired-jump) + (add-hook 'dired-mode-hook (lambda () (recentf-add-file default-directory))) ) (my-package my-dired diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el index 031ae31..768e9bd 100644 --- a/emacs/.emacs.d/init/ycp-editing.el +++ b/emacs/.emacs.d/init/ycp-editing.el @@ -145,7 +145,14 @@ (my-package flyspell (my-keybind flyspell-mode-map "C-." nil - )) + ) + (define-advice flyspell-check-word-p + (:around (fn) skip-org-speed-commands) + (if (and (eq this-command 'org-self-insert-command) + (bound-and-true-p org-use-speed-commands) + (bound-and-true-p org-speed-command)) + nil ; a speed key, not typing + (funcall fn)))) (my-package pyim (:delay 30) diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el index 2a3b64f..14dff9f 100644 --- a/emacs/.emacs.d/init/ycp-gnus.el +++ b/emacs/.emacs.d/init/ycp-gnus.el @@ -63,7 +63,9 @@ (my-keybind message-mode-map "M-n" #'my-message-after-next-cited "M-p" #'my-message-before-previous-cited - "C-c M-e" #'my-message-elide-remaining) + "C-c M-e" #'my-message-elide-remaining + "C-c l" #'my-message-send-lock-mode) + (add-hook 'message-send-hook #'my-message-check-send-lock) ) (my-package smtpmail @@ -186,6 +188,7 @@ (setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date)) (setq gnus-summary-next-group-on-exit nil) + (setq gnus-summary-save-parts-default-mime ".") ) (my-package gnus-art @@ -230,7 +233,9 @@ (setq bbdb-mail-user-agent 'gnus-user-agent) (setq bbdb-update-records-p 'create) (setq bbdb-message-clean-mail-function 'my-bbdb-clean-mail) - (setq bbdb-message-ignore-mail-re "not?[-_]?reply") + (setq bbdb-message-ignore-mail-re "not?[-_]?reply\\|:[ \t]*;\\'") + (setq bbdb-message-ignore-name-re + "\\`\\(undisclosed[- ]recipients?\\|recipient list not shown\\)\\'") (setq bbdb-add-name nil) (require 'my-bbdb) (my-keybind bbdb-mode-map "C-c C-c" #'my-bbdb-done) diff --git a/emacs/.emacs.d/lisp/my/my-gnus.el b/emacs/.emacs.d/lisp/my/my-gnus.el index 7623548..36f440d 100644 --- a/emacs/.emacs.d/lisp/my/my-gnus.el +++ b/emacs/.emacs.d/lisp/my/my-gnus.el @@ -91,6 +91,13 @@ (while (looking-at-p citexp) (beginning-of-line 2)))) +(define-minor-mode my-message-send-lock-mode + "Block sending of the current message buffer." + :lighter (:propertize " SEND-LOCKED" face warning)) + +(defun my-message-check-send-lock () + (when my-message-send-lock-mode (user-error "Sending locked"))) + (defun my-gnus-summary-exit-like-mu4e () (interactive) (if (get-buffer-window (gnus-buffer-live-p gnus-article-buffer)) (gnus-summary-expand-window) |
