diff options
author | Yuchen Pei <id@ypei.org> | 2023-10-18 11:04:04 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2023-10-18 11:04:04 +1100 |
commit | c846b2cea042ac3666d340305f46325cde68d674 (patch) | |
tree | 06c7e2523649ff34625275bfa06dd66d0af920b6 /emacs | |
parent | 9d7aabd29f758306343d992489a7caafbf933b86 (diff) |
[emacs] Some minor fixes
gnus: prefers plaintext
my-buffer: fixes a bug
my-org: fixing a local var
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init/ycp-gnus.el | 8 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-buffer.el | 4 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-org.el | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el index e4e24a4..f344cfc 100644 --- a/emacs/.emacs.d/init/ycp-gnus.el +++ b/emacs/.emacs.d/init/ycp-gnus.el @@ -35,6 +35,9 @@ (setq mm-encrypt-option nil ; use 'guided if you need more control mm-sign-option nil)) ; same +(my-package mm-decode + (setq mm-discouraged-alternatives '("text/html" "text/richtext"))) + ;;; `mml-sec' (my-package mml-sec (setq mml-secure-openpgp-encrypt-to-self t @@ -181,12 +184,15 @@ (setq gnus-treat-display-smileys nil) (setq gnus-article-x-face-too-ugly ".*") (my-keybind gnus-article-mode-map - "M-w" #'my-gnus-article-copy-region)) + "M-w" #'my-gnus-article-copy-region) + (setq gnus-visible-headers + "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:\\|^In-Reply-To")) ;;; gnus-desktop-notify (my-package gnus-desktop-notify (:delay 30) (gnus-desktop-notify-mode) (setq gnus-desktop-notify-groups 'gnus-desktop-notify-explicit) + (setq gnus-desktop-notify-uncollapsed-levels 2) ) (my-package gnus-demon diff --git a/emacs/.emacs.d/lisp/my/my-buffer.el b/emacs/.emacs.d/lisp/my/my-buffer.el index 2027b5d..ef988f8 100644 --- a/emacs/.emacs.d/lisp/my/my-buffer.el +++ b/emacs/.emacs.d/lisp/my/my-buffer.el @@ -48,7 +48,7 @@ (completing-read "Major mode: " (mapcar 'prin1-to-string (my-get-buffer-modes)))))) - (switch-to-buffer (my-read-buffer-by-mode))) + (switch-to-buffer (my-read-buffer-by-mode mode))) (defun my-read-buffer-by-mode (mode) (if (eq mode 'shell-mode) @@ -66,7 +66,7 @@ With a prefix-arg, prompt for major mode." (interactive "P") (if arg (call-interactively 'my-switch-to-buffer-matching-major-mode) - (switch-to-buffer (my-read-buffer-by-mode)))) + (switch-to-buffer (my-read-buffer-by-mode major-mode)))) (defun my-buffer-find-mode (mode) "Find a buffer of a given MODE not in a live window." diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el index 01082d8..69a4a9b 100644 --- a/emacs/.emacs.d/lisp/my/my-org.el +++ b/emacs/.emacs.d/lisp/my/my-org.el @@ -211,7 +211,8 @@ notes file." (let ((remove (list (match-beginning 0) (match-end 0))) (desc (when (match-end 2) (match-string-no-properties 2))) (link (match-string-no-properties 1)) - (target (alist-get 'archive my-gnus-group-default-targets))) + (target (alist-get 'archive my-gnus-group-default-targets)) + (new-link)) (pcase-dolist (`(,re . ,info) my-gnus-group-alist) (when (and (string-match re link) (alist-get 'archive info)) |