From 24aefd6a6d8719d143d1e8f388ce58ef77b19893 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 12:53:55 +0100 Subject: [PATCH] update elfeed and elfeed-org Signed-off-by: Andreas Gerler --- elpa/elfeed-20210822.2129/elfeed-link.el | 82 -------- elpa/elfeed-20210822.2129/elfeed-pkg.el | 10 - .../README.md | 46 +++++ .../elfeed-autoloads.el | 105 +++++----- .../elfeed-csv.el | 0 .../elfeed-curl.el | 20 +- .../elfeed-db.el | 0 .../elfeed-lib.el | 8 +- elpa/elfeed-20241202.22/elfeed-link.el | 144 ++++++++++++++ .../elfeed-log.el | 0 elpa/elfeed-20241202.22/elfeed-pkg.el | 9 + .../elfeed-search.el | 4 +- .../elfeed-show.el | 0 .../elfeed.el | 14 +- .../xml-query.el | 4 +- .../elfeed-org-20221118.852/elfeed-org-pkg.el | 18 -- .../elfeed-org-autoloads.el | 27 +-- .../elfeed-org-pkg.el | 12 ++ .../elfeed-org.el | 184 +++++++++++------- elpa/elfeed-readme.txt | 10 - 20 files changed, 421 insertions(+), 276 deletions(-) delete mode 100644 elpa/elfeed-20210822.2129/elfeed-link.el delete mode 100644 elpa/elfeed-20210822.2129/elfeed-pkg.el rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/README.md (88%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-autoloads.el (53%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-csv.el (100%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-curl.el (98%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-db.el (100%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-lib.el (98%) create mode 100644 elpa/elfeed-20241202.22/elfeed-link.el rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-log.el (100%) create mode 100644 elpa/elfeed-20241202.22/elfeed-pkg.el rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-search.el (99%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed-show.el (100%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/elfeed.el (98%) rename elpa/{elfeed-20210822.2129 => elfeed-20241202.22}/xml-query.el (98%) delete mode 100644 elpa/elfeed-org-20221118.852/elfeed-org-pkg.el rename elpa/{elfeed-org-20221118.852 => elfeed-org-20231009.1125}/elfeed-org-autoloads.el (53%) create mode 100644 elpa/elfeed-org-20231009.1125/elfeed-org-pkg.el rename elpa/{elfeed-org-20221118.852 => elfeed-org-20231009.1125}/elfeed-org.el (69%) delete mode 100644 elpa/elfeed-readme.txt diff --git a/elpa/elfeed-20210822.2129/elfeed-link.el b/elpa/elfeed-20210822.2129/elfeed-link.el deleted file mode 100644 index 40500677..00000000 --- a/elpa/elfeed-20210822.2129/elfeed-link.el +++ /dev/null @@ -1,82 +0,0 @@ -;;; elfeed-link.el --- misc functions for elfeed -*- lexical-binding: t; -*- - -;; This is free and unencumbered software released into the public domain. - -;;; Commentary: - -;; Code for integration with org-mode. - -;; To use, add (require 'elfeed-link) somewhere in your configuration. - -;;; Code: - -(require 'org) -(require 'cl-lib) -(require 'elfeed-db) -(require 'elfeed-show) -(require 'elfeed-search) - -;;;###autoload -(defun elfeed-link-store-link () - "Store a link to an elfeed search or entry buffer. - -When storing a link to an entry, automatically extract all the -entry metadata. These can be used in the capture templates as -%:elfeed-entry-. See `elfeed-entry--create' for the list -of available props." - (cond ((derived-mode-p 'elfeed-search-mode) - (funcall (if (fboundp 'org-link-store-props) - #'org-link-store-props - (with-no-warnings #'org-store-link-props)) - :type "elfeed" - :link (format "elfeed:%s" elfeed-search-filter) - :description elfeed-search-filter)) - ((derived-mode-p 'elfeed-show-mode) - (apply - 'org-store-link-props - :type "elfeed" - :link (format "elfeed:%s#%s" - (car (elfeed-entry-id elfeed-show-entry)) - (cdr (elfeed-entry-id elfeed-show-entry))) - :description (elfeed-entry-title elfeed-show-entry) - (cl-loop for prop in - (list 'id 'title 'link 'date 'content 'content-type 'enclosures 'tags 'feed-id 'meta) - nconc (list - (intern (concat ":elfeed-entry-" (symbol-name prop))) - (funcall - (intern (concat "elfeed-entry-" (symbol-name prop))) - elfeed-show-entry))))))) - -;;;###autoload -(defun elfeed-link-open (filter-or-id) - "Jump to an elfeed entry or search. - -Depending on what FILTER-OR-ID looks like, we jump to either -search buffer or show a concrete entry." - (if (string-match "\\([^#]+\\)#\\(.+\\)" filter-or-id) - (elfeed-show-entry (elfeed-db-get-entry - (cons (match-string 1 filter-or-id) - (match-string 2 filter-or-id)))) - (elfeed) - (elfeed-search-set-filter filter-or-id))) - -;;;###autoload -(eval-after-load 'org - `(funcall - ;; The extra quote below is necessary because uncompiled closures - ;; do not evaluate to themselves. The quote is harmless for - ;; byte-compiled function objects. - ',(lambda () - (if (version< (org-version) "9.0") - (with-no-warnings - (org-add-link-type "elfeed" #'elfeed-link-open) - (add-hook 'org-store-link-functions #'elfeed-link-store-link)) - (with-no-warnings - (org-link-set-parameters - "elfeed" - :follow #'elfeed-link-open - :store #'elfeed-link-store-link)))))) - -(provide 'elfeed-link) - -;;; elfeed-link.el ends here diff --git a/elpa/elfeed-20210822.2129/elfeed-pkg.el b/elpa/elfeed-20210822.2129/elfeed-pkg.el deleted file mode 100644 index 3018653d..00000000 --- a/elpa/elfeed-20210822.2129/elfeed-pkg.el +++ /dev/null @@ -1,10 +0,0 @@ -(define-package "elfeed" "20210822.2129" "an Emacs Atom/RSS feed reader" - '((emacs "24.3")) - :commit "162d7d545ed41c27967d108c04aa31f5a61c8e16" :authors - '(("Christopher Wellons" . "wellons@nullprogram.com")) - :maintainer - '("Christopher Wellons" . "wellons@nullprogram.com") - :url "https://github.com/skeeto/elfeed") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/elfeed-20210822.2129/README.md b/elpa/elfeed-20241202.22/README.md similarity index 88% rename from elpa/elfeed-20210822.2129/README.md rename to elpa/elfeed-20241202.22/README.md index 2e167ef2..c4443351 100644 --- a/elpa/elfeed-20210822.2129/README.md +++ b/elpa/elfeed-20241202.22/README.md @@ -281,6 +281,52 @@ filter. Emacs automatically persists bookmarks across sessions. [bm]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Bookmarks.html +## Org-store-link and Org-capture + +When `org-store-link` is called from an Elfeed search or an Elfeed +entry, a link to the serach or entry is stored in Org-mode format. + +This link can be inserted into an Org-mode document. If the link is +openned, the search or entry will be shown in Elfeed. + +In addition to the link, `org-store-link` also store some additonnal +properties. You can access them in an Org-capture template with the +template expansion `%:keyword`. (`org-store-link` is automatically +called when you do a capture.) + +List of available keywords, when link is stored from an Elfeed search: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this search, also available + with %a, %A, %l and %L +- `description` : The search filter + + +List of available keywords, when link is stored from an Elfeed entry: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this entry, also available + with %a, %A, %l and %L +- `title` : Feed entry title +- `description` : Feed entry description, same as title +- `external-link` : Feed entry external link +- `date` : Date time of the feed entry publication, in + full ISO 8601 format +- `date-timestamp` : Date time of the feed entry publication, in + Org-mode active timestamp format +- `date-inactive-timestamp` : Date time of the feed entry publication, in + Org-mode inactive timestamp format +- `authors` : List of feed entry authors names, joint by a + comma +- `tags` : List of feed entry tags, in Org-mode tags + format +- `content` : Content of the feed entry +- `feed-title` : Title of the feed +- `feed-external-link` : Feed external link +- `feed-authors` : List of feed authors names, joint by a comma + +If `content` type is HTML, it is automatically embedded into an +Org-mode HTML quote. + + ## Metadata Plist All feed and entry objects have plist where you can store your own diff --git a/elpa/elfeed-20210822.2129/elfeed-autoloads.el b/elpa/elfeed-20241202.22/elfeed-autoloads.el similarity index 53% rename from elpa/elfeed-20210822.2129/elfeed-autoloads.el rename to elpa/elfeed-20241202.22/elfeed-autoloads.el index d849e119..2bb64833 100644 --- a/elpa/elfeed-20210822.2129/elfeed-autoloads.el +++ b/elpa/elfeed-20241202.22/elfeed-autoloads.el @@ -1,140 +1,145 @@ -;;; elfeed-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; elfeed-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "elfeed" "elfeed.el" (0 0 0 0)) ;;; Generated autoloads from elfeed.el (autoload 'elfeed-update "elfeed" "\ -Update all the feeds in `elfeed-feeds'." t nil) - +Update all the feeds in `elfeed-feeds'." t) (autoload 'elfeed "elfeed" "\ -Enter elfeed." t nil) - +Enter elfeed." t) (autoload 'elfeed-load-opml "elfeed" "\ Load feeds from an OPML file into `elfeed-feeds'. When called interactively, the changes to `elfeed-feeds' are saved to your customization file. -\(fn FILE)" t nil) - +(fn FILE)" t) (autoload 'elfeed-export-opml "elfeed" "\ Export the current feed listing to OPML-formatted FILE. -\(fn FILE)" t nil) - +(fn FILE)" t) (register-definition-prefixes "elfeed" '("elfeed-")) -;;;*** -;;;### (autoloads nil "elfeed-csv" "elfeed-csv.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-csv.el (register-definition-prefixes "elfeed-csv" '("elfeed-csv-")) -;;;*** -;;;### (autoloads nil "elfeed-curl" "elfeed-curl.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-curl.el (register-definition-prefixes "elfeed-curl" '("elfeed-curl-")) -;;;*** -;;;### (autoloads nil "elfeed-db" "elfeed-db.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-db.el (register-definition-prefixes "elfeed-db" '("elfeed-" "with-elfeed-db-visit")) -;;;*** -;;;### (autoloads nil "elfeed-lib" "elfeed-lib.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-lib.el (register-definition-prefixes "elfeed-lib" '("elfeed-")) -;;;*** -;;;### (autoloads nil "elfeed-link" "elfeed-link.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-link.el (autoload 'elfeed-link-store-link "elfeed-link" "\ Store a link to an elfeed search or entry buffer. When storing a link to an entry, automatically extract all the -entry metadata. These can be used in the capture templates as -%:elfeed-entry-. See `elfeed-entry--create' for the list -of available props." nil nil) - +entry metadata. These can be used in the capture templates as +`%:keyword` expansion. + +List of available keywords, when store from an Elfeed search: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this search, also available + with %a, %A, %l and %L +- `description` : The search filter + + +List of available keywords, when store from an Elfeed entry: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this entry, also available + with %a, %A, %l and %L +- `title` : Feed entry title +- `description` : Feed entry description, same as title +- `external-link` : Feed entry external link +- `date` : Date time of the feed entry publication, in + full ISO 8601 format +- `date-timestamp` : Date time of the feed entry publication, in + Org-mode active timestamp format +- `date-inactive-timestamp` : Date time of the feed entry publication, in + Org-mode inactive timestamp format +- `authors` : List of feed entry authors names, joint by a + comma +- `tags` : List of feed entry tags, in Org-mode tags + format +- `content` : Content of the feed entry +- `feed-title` : Title of the feed +- `feed-external-link` : Feed external link +- `feed-authors` : List of feed authors names, joint by a comma + +If `content` type is HTML, it is automatically embedded into an +Org-mode HTML quote.") (autoload 'elfeed-link-open "elfeed-link" "\ Jump to an elfeed entry or search. Depending on what FILTER-OR-ID looks like, we jump to either search buffer or show a concrete entry. -\(fn FILTER-OR-ID)" nil nil) - +(fn FILTER-OR-ID)") (eval-after-load 'org `(funcall ',(lambda nil (if (version< (org-version) "9.0") (with-no-warnings (org-add-link-type "elfeed" #'elfeed-link-open) (add-hook 'org-store-link-functions #'elfeed-link-store-link)) (with-no-warnings (org-link-set-parameters "elfeed" :follow #'elfeed-link-open :store #'elfeed-link-store-link)))))) -;;;*** -;;;### (autoloads nil "elfeed-log" "elfeed-log.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-log.el (register-definition-prefixes "elfeed-log" '("elfeed-log")) -;;;*** -;;;### (autoloads nil "elfeed-search" "elfeed-search.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-search.el (autoload 'elfeed-search-bookmark-handler "elfeed-search" "\ Jump to an elfeed-search bookmarked location. -\(fn RECORD)" nil nil) - +(fn RECORD)") (autoload 'elfeed-search-desktop-restore "elfeed-search" "\ Restore the state of an elfeed-search buffer on desktop restore. -\(fn FILE-NAME BUFFER-NAME SEARCH-FILTER)" nil nil) - +(fn FILE-NAME BUFFER-NAME SEARCH-FILTER)") (add-to-list 'desktop-buffer-mode-handlers '(elfeed-search-mode . elfeed-search-desktop-restore)) - (register-definition-prefixes "elfeed-search" '("elfeed-s")) -;;;*** -;;;### (autoloads nil "elfeed-show" "elfeed-show.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-show.el (autoload 'elfeed-show-bookmark-handler "elfeed-show" "\ Show the bookmarked entry saved in the `RECORD'. -\(fn RECORD)" nil nil) - +(fn RECORD)") (register-definition-prefixes "elfeed-show" '("elfeed-")) -;;;*** -;;;### (autoloads nil "xml-query" "xml-query.el" (0 0 0 0)) ;;; Generated autoloads from xml-query.el (register-definition-prefixes "xml-query" '("xml-query")) - -;;;*** -;;;### (autoloads nil nil ("elfeed-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'elfeed-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; elfeed-autoloads.el ends here diff --git a/elpa/elfeed-20210822.2129/elfeed-csv.el b/elpa/elfeed-20241202.22/elfeed-csv.el similarity index 100% rename from elpa/elfeed-20210822.2129/elfeed-csv.el rename to elpa/elfeed-20241202.22/elfeed-csv.el diff --git a/elpa/elfeed-20210822.2129/elfeed-curl.el b/elpa/elfeed-20241202.22/elfeed-curl.el similarity index 98% rename from elpa/elfeed-20210822.2129/elfeed-curl.el rename to elpa/elfeed-20241202.22/elfeed-curl.el index b24d9f9b..c8016960 100644 --- a/elpa/elfeed-20210822.2129/elfeed-curl.el +++ b/elpa/elfeed-20241202.22/elfeed-curl.el @@ -194,17 +194,17 @@ output format." (call-process elfeed-curl-program-name nil t nil "--version") (let ((version (progn - (setf (point) (point-min)) + (goto-char (point-min)) (when (re-search-forward "[.0-9]+" nil t) (match-string 0)))) (protocols (progn - (setf (point) (point-min)) + (goto-char (point-min)) (when (re-search-forward "^Protocols: \\(.*\\)$" nil t) (mapcar #'intern (split-string (match-string 1)))))) (features (progn - (setf (point) (point-min)) + (goto-char (point-min)) (when (re-search-forward "^Features: \\(.*\\)$") (split-string (match-string 1)))))) (setf (gethash elfeed-curl-program-name cache) @@ -232,18 +232,18 @@ abcdefghijklmnopqrstuvwxyz|~")) (defun elfeed-curl--parse-write-out () "Parse curl's write-out (-w) messages into `elfeed-curl--regions'." (widen) - (setf (point) (point-max) - elfeed-curl--regions ()) + (goto-char (point-max)) + (setf elfeed-curl--regions ()) (while (> (point) (point-min)) (search-backward elfeed-curl--token) - (cl-decf (point)) + (goto-char (1- (point))) (let ((end (point))) (cl-destructuring-bind (_ . header) (read (current-buffer)) - (setf (point) end) + (goto-char end) ;; Find next sentinel token (if (search-backward elfeed-curl--token nil t) (search-forward ")" nil t) - (setf (point) (point-min))) + (goto-char (point-min))) (let* ((header-start (point)) (header-end (+ (point) header)) (content-start (+ (point) header)) @@ -268,10 +268,10 @@ abcdefghijklmnopqrstuvwxyz|~")) Sets `elfeed-curl-headers'and `elfeed-curl-status-code'. Use `elfeed-curl--narrow' to select a header." (when (> (- (point-max) (point-min)) 0) - (setf (point) (point-max)) + (goto-char (point-max)) (re-search-backward "HTTP/[.0-9]+ +\\([0-9]+\\)") (setf elfeed-curl-status-code (string-to-number (match-string 1))) - (cl-loop initially (setf (point) (point-max)) + (cl-loop initially (goto-char (point-max)) while (re-search-backward "^\\([^:]+\\): +\\([^\r\n]+\\)" nil t) for key = (downcase (match-string 1)) for value = (match-string 2) diff --git a/elpa/elfeed-20210822.2129/elfeed-db.el b/elpa/elfeed-20241202.22/elfeed-db.el similarity index 100% rename from elpa/elfeed-20210822.2129/elfeed-db.el rename to elpa/elfeed-20241202.22/elfeed-db.el diff --git a/elpa/elfeed-20210822.2129/elfeed-lib.el b/elpa/elfeed-20241202.22/elfeed-lib.el similarity index 98% rename from elpa/elfeed-20210822.2129/elfeed-lib.el rename to elpa/elfeed-20241202.22/elfeed-lib.el index 4db9f1b3..c790f382 100644 --- a/elpa/elfeed-20210822.2129/elfeed-lib.el +++ b/elpa/elfeed-20241202.22/elfeed-lib.el @@ -17,7 +17,7 @@ (require 'xml) (defun elfeed-expose (function &rest args) - "Return an interactive version of FUNCTION, 'exposing' it to the user." + "Return an interactive version of FUNCTION, \"exposing\" it to the user." (lambda () (interactive) (apply function args))) (defun elfeed-goto-line (n) @@ -136,7 +136,7 @@ be relative to now (`elfeed-time-duration')." XML encoding declaration." (unless beg (setq beg (point-min))) (unless end (setq end (point-max))) - (setf (point) beg) + (goto-char beg) (when (re-search-forward "<\\?xml.*?encoding=[\"']\\([^\"']+\\)[\"'].*?\\?>" nil t) (let ((coding-system (intern-soft (downcase (match-string 1))))) @@ -279,9 +279,9 @@ systems." "Place point after first blank line, for use with `url-retrieve'. If no such line exists, point is left in place." (let ((start (point))) - (setf (point) (point-min)) + (goto-char (point-min)) (unless (search-forward-regexp "^$" nil t) - (setf (point) start)))) + (goto-char start)))) (defun elfeed--shuffle (seq) "Destructively shuffle SEQ." diff --git a/elpa/elfeed-20241202.22/elfeed-link.el b/elpa/elfeed-20241202.22/elfeed-link.el new file mode 100644 index 00000000..fd0a264d --- /dev/null +++ b/elpa/elfeed-20241202.22/elfeed-link.el @@ -0,0 +1,144 @@ +;;; elfeed-link.el --- misc functions for elfeed -*- lexical-binding: t; -*- + +;; This is free and unencumbered software released into the public domain. + +;;; Commentary: + +;; Code for integration with org-mode. + +;; To use, add (require 'elfeed-link) somewhere in your configuration. + +;;; Code: + +(require 'org) +(require 'cl-lib) +(require 'elfeed-db) +(require 'elfeed-show) +(require 'elfeed-search) + +;;;###autoload +(defun elfeed-link-store-link () + "Store a link to an elfeed search or entry buffer. + +When storing a link to an entry, automatically extract all the +entry metadata. These can be used in the capture templates as +`%:keyword` expansion. + +List of available keywords, when store from an Elfeed search: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this search, also available + with %a, %A, %l and %L +- `description` : The search filter + + +List of available keywords, when store from an Elfeed entry: +- `type` : Type of Org-mode link +- `link` : Org-mode link to this entry, also available + with %a, %A, %l and %L +- `title` : Feed entry title +- `description` : Feed entry description, same as title +- `external-link` : Feed entry external link +- `date` : Date time of the feed entry publication, in + full ISO 8601 format +- `date-timestamp` : Date time of the feed entry publication, in + Org-mode active timestamp format +- `date-inactive-timestamp` : Date time of the feed entry publication, in + Org-mode inactive timestamp format +- `authors` : List of feed entry authors names, joint by a + comma +- `tags` : List of feed entry tags, in Org-mode tags + format +- `content` : Content of the feed entry +- `feed-title` : Title of the feed +- `feed-external-link` : Feed external link +- `feed-authors` : List of feed authors names, joint by a comma + +If `content` type is HTML, it is automatically embedded into an +Org-mode HTML quote." + (cond ((derived-mode-p 'elfeed-search-mode) + (funcall (if (fboundp 'org-link-store-props) + #'org-link-store-props + (with-no-warnings #'org-store-link-props)) + :type "elfeed" + :link (format "elfeed:%s" elfeed-search-filter) + :description elfeed-search-filter)) + ((derived-mode-p 'elfeed-show-mode) + (funcall (if (fboundp 'org-link-store-props) + #'org-link-store-props + (with-no-warnings #'org-store-link-props)) + :type "elfeed" + :link (format "elfeed:%s#%s" + (car (elfeed-entry-id elfeed-show-entry)) + (cdr (elfeed-entry-id elfeed-show-entry))) + :description (elfeed-entry-title elfeed-show-entry) + :title (elfeed-entry-title elfeed-show-entry) + :external-link (elfeed-entry-link elfeed-show-entry) + ;; Format date to full ISO 8601 format + :date (format-time-string + "%FT%T" + (elfeed-entry-date elfeed-show-entry)) + ;; Concatenate authors names + :authors (mapconcat #'identity + ;; Loop on each author and extract its name + ;; Authors list get from Elfeed entry's meta + (cl-loop for author + in (plist-get (elfeed-entry-meta elfeed-show-entry) :authors) + collect (plist-get author :name)) + ", ") ;; Join names using a comma + ;; Concatenate tags in Org-mode tags format + :tags (format ":%s:" + (mapconcat #'symbol-name + (elfeed-entry-tags elfeed-show-entry) + ":")) + ;; Prepare support of different content type, only HTML for now + :content (pcase (elfeed-entry-content-type elfeed-show-entry) + (`html + ;; Embed the text into Org-mode HTML quote + (format + "#+BEGIN_EXPORT html\n%s\n#+END_EXPORT" + (elfeed-deref (elfeed-entry-content elfeed-show-entry))))) + :feed-title (elfeed-feed-title (elfeed-entry-feed elfeed-show-entry)) + :feed-external-link (elfeed-feed-url (elfeed-entry-feed elfeed-show-entry)) + ;; Concatenate feed authors names + :feed-authors (mapconcat #'identity + ;; Loop on each feed author and extract its name + ;; Authors list get from Elfeed feed + (cl-loop for author + in (elfeed-feed-author(elfeed-entry-feed elfeed-show-entry)) + collect (plist-get author :name)) + ", ") ;; Join names using a comma + )))) + +;;;###autoload +(defun elfeed-link-open (filter-or-id) + "Jump to an elfeed entry or search. + +Depending on what FILTER-OR-ID looks like, we jump to either +search buffer or show a concrete entry." + (if (string-match "\\([^#]+\\)#\\(.+\\)" filter-or-id) + (elfeed-show-entry (elfeed-db-get-entry + (cons (match-string 1 filter-or-id) + (match-string 2 filter-or-id)))) + (elfeed) + (elfeed-search-set-filter filter-or-id))) + +;;;###autoload +(eval-after-load 'org + `(funcall + ;; The extra quote below is necessary because uncompiled closures + ;; do not evaluate to themselves. The quote is harmless for + ;; byte-compiled function objects. + ',(lambda () + (if (version< (org-version) "9.0") + (with-no-warnings + (org-add-link-type "elfeed" #'elfeed-link-open) + (add-hook 'org-store-link-functions #'elfeed-link-store-link)) + (with-no-warnings + (org-link-set-parameters + "elfeed" + :follow #'elfeed-link-open + :store #'elfeed-link-store-link)))))) + +(provide 'elfeed-link) + +;;; elfeed-link.el ends here diff --git a/elpa/elfeed-20210822.2129/elfeed-log.el b/elpa/elfeed-20241202.22/elfeed-log.el similarity index 100% rename from elpa/elfeed-20210822.2129/elfeed-log.el rename to elpa/elfeed-20241202.22/elfeed-log.el diff --git a/elpa/elfeed-20241202.22/elfeed-pkg.el b/elpa/elfeed-20241202.22/elfeed-pkg.el new file mode 100644 index 00000000..388557ad --- /dev/null +++ b/elpa/elfeed-20241202.22/elfeed-pkg.el @@ -0,0 +1,9 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "elfeed" "20241202.22" + "An Emacs Atom/RSS feed reader." + '((emacs "24.3")) + :url "https://github.com/skeeto/elfeed" + :commit "a39fb78e34ee25dc8baea83376f929d7c128344f" + :revdesc "a39fb78e34ee" + :authors '(("Christopher Wellons" . "wellons@nullprogram.com")) + :maintainers '(("Christopher Wellons" . "wellons@nullprogram.com"))) diff --git a/elpa/elfeed-20210822.2129/elfeed-search.el b/elpa/elfeed-20241202.22/elfeed-search.el similarity index 99% rename from elpa/elfeed-20210822.2129/elfeed-search.el rename to elpa/elfeed-20241202.22/elfeed-search.el index d1d9b572..1fcfadde 100644 --- a/elpa/elfeed-20210822.2129/elfeed-search.el +++ b/elpa/elfeed-20241202.22/elfeed-search.el @@ -118,13 +118,13 @@ When live editing the filter, it is bound to :live.") (defun elfeed-search-last-entry () "Place point on last entry." (interactive) - (setf (point) (point-max)) + (goto-char (point-max)) (forward-line -1)) (defun elfeed-search-first-entry () "Place point on first entry." (interactive) - (setf (point) (point-min))) + (goto-char (point-min))) (defvar elfeed-search-mode-map (let ((map (make-sparse-keymap))) diff --git a/elpa/elfeed-20210822.2129/elfeed-show.el b/elpa/elfeed-20241202.22/elfeed-show.el similarity index 100% rename from elpa/elfeed-20210822.2129/elfeed-show.el rename to elpa/elfeed-20241202.22/elfeed-show.el diff --git a/elpa/elfeed-20210822.2129/elfeed.el b/elpa/elfeed-20241202.22/elfeed.el similarity index 98% rename from elpa/elfeed-20210822.2129/elfeed.el rename to elpa/elfeed-20241202.22/elfeed.el index bbfef261..81ab1d66 100644 --- a/elpa/elfeed-20210822.2129/elfeed.el +++ b/elpa/elfeed-20241202.22/elfeed.el @@ -3,6 +3,8 @@ ;; This is free and unencumbered software released into the public domain. ;; Author: Christopher Wellons +;; Package-Version: 20241202.22 +;; Package-Revision: a39fb78e34ee ;; URL: https://github.com/skeeto/elfeed ;;; Commentary: @@ -31,7 +33,7 @@ "An Emacs web feed reader." :group 'comm) -(defconst elfeed-version "3.4.1") +(defconst elfeed-version "3.4.2") (defcustom elfeed-feeds () "List of all feeds that Elfeed should follow. @@ -42,7 +44,7 @@ Items in this list can also be list whose car is the feed URL and cdr is a list of symbols to be applied to all discovered entries as tags (\"autotags\"). For example, - (setq elfeed-feeds '(\"http://foo/\" + (setq elfeed-feeds \\='(\"http://foo/\" \"http://bar/\" (\"http://baz/\" comic))) @@ -575,14 +577,14 @@ REMOVE. Examples, (elfeed-make-tagger :feed-url \"youtube\\\\.com\" - :add '(video youtube)) + :add \\='(video youtube)) (elfeed-make-tagger :before \"1 week ago\" - :remove 'unread) + :remove \\='unread) (elfeed-make-tagger :feed-url \"example\\\\.com\" - :entry-title '(not \"something interesting\") - :add 'junk) + :entry-title \\='(not \"something interesting\") + :add \\='junk) The returned function should be added to `elfeed-new-entry-hook'." (let ((after-time (and after (elfeed-time-duration after))) diff --git a/elpa/elfeed-20210822.2129/xml-query.el b/elpa/elfeed-20241202.22/xml-query.el similarity index 98% rename from elpa/elfeed-20210822.2129/xml-query.el rename to elpa/elfeed-20241202.22/xml-query.el index fd3cc2d8..a007a7f8 100644 --- a/elpa/elfeed-20210822.2129/xml-query.el +++ b/elpa/elfeed-20241202.22/xml-query.el @@ -86,10 +86,10 @@ A query is a list of matchers. - KEYWORD: filters to an attribute value (must be last) - * (an asterisk symbol): filters to content strings (must be last) -For example, to find all the 'alternate' link URL in a typical +For example, to find all the \"alternate\" link URL in a typical Atom feed: - (xml-query-all '(feed entry link [rel \"alternate\"] :href) xml)" + (xml-query-all \\='(feed entry link [rel \"alternate\"] :href) xml)" (if (null query) xml (cl-destructuring-bind (matcher . rest) query diff --git a/elpa/elfeed-org-20221118.852/elfeed-org-pkg.el b/elpa/elfeed-org-20221118.852/elfeed-org-pkg.el deleted file mode 100644 index 99c6dba4..00000000 --- a/elpa/elfeed-org-20221118.852/elfeed-org-pkg.el +++ /dev/null @@ -1,18 +0,0 @@ -(define-package "elfeed-org" "20221118.852" "Configure elfeed with one or more org-mode files" - '((elfeed "1.1.1") - (org "8.2.7") - (dash "2.10.0") - (s "1.9.0") - (cl-lib "0.5")) - :commit "3242ec0519800a58f20480c8a6e3b3337d137084" :authors - '(("Remy Honig" . "remyhonig@gmail.com")) - :maintainers - '(("Remy Honig" . "remyhonig@gmail.com")) - :maintainer - '("Remy Honig" . "remyhonig@gmail.com") - :keywords - '("news") - :url "https://github.com/remyhonig/elfeed-org") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/elfeed-org-20221118.852/elfeed-org-autoloads.el b/elpa/elfeed-org-20231009.1125/elfeed-org-autoloads.el similarity index 53% rename from elpa/elfeed-org-20221118.852/elfeed-org-autoloads.el rename to elpa/elfeed-org-20231009.1125/elfeed-org-autoloads.el index e0f0c487..ac9aaa0b 100644 --- a/elpa/elfeed-org-20221118.852/elfeed-org-autoloads.el +++ b/elpa/elfeed-org-20231009.1125/elfeed-org-autoloads.el @@ -1,29 +1,30 @@ -;;; elfeed-org-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; elfeed-org-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "elfeed-org" "elfeed-org.el" (0 0 0 0)) ;;; Generated autoloads from elfeed-org.el (autoload 'elfeed-org "elfeed-org" "\ -Hook up rmh-elfeed-org to read the `org-mode' configuration when elfeed is run." t nil) - +Hook up rmh-elfeed-org to read the `org-mode' configuration when elfeed is run." t) (register-definition-prefixes "elfeed-org" '("elfeed-org-" "rmh-elfeed-")) - -;;;*** -;;;### (autoloads nil nil ("elfeed-org-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'elfeed-org-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; elfeed-org-autoloads.el ends here diff --git a/elpa/elfeed-org-20231009.1125/elfeed-org-pkg.el b/elpa/elfeed-org-20231009.1125/elfeed-org-pkg.el new file mode 100644 index 00000000..9b6069aa --- /dev/null +++ b/elpa/elfeed-org-20231009.1125/elfeed-org-pkg.el @@ -0,0 +1,12 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "elfeed-org" "20231009.1125" + "Configure elfeed with one or more org-mode files." + '((elfeed "1.1.1") + (org "8.2.7") + (cl-lib "0.5")) + :url "https://github.com/remyhonig/elfeed-org" + :commit "fe59a96969bd321f5f9ec7317a4bc80943b94c86" + :revdesc "fe59a96969bd" + :keywords '("news") + :authors '(("Remy Honig" . "remyhonig@gmail.com")) + :maintainers '(("Remy Honig" . "remyhonig@gmail.com"))) diff --git a/elpa/elfeed-org-20221118.852/elfeed-org.el b/elpa/elfeed-org-20231009.1125/elfeed-org.el similarity index 69% rename from elpa/elfeed-org-20221118.852/elfeed-org.el rename to elpa/elfeed-org-20231009.1125/elfeed-org.el index cf2db468..6bd1af10 100644 --- a/elpa/elfeed-org-20221118.852/elfeed-org.el +++ b/elpa/elfeed-org-20231009.1125/elfeed-org.el @@ -1,9 +1,9 @@ -;;; elfeed-org.el --- Configure elfeed with one or more org-mode files +;;; elfeed-org.el --- Configure elfeed with one or more org-mode files -*- lexical-binding: t; -*- ;; Copyright (C) 2014 Remy Honig ;; Author : Remy Honig -;; Package-Requires : ((elfeed "1.1.1") (org "8.2.7") (dash "2.10.0") (s "1.9.0") (cl-lib "0.5")) +;; Package-Requires : ((elfeed "1.1.1") (org "8.2.7") (cl-lib "0.5")) ;; URL : https://github.com/remyhonig/elfeed-org ;; Version : 20170423.1 ;; Keywords : news @@ -21,6 +21,9 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . +;; Package-Version: 20231009.1125 +;; Package-Revision: fe59a96969bd + ;;; Commentary: ;; Maintaining tags for all rss feeds is cumbersome using the regular ;; flat list where there is no hierarchy and tag names are duplicated @@ -35,8 +38,6 @@ (require 'elfeed) (require 'org) (require 'org-element) -(require 'dash) -(require 's) (require 'cl-lib) (require 'xml) @@ -62,7 +63,8 @@ :type 'bool) (defcustom rmh-elfeed-org-files (list (locate-user-emacs-file "elfeed.org")) - "The files where we look to find trees with the `rmh-elfeed-org-tree-id'." + "The files where we look to find trees with the `rmh-elfeed-org-tree-id'. +In this file paths can be given relative to `org-directory'." :group 'elfeed-org :type '(repeat (file :tag "org-mode file"))) @@ -71,7 +73,7 @@ (defun rmh-elfeed-org-check-configuration-file (file) "Make sure FILE exists." - (when (not (file-exists-p file)) + (when (not (file-exists-p (expand-file-name file org-directory))) (error "Elfeed-org cannot open %s. Make sure it exists or customize the variable \'rmh-elfeed-org-files\'" (abbreviate-file-name file)))) @@ -87,16 +89,15 @@ Return t if it does or nil if it does not." (defun rmh-elfeed-org-mark-feed-ignore (url) "Set tag `rmh-elfeed-org-ignore-tag' to headlines containing the feed URL." (dolist (org-file rmh-elfeed-org-files) - (with-current-buffer (find-file-noselect - (expand-file-name org-file)) - (org-mode) + (with-temp-buffer + (insert-file-contents org-file) + (let ((org-inhibit-startup t) + (org-mode-hook nil)) + (org-mode)) (goto-char (point-min)) (while (and (search-forward url nil t) - ;; Prefer outline-on-heading-p because org-on-heading-p - ;; is obsolete but org-at-heading-p was only introduced - ;; in org 9.0: - (outline-on-heading-p t) + (org-at-heading-p t) (rmh-elfeed-org-is-headline-contained-in-elfeed-tree)) (org-toggle-tag rmh-elfeed-org-ignore-tag 'on)) (elfeed-log 'info "elfeed-org tagged '%s' in file '%s' with '%s' to be ignored" url org-file rmh-elfeed-org-ignore-tag)))) @@ -131,8 +132,9 @@ all. Which in my opinion makes the process more traceable." (pcase-let* ((current-level (org-element-property :level h)) (delta-level (- current-level level)) - (delta-tags (--map (intern (substring-no-properties it)) - (org-element-property :tags h))) + (delta-tags (mapcar (lambda (tag) + (intern (substring-no-properties tag))) + (org-element-property :tags h))) (heading (org-element-property :raw-value h)) (`(,link ,description) (org-element-map (org-element-property :title h) 'link @@ -148,18 +150,18 @@ all. Which in my opinion makes the process more traceable." ;; update the tags stack when we visit a parent or sibling (unless (> delta-level 0) (let ((drop-num (+ 1 (- delta-level)))) - (setq tags (-drop drop-num tags)))) + (setq tags (nthcdr drop-num tags)))) ;; save current level to compare with next heading that will be visited (setq level current-level) ;; save the tags that might apply to potential children of the current heading - (push (-concat (-first-item tags) delta-tags) tags) + (push (append (car tags) delta-tags) tags) ;; return the heading and inherited tags (if (and link description) - (-concat (list link) - (-first-item tags) + (append (list link) + (car tags) (list description)) - (-concat (list (if link link heading)) - (-first-item tags)))))))) + (append (list (if link link heading)) + (car tags)))))))) ;; TODO: mark wrongly formatted feeds (PoC for unretrievable feeds) (defun rmh-elfeed-org-flag-headlines (parsed-org) @@ -172,10 +174,10 @@ all. Which in my opinion makes the process more traceable." (defun rmh-elfeed-org-filter-relevant (list) "Filter relevant entries from the LIST." - (-filter + (cl-remove-if-not (lambda (entry) (and - (string-match "\\(http\\|gopher\\|file\\|entry-title\\)" (car entry)) + (string-match-p "\\(http\\|gopher\\|file\\|entry-title\\)" (car entry)) (not (member (intern rmh-elfeed-org-ignore-tag) entry)))) list)) @@ -187,21 +189,27 @@ all. Which in my opinion makes the process more traceable." (defun rmh-elfeed-org-import-headlines-from-files (files tree-id) "Visit all FILES and return the headlines stored under tree tagged TREE-ID or with the \":ID:\" TREE-ID in one list." - (-distinct (-mapcat (lambda (file) - (with-current-buffer (find-file-noselect (expand-file-name file)) - (org-mode) - (rmh-elfeed-org-cleanup-headlines - (rmh-elfeed-org-filter-relevant - (rmh-elfeed-org-convert-tree-to-headlines - (rmh-elfeed-org-import-trees tree-id))) - (intern tree-id)))) - files))) + (cl-remove-duplicates + (mapcan (lambda (file) + (with-temp-buffer + (insert-file-contents (expand-file-name file org-directory)) + (let ((org-inhibit-startup t) + (org-mode-hook nil)) + (org-mode)) + (rmh-elfeed-org-cleanup-headlines + (rmh-elfeed-org-filter-relevant + (rmh-elfeed-org-convert-tree-to-headlines + (rmh-elfeed-org-import-trees tree-id))) + (intern tree-id)))) + files) + :test #'equal)) (defun rmh-elfeed-org-convert-headline-to-tagger-params (tagger-headline) "Add new entry hooks for tagging configured with the found headline in TAGGER-HEADLINE." (list - (s-trim (s-chop-prefix "entry-title:" (car tagger-headline))) + (string-clean-whitespace + (string-remove-prefix "entry-title:" (car tagger-headline))) (cdr tagger-headline))) @@ -228,7 +236,7 @@ all. Which in my opinion makes the process more traceable." "Process headlines and taggers from FILES with org headlines with TREE-ID." ;; Warn if configuration files are missing - (-each files 'rmh-elfeed-org-check-configuration-file) + (mapc #'rmh-elfeed-org-check-configuration-file files) ;; Clear elfeed structures (setq elfeed-feeds nil) @@ -236,11 +244,12 @@ all. Which in my opinion makes the process more traceable." ;; Convert org structure to elfeed structure and register taggers and subscriptions (let* ((headlines (rmh-elfeed-org-import-headlines-from-files files tree-id)) + (subscriptions (rmh-elfeed-org-filter-subscriptions headlines)) (taggers (rmh-elfeed-org-filter-taggers headlines)) - (elfeed-taggers (-map 'rmh-elfeed-org-convert-headline-to-tagger-params taggers)) - (elfeed-tagger-hooks (-map 'rmh-elfeed-org-export-entry-hook elfeed-taggers))) - (-each headlines 'rmh-elfeed-org-export-feed) - (-each taggers 'rmh-elfeed-org-export-entry-hook)) + (elfeed-taggers (mapcar #'rmh-elfeed-org-convert-headline-to-tagger-params + (rmh-elfeed-org-filter-taggers headlines)))) + (mapc #'rmh-elfeed-org-export-feed subscriptions) + (mapc #'rmh-elfeed-org-export-entry-hook elfeed-taggers)) ;; Tell user what we did (elfeed-log 'info "elfeed-org loaded %i feeds, %i rules" @@ -249,31 +258,54 @@ all. Which in my opinion makes the process more traceable." (defun elfeed-org-run-new-entry-hook (entry) "Run ENTRY through elfeed-org taggers." - (--each elfeed-org-new-entry-hook - (funcall it entry))) + (dolist (hook elfeed-org-new-entry-hook) + (funcall hook entry))) (defun rmh-elfeed-apply-autotags-now-advice () "Make entry title matching rules works with `elfeed-apply-autotags-now'." (interactive) (let* ((headlines (rmh-elfeed-org-import-headlines-from-files rmh-elfeed-org-files rmh-elfeed-org-tree-id)) - (subscriptions (rmh-elfeed-org-filter-subscriptions headlines)) (taggers (rmh-elfeed-org-filter-taggers headlines)) - (elfeed-taggers (-map 'rmh-elfeed-org-convert-headline-to-tagger-params taggers)) - (entry-match-taggers (-map (lambda (tagger-params) - (elfeed-make-tagger - :entry-title (nth 0 tagger-params) - :add (nth 1 tagger-params))) elfeed-taggers))) + (elfeed-taggers (mapcar #'rmh-elfeed-org-convert-headline-to-tagger-params taggers)) + (entry-match-taggers (mapcar (lambda (tagger-params) + (elfeed-make-tagger + :entry-title (nth 0 tagger-params) + :add (nth 1 tagger-params))) + elfeed-taggers))) (with-elfeed-db-visit (entry feed) (dolist (tagger entry-match-taggers) (funcall tagger entry))))) (defun rmh-elfeed-org-filter-taggers (headlines) "Filter tagging rules from the HEADLINES in the tree." - (-non-nil (-map - (lambda (headline) - (when (s-starts-with? "entry-title" (car headline)) headline)) - headlines))) + (cl-remove-if-not #'identity + (mapcar + (lambda (headline) + (when (string-prefix-p "entry-title" (car headline)) + headline)) + headlines))) + +(defun rmh-elfeed-org-filter-subscriptions (headlines) + "Filter subscriptions to rss feeds from the HEADLINES in the tree." + (cl-remove-if-not #'identity + (mapcar + (lambda (headline) + (let* ((text (car headline)) + (link-and-title (and (string-match "^\\[\\[\\(http.+?\\)\\]\\[\\(.+?\\)\\]\\]" text) + (list (match-string-no-properties 0 text) + (match-string-no-properties 1 text) + (match-string-no-properties 2 text)))) + (hyperlink (and (string-match "^\\[\\[\\(http.+?\\)\\]\\(?:\\[.+?\\]\\)?\\]" text) + (list (match-string-no-properties 0 text) + (match-string-no-properties 1 text))))) + (cond ((string-prefix-p "http" text) headline) + (link-and-title (append (list (nth 1 hyperlink)) + (cdr headline) + (list (nth 2 link-and-title)))) + (hyperlink (append (list (nth 1 hyperlink)) (cdr headline)))))) + headlines))) + (defun rmh-elfeed-org-convert-opml-to-org (xml level) "Convert OPML content to Org format. @@ -292,12 +324,13 @@ Argument LEVEL current level in the tree." Argument OPML-FILE filename of the OPML file." (interactive "FInput OPML file: ") (let* ((xml (xml-parse-file opml-file)) - (content (rmh-elfeed-org-convert-opml-to-org xml 0))) + (content (rmh-elfeed-org-convert-opml-to-org xml 0))) (with-current-buffer (get-buffer-create "*Imported Org Feeds*") (erase-buffer) (insert (format "* Imported Feeds :%s:\n" rmh-elfeed-org-tree-id)) (insert content) - (org-mode) + (let ((org-inhibit-startup t)) + (org-mode)) (pop-to-buffer (current-buffer))))) @@ -307,15 +340,22 @@ Argument ORG-BUFFER the buffer to write the OPML content to." (let (need-ends opml-body) (with-current-buffer org-buffer - (org-mode) + (let ((org-inhibit-startup t) + (org-mode-hook nil)) + (org-mode)) (org-element-map (rmh-elfeed-org-import-trees rmh-elfeed-org-tree-id) 'headline (lambda (h) (let* ((current-level (org-element-property :level h)) (tags (org-element-property :tags h)) (heading (org-element-property :raw-value h)) - (link-and-title (s-match "^\\[\\[\\(http.+?\\)\\]\\[\\(.+?\\)\\]\\]" heading)) - (hyperlink (s-match "^\\[\\[\\(http.+?\\)\\]\\(?:\\[.+?\\]\\)?\\]" heading)) + (link-and-title (and (string-match "^\\[\\[\\(http.+?\\)\\]\\[\\(.+?\\)\\]\\]" heading) + (list (match-string-no-properties 0 heading) + (match-string-no-properties 1 heading) + (match-string-no-properties 2 heading)))) + (hyperlink (and (string-match "^\\[\\[\\(http.+?\\)\\]\\(?:\\[.+?\\]\\)?\\]" heading) + (list (match-string-no-properties 0 heading) + (match-string-no-properties 1 heading)))) url title opml-outline) @@ -325,7 +365,7 @@ Argument ORG-BUFFER the buffer to write the OPML content to." (setq opml-body (concat opml-body (format " %s\n" (make-string (* 2 level) ? )))))) - (cond ((s-starts-with? "http" heading) + (cond ((string-prefix-p "http" heading) (setq url heading) (setq title (or (elfeed-feed-title (elfeed-db-get-feed heading)) "Unknown"))) (link-and-title (setq url (nth 1 link-and-title)) @@ -338,7 +378,7 @@ Argument ORG-BUFFER the buffer to write the OPML content to." (make-string (* 2 current-level) ? ) (xml-escape-string title) (xml-escape-string url))) - (unless (s-starts-with? "entry-title" heading) + (unless (string-prefix-p "entry-title" heading) (unless (member rmh-elfeed-org-tree-id tags) ;; insert category title only when it is neither the top ;; level elfeed node nor the entry-title node @@ -362,8 +402,12 @@ The first level elfeed node will be ignored. The user may need edit the output because most of Feed/RSS readers only support trees of 2 levels deep." (interactive) (let ((opml-body (cl-loop for org-file in rmh-elfeed-org-files - concat (rmh-elfeed-org-convert-org-to-opml - (find-file-noselect (expand-file-name org-file)))))) + concat + (with-temp-buffer + (insert-file-contents + (expand-file-name org-file org-directory)) + (rmh-elfeed-org-convert-org-to-opml + (current-buffer)))))) (with-current-buffer (get-buffer-create "*Exported OPML Feeds*") (erase-buffer) (insert "\n") @@ -378,24 +422,26 @@ because most of Feed/RSS readers only support trees of 2 levels deep." (xml-mode) (pop-to-buffer (current-buffer))))) +(defun rmh-elfeed-org-process-advice () + "Advice to add to `elfeed' to load the configuration before it is run." + (rmh-elfeed-org-process rmh-elfeed-org-files rmh-elfeed-org-tree-id)) ;;;###autoload (defun elfeed-org () "Hook up rmh-elfeed-org to read the `org-mode' configuration when elfeed is run." (interactive) (elfeed-log 'info "elfeed-org is set up to handle elfeed configuration") - ;; Use an advice to load the configuration. - (defadvice elfeed (before configure-elfeed activate) - "Load all feed settings before elfeed is started." - (rmh-elfeed-org-process rmh-elfeed-org-files rmh-elfeed-org-tree-id)) + (advice-add #'elfeed :before #'rmh-elfeed-org-process-advice) (add-hook 'elfeed-new-entry-hook #'elfeed-org-run-new-entry-hook) (advice-add 'elfeed-apply-autotags-now :after #'rmh-elfeed-apply-autotags-now-advice) - (add-hook 'elfeed-http-error-hooks (lambda (url status) - (when rmh-elfeed-org-auto-ignore-invalid-feeds - (rmh-elfeed-org-mark-feed-ignore url)))) - (add-hook 'elfeed-parse-error-hooks (lambda (url error) - (when rmh-elfeed-org-auto-ignore-invalid-feeds - (rmh-elfeed-org-mark-feed-ignore url))))) + (add-hook 'elfeed-http-error-hooks + (lambda (url _status) + (when rmh-elfeed-org-auto-ignore-invalid-feeds + (rmh-elfeed-org-mark-feed-ignore url)))) + (add-hook 'elfeed-parse-error-hooks + (lambda (url _error) + (when rmh-elfeed-org-auto-ignore-invalid-feeds + (rmh-elfeed-org-mark-feed-ignore url))))) (provide 'elfeed-org) diff --git a/elpa/elfeed-readme.txt b/elpa/elfeed-readme.txt deleted file mode 100644 index 1bc0be0d..00000000 --- a/elpa/elfeed-readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -Elfeed is a web feed client for Emacs, inspired by notmuch. See -the README for full documentation. - -Notice: Before stamping a new release the following places need to -be updated: -* NEWS.md -* elfeed.el (`elfeed-version') -* elfeed-pkg.el -* web/elfeed-web-pkg.el -* Makefile (VERSION) -- 2.47.3