summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-gnus.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-08-06 20:17:37 +0100
committerjao <jao@gnu.org>2022-08-06 20:18:05 +0100
commit983e7375af65594411c842503e1a8e46086df50b (patch)
treeb6e28cd5687278aea746bdeeae6dfc96e8d87c18 /custom/jao-custom-gnus.el
parentb889be5a91b968d8364152e6691d5b08757fefe9 (diff)
downloadelibs-983e7375af65594411c842503e1a8e46086df50b.tar.gz
elibs-983e7375af65594411c842503e1a8e46086df50b.tar.bz2
gnus: simpler open email function
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r--custom/jao-custom-gnus.el14
1 files changed, 4 insertions, 10 deletions
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."))))