# Spacemacs and Elfeed

I’ve recently re-installed Spacemacs because I’ve missed the Vim editing style quite a lot. Unfortunately, it has given me a lot of trouble getting it to the point of being configured the way that I want it to be configured - as in, the way I have my emacs configured.

You’d think that wouldn’t be such a problem, but it can be. Spacemacs layers are pre-configured and sometimes they are quite a hassle to edit if you don’t know lisp. Usually they have workarounds, and most are configured such that they are configured almost exactly as they are in the default way as they would be in emacs default anyway, but sometimes not.

Case and point: Elfeed. Elfeed is an RSS reader, and it is brilliant. I use it in emacs all the time. It’s absolutely wonderful, fast, and generally I get most of my news and stuff I want to read from it on most days. Why? Because I can search through all my feeds and avoid all the heavy, spammy, laggy stuff they load on pages these days. I can read the nice text and if I want to view it on the page (which I often do if I like the article), I simply hit a key and it opens automatically in the browser for me. It’s simple, neat, fast, and effective.

Unfortunately, the Spacemacs Elfeed Layer has a few changes which are not easy to remove. For instance, it adds a nice enough side buffer with the stories on the left hand screen with a buffer of the story on the right for reading, but it becomes a problem on a small screen because then the words don’t properly wrap around - which then forces you to turn on line wrap each time you hit a new story (because it changes into a new buffer for each new story).

Not knowing enough lisp, it was a difficult enough challenge to fix this problem - a problem which I had encountered over four months previously. Fortunately, at the time, I produced a little hack as a solution at the time:


(lambda ()
(inhibit-modification-hooks t))
(setq-local truncate-lines nil)
(setq-local shr-width 85)
(set-buffer-modified-p nil))
(set-face-attribute 'variable-pitch (selected-frame) :font "monofur for Powerline-21")
(setq-local left-margin-width 15)
(setq-local right-margin-width 15)

))


Unfortunately, after re-installing a few months later, this no longer really seems to work (N.B. I also now use Operator Mono as a font).

Fortunately, this did partly work:


(setq elfeed-show-mode-hook
(lambda ()
(set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family "Century Schoolbook" :size 12))
(setq fill-column 120)
(setq elfeed-show-entry-switch #'my-show-elfeed)))

(defun my-show-elfeed (buffer)
(with-current-buffer buffer