diff options
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/jao-custom-gnus.el | 26 | 
1 files changed, 21 insertions, 5 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index ece5167..440a44f 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -448,13 +448,20 @@    :config    (add-to-list 'org-capture-templates                 '("X" "arXiv" entry (file "notes/physics/arxiv.org") -                 "* %:subject\n\n  %i \n  %(jao-gnus-org-url)" +                 "* %:subject\n\n(jao-gnus-org-paragraph \"%i\")"                   :immediate-finish t)                 t)    (org-capture-upgrade-templates org-capture-templates))  (defvar jao-gnus-org-url nil) -(defun jao-gnus-org-url () (or jao-gnus-org-url "")) +(defun jao-gnus-org-paragraph (x) +  (with-temp-buffer +    (insert "  " (string-trim (or x "")) "\n  ") +    (goto-char 0) +    (fill-paragraph) +    (goto-char (point-max)) +    (open-rectangle 0 (point)) +    (concat (buffer-string) "\n  " (or jao-gnus-org-url ""))))  (defun jao-gnus-arXiv-capture ()    (interactive) @@ -469,8 +476,9 @@      (when (re-search-forward "^Link" nil t)        (beginning-of-line)        (setq jao-gnus-org-url (org-eww-url-below-point)))) -  ;; (goto-char (point-max)) -  (org-capture nil "X")) +  (org-capture nil "X") +  (set-mark (point)) +  (gnus-article-show-summary))  ;;; article  ;;;; config, headers @@ -605,7 +613,15 @@      (gnus-demon-scan-news)      (jao-gnus--notify))) -(gnus-demon-add-handler 'jao-gnus--scan 5 1) +(defun jao-gnus-add-demon () +  (gnus-demon-add-handler 'jao-gnus--scan 5 1)) + +(jao-gnus-add-demon) +(gnus-demon-init) + +;; this is, in theory, not needed; but at some point in the way to emacs +;; version 31 this idle timers have ceased to work after a sleep/awake cycle +(add-to-list 'jao-sleep-awake-functions #'jao-gnus-add-demon)  ;;; add-ons  ;;;; notifications  | 
