Elfeed and Goto-address

The other day I was reading an Elfeed entry and wanted to follow a link so with the point on the link, I typed Ctrl+c Ctrl+o as usual. Nothing happened. In Elfeed you can click on a link or press Return when the point is on it to follow a link so it wasn’t much of an inconvenience but then I vaguely remembered that I’d done something to make Ctrl+c Ctrl+o work in non-Org buffers.

I browsed through my init.el file until I found the code and used it to find the blog post I’d written about it. Looking at the code, it was immediately clear why it wasn’t working: you have to specify which modes you want it to work in. I just added the mode that Elfeed uses for viewing stories and everything worked fine. The necessary mode to enable is elfeed-show-mode.

In case you’re in similar predicament, here’s the code I’m using. As I mention in the post, goto-address-mode is built in so despite the use-package there’s no package to load.

(use-package goto-addr
  :hook ((compilation-mode . goto-address-mode)
         (prog-mode . goto-address-prog-mode)
         (elfeed-show-mode . goto-address-mode)
         (eshell-mode . goto-address-mode)
         (shell-mode . goto-address-mode))
  :bind (:map goto-address-highlight-keymap
              ("C-c C-o" . goto-address-at-point))
  :commands (goto-address-prog-mode
             goto-address-mode))
This entry was posted in General and tagged . Bookmark the permalink.