summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/misc.el7
-rw-r--r--custom/jao-custom-gnus.el14
2 files changed, 11 insertions, 10 deletions
diff --git a/attic/misc.el b/attic/misc.el
index 9c3488f..a26f130 100644
--- a/attic/misc.el
+++ b/attic/misc.el
@@ -205,6 +205,13 @@
(add-hook 'gnus-part-display-hook 'jao-gnus-remove-anchors)
+;;;; find message id
+(defun jao-gnus-file-message-id (filename)
+ (with-temp-buffer
+ (insert-file filename)
+ (goto-char (point-min))
+ (when (re-search-forward "^[Mm]essage-[Ii][Dd]: <?\\([^><]+\\)>?" nil t)
+ (match-string 1))))
;;; mu4e
(jao-load-path "mu4e")
(use-package mu4e
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index cf50ed3..732c358 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -1,4 +1,5 @@
-;;; gnus configuration -*- lexical-binding: t -*-
+;; gnus configuration -*- lexical-binding: t -*-
+
;;; Feature switching vars
(defvar jao-gnus-use-local-imap nil)
@@ -405,7 +406,7 @@
(g (directory-file-name (file-name-directory file)))
(g (replace-regexp-in-string (file-name-as-directory maildir) "" g))
(g (replace-regexp-in-string (file-name-as-directory newsdir) "" g))
- (g (cond (nntp (concat n-server g))
+ (g (cond (nntp (concat n-server ":" g))
((file-name-directory g)
(replace-regexp-in-string "^\\([^/]+\\)/"
(concat m-server ":\\1/")
@@ -417,16 +418,9 @@
(nntp g)
(t (replace-regexp-in-string ":\\." ":" g)))))
-(defun jao-gnus-file-message-id (filename)
- (with-temp-buffer
- (insert-file filename)
- (goto-char (point-min))
- (when (re-search-forward "^[Mm]essage-[Ii][Dd]: <?\\([^><]+\\)>?" nil t)
- (match-string 1))))
-
(defun jao-gnus-goto-file (filename &optional _page)
(let ((group (jao-gnus-file-to-group filename))
- (id (jao-gnus-file-message-id filename)))
+ (id (file-name-nondirectory filename)))
(if (and group id)
(org-gnus-follow-link group id)
(message "Couldn't get relevant info for switching to Gnus."))))