skeeto / elfeed

An Emacs web feeds client
The Unlicense
1.47k stars 111 forks source link

Feeds not (fully) updating #454

Closed arouene closed 2 years ago

arouene commented 2 years ago

Hello,

I have 83 feeds configured with elfeed-org. Usually when I update with my other feed software I get 200+ news per day, but with elfeed I merely get 10 news. I can update several times to get 2 or more news, but I'm not getting nearly as much news with elfeed than with my other software. As an example, I got 2 news for Hacker News, but 59 with my other soft.

In the elfeed-log I have several error messages :

[2022-01-20 16:59:29] [info]: elfeed-org is set up to handle elfeed configuration
[2022-01-20 16:59:29] [info]: elfeed-org loaded 83 feeds, 0 rules
[2022-01-20 16:59:32] [info]: Elfeed update: January 20 2022 16:59:32 CET
[2022-01-20 16:59:32] [error]: http://rss.slashdot.org/Slashdot/slashdot: (wrong-number-of-arguments #[(ad--addoit-function) \304\305  
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:33] [error]: http://sebsauvage.net/links/?do=rss: (wrong-number-of-arguments #[(ad--addoit-function) \304\305    
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:33] [error]: http://www.nextinpact.com/rss/news.xml: (wrong-number-of-arguments #[(ad--addoit-function) \304\305 
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:33] [error]: https://hnrss.org/frontpage: (wrong-number-of-arguments #[(ad--addoit-function) \304\305    
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:34] [error]: http://www.numerama.com/rss/news.rss: (wrong-number-of-arguments #[(ad--addoit-function) \304\305   
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:36] [error]: https://www.phoronix.com/rss.php: (wrong-number-of-arguments #[(ad--addoit-function) \304\305   
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:36] [error]: http://www.futura-sciences.com/rss/actualites.xml: (wrong-number-of-arguments #[(ad--addoit-function) \304\305  
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)
[2022-01-20 16:59:42] [error]: https://www.bleepingcomputer.com/feed/: (wrong-number-of-arguments #[(ad--addoit-function) \304\305 
"\210 \211)\207 [ad-return-value rmh-elfeed-org-files rmh-elfeed-org-tree-id ad--addoit-function nil rmh-elfeed-org-process] 4] 2)

I'm not sure if it is related, I can't understand what's going on.

I tried with emacs -Q -l emacs-test/init.el, here is what I used :

init.el

(setq user-init-file (or load-file-name (buffer-file-name)))
(setq user-emacs-directory (file-name-directory user-init-file))

;; Configure package.el to include MELPA.
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t)
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") t)
(package-initialize)

;; Ensure that use-package is installed.
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package t))

(require 'use-package)
(require 'use-package-ensure)

(setq use-package-always-ensure t)

;; Customize settings go to the void
(setq-default custom-file null-device)

(use-package elfeed
  :commands elfeed
  :bind
  ("C-x w" . elfeed)
  (:map elfeed-search-mode-map
        ("t" . elfeed-mark-as-starred))
  :init
  (defun mark-youtube-feeds ()
    (elfeed-make-tagger :feed-url "youtube\\.com"
                        :add 'video))
  :hook
  (elfeed-new-entry . #'mark-youtube-feeds)
  :custom
  (elfeed-use-curl t)
  (elfeed-set-max-connections 32)
  (elfeed-set-timeout 36000)
  :config
  ;; display article in a column of 80 chars
  (setq shr-width 80)

  ;; press q when a filter is set, unset the filter instead of quitting
  (defun elfeed-clear-filter-instead-of-quit (fun &rest args)
    "If a filter is set in elfeed search, pressing q will clear the filter
     instead of quitting"
    (if (eq elfeed-search-filter (default-value 'elfeed-search-filter))
        (apply fun args)
      (elfeed-search-clear-filter)))
  (advice-add 'elfeed-search-quit-window :around #'elfeed-clear-filter-instead-of-quit)

  ;; custom functions
  (defun elfeed-mark-as-starred ()
    "Mark select articles in elfeed-search as starred"
    (interactive)
    (elfeed-search-toggle-all 'star)))

(use-package elfeed-org
  :after elfeed
  :config
  (elfeed-org))

orgfeeds.org (it's only a subset of what I use, but I can reproduce the problem with this)

* Elfeed Feeds                                                       :elfeed:
** Informatique                                               :informatique:
*** Linux                                                           :linux:
**** https://www.phoronix.com/rss.php
Phoronix.com is the leading resource for Linux news, especially as it pertains
to Linux hardware support, graphics drivers, and other enthusiast topics.
**** https://lwn.net/headlines/rss
**** https://www.youtube.com/feeds/videos.xml?channel_id=UCd4XwUn2Lure2NHHjukoCwA
Linux for Everyone
**** https://www.youtube.com/feeds/videos.xml?channel_id=UC5UAwBUum7CPN5buc-_N1Fw
The Linux Experiment
*** DevOps                                                         :devops:
*** News                                                             :news:
**** http://rss.slashdot.org/Slashdot/slashdot
Slashdot
**** https://hnrss.org/frontpage
HackerNews
*** Golang                                                             :go:
**** https://blog.golang.org/feed.atom?format=xml
*** Rust                                                             :rust:
**** https://blog.rust-lang.org/feed.xml
**** https://this-week-in-rust.org/atom.xml
**** https://rust-osdev.com/rss.xml

** Science
*** Vulgarisation
**** http://couleur-science.eu/rss.php
**** https://www.youtube.com/feeds/videos.xml?channel_id=UCt_t6FwNsqr3WWoL6dFqG9w
BrainCraft
**** https://www.youtube.com/feeds/videos.xml?channel_id=UCeiYXex_fwgYDonaTcSIk6w
MinuteEarth
**** https://www.youtube.com/feeds/videos.xml?channel_id=UCUHW94eEFW7hkUMVaZz4eDg
MinutePhysics
*** News                                                             :news:
**** http://www.futura-sciences.com/rss/actualites.xml
Futura-Sciences

** Blog                                                               :blog:
*** http://nullprogram.com/feed/
*** http://jvns.ca/atom.xml
Julia Evans
*** https://www.brendangregg.com/blog/rss.xml
Brendan Gregg

* Inbox
** https://www.reddit.com/r/listentothis.rss                       :musique:
Subreddit listentothis
** https://irreal.org/blog/
Emacs, irreal blog
** https://planet.emacslife.com/atom.xml                             :emacs:
Emacs, planet emacslife
** https://sachachua.com/blog/feed/                                  :emacs:
Emacs, Sacha Hua
** https://www.reddit.com/r/emacs.rss                         :reddit:emacs:
Reddit emacs
** https://www.reddit.com/r/orgmode.rss                       :reddit:emacs:
Reddit emacs org-mode
arouene commented 2 years ago

I isolated the problem to the use of :hook of use-package

This works :

  :config
  (add-hook 'elfeed-new-entry-hook
    (elfeed-make-tagger :feed-url "youtube\\.com"
                        :add '(video youtube)))

This doesn't :

  :init
  (defun mark-youtube-feeds ()
    (elfeed-make-tagger :feed-url "youtube\\.com"
                        :add '(video youtube)))
  :hook
  (elfeed-new-entry . #'mark-youtube-feeds)

But I don't know why, use-package documentation says this is equivalent.

I will stick with the (add-hook) form for now.