remyhonig/elfeed-org

Error with sample configuration

Closed this issue · 13 comments

I'm new to elfeed and elfeed-org, so I hope I'm not making a stupid mistake. I used the sample org file and configuration from the README page but when I M-x elfeed, I get this error:

(#[(url error) "���\0Â	!�" [rmh-elfeed-org-auto-ignore-invalid-feeds url rmh-elfeed-org-mark-feed-ignore] 2])

Any ideas what might be going wrong here?

I have the same error.

I guess there is some hidden character in the HTML output. I think this is solved by copying from the raw version of the README (see the "RAW" button on github). Does this fix it for you?

I get this too, when executing (elfeed-org) with C-x C-e.

I'm getting the exact same issue as @wdenton

I'm experiencing the same problem and I don't think it's got anything to do with e hidden HTML character, I tried rewriting the org file with my feeds several times from hand...

Here are the contents of my feeds.org file:

Here is my corresponding elfeed config:

(setq elfeed-use-curl 't)
(setq elfeed-curl-program-name '("/usr/bin/curl"))
(setq rmh-elfeed-org-files (list "~/org/feeds.org"))
(require 'elfeed-org)
(elfeed-org)

starting elfeed manually (M-x elfeed) simply says

End of entries.

and nothing is displayed - so far so good. Starting elfeed-org (M-x elfeed-org) does not do anything. At all. Eval-ing (C-x C-e) elfeed-org from a buffer spawns the following error message:

(#[(url error) "���� !�" [rmh-elfeed-org-auto-ignore-invalid-feeds url rmh-elfeed-org-mark-feed-ignore] 2])

I'm running GNU Emacs 26.1 on Mac OS X, installed with homebrew with --with-cocoa and --with-librsvg, I've also got prelude. I've installed both elfeed and elfeed-org from ELPA.

Any hints regarding how to fix this would be much appreciated.

Do you have :elfeed: tag?

@MaxSkyfire as a matter of fact I didn't have the tag, but now that I've added it for both my first level item (xkcd) and my second level item (https://xkcd.com/rss.xml) I'm still getting the same error...

I have the same problem...

bump.

could we (the affected) do anything to help troubleshoot the issue?

I am getting this error after using elfeed org for a few tears now i think. Tried removing all feeds in feeds.org to narrow down a bad url but seems to fail with any entry.

Edit. Problem was on my side. I was setting elfeed-org file var in different palces

@JohnJohnstone thanks for updating your comment

I was having the same issue. To anybody who has the same problem, make sure you aren't accidentally deferring elfeed-org (i.e. by having (use-package-always-defer) enabled), and make sure you have a top-level heading in your elfeed.org that has the :elfeed: tag, like in the sample elfeed.org file. Rectifying those two things fixed the problem for me.

So I did some looking into this and I think I found what looks like the "error", and it might not actually be an error at all. I looked at the definition of elfeed-org and essentially went through and C-x C-e'd each of the internal sexps to evaluate them by hand.

(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))
  (add-hook 'elfeed-new-entry-hook #'elfeed-org-run-new-entry-hook)
  (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)))))

When I eval the last (add-hook ...) I get the following response in the mini-buffer, look familiar?

((lambda (url error) (if rmh-elfeed-org-auto-ignore-invalid-feeds (progn ...))) #[(url error) "����Â	!�" [rmh-elfeed-org-auto-ignore-invalid-feeds url rmh-elfeed-org-mark-feed-ignore] 2])

On the left it looks like a snipped sample of the lambda that was added as a hook to 'elfeed-parse-error-hooks:

((lambda (url error) (if rmh-elfeed-org-auto-ignore-invalid-feeds (progn ...)))

And on the right it looks like some sort of internal representation of the same lambda(?). Maybe a pretty-printed bytecode version or something like that, I don't know enough about elisp to be able to say exactly.

 #[(url error) "���Â	!�" [rmh-elfeed-org-auto-ignore-invalid-feeds url rmh-elfeed-org-mark-feed-ignore] 2])

I speculate that add-hook is returning the lambda it's adding as a hook to 'elfeed-parse-error-hooks and since it's the last statement of the definition of elfeed-org that same lambda it being returned and shown in the mini-buffer.

Importantly if this is the case then this actually isn't an error at all, just a return value which happens to contain the word "error" showing up in the mini-buffer. If someone sees this "error" they might not be experiencing any true error at all, and if they happen to be experiencing a real error any of the solutions in this thread could be completely unrelated.

The fix to this confusion might be as simple as just returning t at then end of the elfeed-org definition, but again I don't know enough about elisp to know if this is appropriate.