diff options
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r-- | custom/jao-custom-gnus.el | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 603fe89..6eb7952 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -448,18 +448,28 @@ :config (add-to-list 'org-capture-templates '("X" "arXiv" entry (file "notes/physics/arxiv.org") - "* %:subject\n %i" :immediate-finish t) + "* %:subject\n\n %i \n %(jao-gnus-org-url)" + :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-arXiv-capture () (interactive) + (unless (derived-mode-p '(gnus-summary-mode)) (gnus-article-show-summary)) + (setq jao-subject (gnus-summary-article-subject)) (gnus-summary-select-article-buffer) (gnus-article-goto-part 0) - (forward-paragraph) (setq-local transient-mark-mode 'lambda) (set-mark (point)) - (goto-char (point-max)) + (forward-paragraph) + (save-excursion + (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")) ;;; article |