Other GNU Emacs Gnus tips

If you have GNU Emacs Gnus check RSS feeds, when you have many feeds defined, Gnus startup can take a considerable amount of time, as it redownloads each RSS feed. This can be quite problematic, especially when you are on a slow connection. Also sometimes you need to just check your email quickly without downloading RSS feeds.

To accomplish this:

  1. Setup you email access for Gnus in ~/.emacs and subscribe to your Inbox and the needed folders.
  2. Exit Emacs.
  3. $ cp ~/.newsrc ~/.newsrc.mail
    $ cp ~/.newsrc.eld ~/.newsrc.eld.mail
  4. Enter Emacs and Gnus and add the need RSS feeds, you wish to be subscribed to.
  5. Exit Emacs.
  6. $ cp ~/.newsrc ~/.newsrc.mail-rss
    $ cp ~/.newsrc.eld ~/.newsrc.eld.mail-rss
  7. Enter Emacs and Gnus.
  8. Unsubscribe from your mail Inbox and all the mail folders, leaving only the RSS feeds as subscriptions.
  9. Exit Emacs.
  10. $ cp ~/.newsrc ~/.newsrc.rss
    $ cp ~/.newsrc.eld ~/.newsrc.eld.rss
  11. Add the following code to your ~/.emacs:

(defun shiroikuma/gnus-mail-rss ()
  "Use GNUS to read email and RSS streams."
  (interactive)
  (copy-file "~/.newsrc.mail-rss" "~/.newsrc" 't)
  (copy-file "~/.newsrc.eld.mail-rss" "~/.newsrc.eld" 't))
(defun shiroikuma/gnus-mail ()
  "Use GNUS to read email only."
  (interactive)
  (copy-file "~/.newsrc.mail" "~/.newsrc" 't)
  (copy-file "~/.newsrc.eld.mail" "~/.newsrc.eld" 't))
(defun shiroikuma/gnus-rss ()
  "Use GNUS to read RSS streams only."
  (interactive)
  (copy-file "~/.newsrc.rss" "~/.newsrc" 't)
  (copy-file "~/.newsrc.eld.rss" "~/.newsrc.eld" 't))
  1. Restart Emacs.

Now when you want to just check your email, run the following one time before starting Gnus:

M-x shiroikuma/gnus-mail

When you want to only check RSS feeds:

M-x shiroikuma/gnus-rss

When you want to check both:

M-x shiroikuma/gnus-mail-rss


.