sp1ff/elfeed-score

Link Rules Erased When Scoring Applied

Closed this issue · 3 comments

Hello,

I'm a big fan of elfeed-score, thanks very much for building and sharing it. I am trying to add some of the new "link" rules and cannot get them to work. I updated elfeed and elfeed-score when I noticed this problem and reviewed the manual but couldn't find how to fix this.

Below is the process I've tried, with some variations:

Before starting elfeed or elfeed-score, I add the following rules to my scoring file:

 ("link"
  (:text "reddit" :value 30 :type s)
  (:text "twitter" :value 30 :type s)

I close the file and then start elfeed and call m-x elfeed-score-score . The messages buffer shows that my score file has been written, and if I re-open it, the two rules in the "link" list are gone. All of my other rules seems to be applying and updating normally. I've also tried calling m-x elfeed-score-load-score-file after making the change and before scoring.

Toggling the debugger hasn't helped, as apparently whatever is happening is not an error and is not getting captured in the messages buffer. My best current guess is that my rules are somehow not formed right and so they're not getting picked up by the scoring function, and then are overwritten by the "pre-existing rules" (in this case, nothing), but I can't figure out what the problem might be.

Any help troubleshooting would be greatly appreciated.

sp1ff commented

Hey @jpowellrussell, ah, well, erm... you've found a rather embarrassing bug. My bad.

I never updated elfeed-score-serde-load-score-file to read the link rules, so the internal variable holding them is nil after you load your shiny new score file, so when you write it back out, elfeed-score duly omits serializing them; hence the "disappearing" behaviour.

Give me a day or so & I'll have a bug fix release out; sorry for the trouble.

Say-- I'm intrigued by the fact that you seem to read Twitter via RSS-- where do you get your feed?

Ah, thanks very much! I was getting very confused and am a rank beginner with elisp, so I hadn't had a chance to try to work out all the steps that were happening.

And as for reading twitter by RSS, I recently discovered a somewhat awkward workaround that neveretheless seems to be working alright. The tl;dr is to set up an app with the twitter API and contact it via a google apps script that spits out a url pointing to an RSS feed populated by the contents of what the twitter app returns. More details below:

You can find the instructions and code here. However, to get it to work right, you'll need to follow the modified steps submitted by a user in this issue. I also ran into some confusing problems that seemed to clear up after I found advice to regenerate the oauth tokens after you've modified the twitter app's permissions. Lastly, I'm still wrestling with trying to get it to populate the RSS with the full_text attribute of the extended_tweet, because right now I end up needing to open about 80-90% of tweets in my browser to get the full message.

I imagine the script could likely be further optimized for fetching tweets to be read in a reader (such as getting pictures), but I know even less javascript than I do elisp. Hope that helps!

sp1ff commented

Thanks, Jeff-- I'm definitely going to look into generating RSS feeds from Twitter.
This bug should be fixed in release 0.7.8. Not sure how you install elfeed-score, but the source & Emacs package are available here on GitHub now, and the new build should be available from MELPA or MELPA-stable in the next 24 hours or so.
Sorry for the trouble.