3

I want to configure gnus so that it displays all mails from gmeil, even the read ones by default. I tried setting the gnus parameter, but something seems to be wrong with the regexp.

My .gnus.el looks as follow:

(require 'nnir)

(setq user-mail-address "R.M.Krug@gmail.com")
(setq user-full-name "Rainer M Krug")

(setq gnus-select-method 
         '(nnimap "gmail"
              (nnimap-address "imap.gmail.com")
              (nnimap-server-port 993)
              (nnimap-stream ssl)
              (nnimap-authinfo-file "~/.authinfo")))

;; Configure outbound mail (SMTP)
(setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-default-smtp-server "smtp.gmail.com"
      send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it
      smtpmail-smtp-service 587
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "R.M.Krug@gmail.com" nil))
      smtpmail-debug-info t
      smtpmail-debug-verb t
      )

;; set renderer for html mail to w3m in emacs
(setq mm-text-html-renderer 'w3m)
(setq gnus-inhibit-images nil)

;; set gnus-parameter
(setq gnus-parameters
  '(("nnimap.*"
     (gnus-use-scoring nil)
     (expiry-wait . 2)
     (display . all))))

;;[[http://stackoverflow.com/questions/4982831/i-dont-want-to-expire-mail-in-gnus]]
(setq gnus-large-newsgroup 'nil)

(setq-default
 gnus-summary-line-format "%U%R%z%I %(%&user-date;  %-15,15f  %s%)\n"
 gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
 gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
)

(setq gnus-thread-sort-functions
      '(
        (not gnus-thread-sort-by-date)
        (not gnus-thread-sort-by-number)
        ))

but I still don't see all emails without explicitly loading them.

Rainer
  • 8,347
  • 1
  • 23
  • 28
  • What's strange is that someone else seems to be using it successfully, at http://www.cataclysmicmutation.com/2010/11/multiple-gmail-accounts-in-gnus/. – Brady Trainor Sep 19 '14 at 10:46
  • Or at any rate, I see `("nnimap work:[Gmail]/.*" (display . all) ...` in his code; wonder if it worked for him? – Brady Trainor Sep 19 '14 at 10:55
  • 1
    Why don't you use `(setq gnus-parameters '((".*" (display . all))))`? I can also use `"IN.*"` for `INBOX`, so the regex seems to be working. Maybe `nnimap` isn't really present enough for your regex? If you really needed something like that, maybe it will work to put a `gnus-summary-line-format` in the select method? – Brady Trainor Sep 22 '14 at 09:22

1 Answers1

7

The other option is the one I use: use the parameter editor within gnus itself. Go to your group/mailbox and hit "G p" over it. This will bring up an editor where you can paste this into it:

((gnus-use-scoring nil)
 (expiry-wait . 2)
 (display . all))

Note that you can also do this on a topic too, letting you set the parameters for lots of groups in one go.

One advantage of this approach is that it makes it very easy to put groups in the right area based on a topic. IE, if you have a topic called "inboxes" where you put all the mail groups you always want to see all the mail from, it inherits the topic properties (like those above) and by simply putting the group into that topic it gets the configuration you want for it. On the other hand, if you put a group into a topic called something like "mailing lists" and it doesn't have those properties, then you'll only see new things you haven't read. It makes management a bit easier, IMHO. You just put the groups in the right place and you're done! Or move them later when you want to change how they behave.

Wes Hardaker
  • 21,735
  • 2
  • 38
  • 69
  • That works - but I would like to have this in my .gnus.el so that I have all the configs in one place. Where is this saved, so that I could copy it there? – Rainer Mar 29 '13 at 15:38
  • it's saved in your ~/.newsrc.eld file and stored with the group information. IE, it's a binding to the live group (or topic) itself. – Wes Hardaker Mar 29 '13 at 17:34