What I would like to accomplish is this:
- Allow emacs daemon to start with my start up applications like normal
- When I open an emacs frame I would like only the first one to start with my rss news feed from
elfeed
- When I open another frame I would like it to just open to the scratch buffer
I start the emacs daemon upon start up on startup with emacs --daemon
added to my Autostart list. I have emacsclient -a "" -c "$@"
bound to my launcher on my dock.
In my .emacs
file I initialize elfeed
just fine but my way of trying to start it is:
(elfeed-update) ;; Update elfeed when daemon starts
(defun start-elfeed ()
"This function will start elfeed and update it."
(if (not (get-buffer "*elfeed-search*"))
(progn
(elfeed)
(switch-to-buffer "*elfeed-search*")
)))
(add-hook 'after-make-frame-functions 'start-elfeed)
Now when I start emacs without the daemon it starts up in the scratch
buffer and elfeed
has not started, even in a background buffer. When I start it with emacsclient -a "" -c "$@"
the daemon seems to start but a frame never pops up. In the terminal I get this error:
*ERROR*: Wrong number of arguments: (lambda nil "This function will start elfeed and update it." (if (not (get-buffer "*elfeed-search*")) (progn (elfeed) (switch-to-buffer "*elfeed-search*")))), 1
I am new to customizing emacs with elisp and could use some help here. Does that error mean that my start-elfeed
function has the wrong number of arguments or am I using the after-make-frame-functions
hook wrong?
Thank you for any pointers here.
Some other info:
- Distro: Xubuntu 14.04
- Emacs 24.5