Sending to pocket from elfeed

I often use elfeed to go quickly through my RSS subscriptions. There are some of them that I want to take more time to read.

Yes, it is mostly text but it is super useful.

I send the entries that I need more time to read to pocket. I do that because I can use pocket client in my mobile phone or in the desktop or wherever the hell I am. I can also use any spare moment in the bus or the airplane even without internet access.

Elfeed by default has nothing like a pocket integration but as you’ll probably know emacs lisp is always here to help.

One of the less known pocket features is the possibility to send links via email. We will make good use of it. Remember that you need to send the email from the same email address you have in pocket.

In order to send emails I am using Msmtp. My configuration for gmail is something like:

Remember to create an application password for this. Never use your main password 😉

Msmtp is a beautiful tool to send email. You can send an email from the command line just with:

That said let’s create the binding in elfeed config. If we check the source for elfeed show we can see that we can retrieve the URL of the current entry with:

Piece of cake. Let’s then let’s define an interactive function to send the email:

I always add the final message to remember what is happening and avoid having an impossible to understand message like “Shell command successful” in the editor.

Now in my use-package for elfeed I only need to add the following in the config section

This way when in an article I can just press x and the article will be saved to pocket.

Happy emacsing!

Leave a Reply

Your email address will not be published. Required fields are marked *