aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-10-18 11:04:04 +1100
committerYuchen Pei <id@ypei.org>2023-10-18 11:04:04 +1100
commitc846b2cea042ac3666d340305f46325cde68d674 (patch)
tree06c7e2523649ff34625275bfa06dd66d0af920b6 /emacs/.emacs.d/lisp
parent9d7aabd29f758306343d992489a7caafbf933b86 (diff)
[emacs] Some minor fixes
gnus: prefers plaintext my-buffer: fixes a bug my-org: fixing a local var
Diffstat (limited to 'emacs/.emacs.d/lisp')
-rw-r--r--emacs/.emacs.d/lisp/my/my-buffer.el4
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el3
2 files changed, 4 insertions, 3 deletions
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))