ebe4c60264
This reverts commit 29c78ce841
and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
79 lines
2.3 KiB
EmacsLisp
79 lines
2.3 KiB
EmacsLisp
;;; packages.el --- elfeed Layer packages File for Spacemacs
|
|
;;
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
|
;;
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;;; License: GPLv3
|
|
|
|
(setq elfeed-packages
|
|
'(elfeed
|
|
elfeed-goodies
|
|
elfeed-org
|
|
elfeed-web
|
|
))
|
|
|
|
(defun elfeed/init-elfeed ()
|
|
(use-package elfeed
|
|
:defer t
|
|
:init (spacemacs/set-leader-keys "af" 'elfeed)
|
|
:config
|
|
(progn
|
|
(evilified-state-evilify-map elfeed-search-mode-map
|
|
:mode elfeed-search-mode
|
|
:eval-after-load elfeed-search
|
|
:bindings
|
|
"c" 'elfeed-db-compact
|
|
"gr" 'elfeed-update
|
|
"gR" 'elfeed-search-update--force
|
|
"gu" 'elfeed-unjam
|
|
"o" 'elfeed-load-opml
|
|
"q" 'quit-window
|
|
"w" 'elfeed-web-start
|
|
"W" 'elfeed-web-stop)
|
|
(evilified-state-evilify-map elfeed-show-mode-map
|
|
:mode elfeed-show-mode
|
|
:eval-after-load elfeed-show
|
|
:bindings
|
|
"q" 'quit-window
|
|
(kbd "C-j") 'elfeed-show-next
|
|
(kbd "C-k") 'elfeed-show-prev)
|
|
(evil-define-key 'visual elfeed-search-mode-map
|
|
"+" 'elfeed-search-tag-all
|
|
"-" 'elfeed-search-untag-all
|
|
"b" 'elfeed-search-browse-url
|
|
"y" 'elfeed-search-yank))))
|
|
|
|
(defun elfeed/pre-init-elfeed-goodies ()
|
|
(spacemacs|use-package-add-hook elfeed
|
|
:post-config
|
|
(progn
|
|
(elfeed-goodies/setup)
|
|
(evil-define-key 'evilified elfeed-show-mode-map
|
|
"o" 'elfeed-goodies/show-ace-link))))
|
|
|
|
(defun elfeed/init-elfeed-goodies ()
|
|
(use-package elfeed-goodies :commands elfeed-goodies/setup))
|
|
|
|
(defun elfeed/pre-init-elfeed-org ()
|
|
(when (boundp 'rmh-elfeed-org-files)
|
|
(spacemacs|use-package-add-hook elfeed
|
|
:pre-config (elfeed-org))))
|
|
|
|
(defun elfeed/init-elfeed-org ()
|
|
(use-package elfeed-org
|
|
:defer t
|
|
:if (boundp 'rmh-elfeed-org-files)))
|
|
|
|
(defun elfeed/init-elfeed-web ()
|
|
(use-package elfeed-web
|
|
:defer t
|
|
:commands elfeed-web-stop
|
|
:init (when elfeed-enable-web-interface
|
|
;; TODO check if the port is already in use
|
|
;; hack to force elfeed feature to be required before elfeed-search
|
|
(require 'elfeed)
|
|
(elfeed-web-start))))
|