1. Gnus and Gmail imap. I don't remember all of the details of getting it set up, but this part of the .gnus file has the basic set-up for getting your mail from the gmail imap server:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Using gmail IMAP for receiving mail, credentials in .authinfo (setq gnus-select-method '(nnml "")) (add-to-list 'gnus-secondary-select-methods '(nnimap "gmail" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-stream ssl))) ;; make gnus NOT ignore [Gmail] mailboxes (setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")I use my Princeton email address primarily, so to send mail through Princeton smtp I use
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Using Princeton SMTP for sending mail (setq message-sendmail-envelope-from 'header) (setq send-mail-function 'smtpmail-send-it message-send-mail-function 'smtpmail-send-it) (setq smtpmail-default-smtp-server "smtp.princeton.edu" smtpmail-smtp-server "smtp.princeton.edu" smtpmail-smtp-service 587 smtpmail-starttls-credentials '(("smtp.princeton.edu" 587 nil nil))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This is the "proper" way to set up the "from" information for new mail ;; Note I BCC to myself @ gmail so that it gets stored in my gmail (setq gnus-posting-styles '((".*" (name "Daniel Swain") (address "dswain@princeton.edu") (BCC "dan.t.swain@gmail.com"))))For both I use a ~/.authinfo file which should look something like this:
machine imap.gmail.com login dan.t.swain@gmail.com password mysupersecretpassword port 993 machine smtp.princeton.edu login dswain password myothersupersecretpassword port 587This bit gets gnus to stop asking me how many old emails I want to download. You could change 'some to some big number, but I keep my inbox pretty clean, so it's not a big deal.
;; don't ask how many emails to download (setq gnus-large-newsgroup 'nil)The final bit took me the longest to figure out. Every time I got new email, gnus would only show the new email in the buffer and hide all of my old emails until I read the new one and hit M-g again to rescan the inbox. A bit of C-h k to figure out what the function call was led me to this solution, in which I bind C-c C-c in the summary buffer to "Check for new mail", which is a call to the same function as M-g but with 'all as an argument.
;; tells gnus to get new mail and also display all old mail (define-key gnus-summary-mode-map (kbd "C-c C-c") (lambda () (interactive) (gnus-summary-rescan-group 'all)))
2. w3m and Aquamacs 2.0 preview 4b. When I upgraded to Aquamacs 2.0 preview 4b (which is based on Emacs23.1 rather than Emacs22.something), gnus seemed to stop wanting to display the contents of some emails, instead just displaying the headers. It turns out this was because those emails used HTML and w3m uses the w3m browser to show HTML emails. I had download w3m before and installed emacs-w3m under Aquamacs 1.9, but apparently something broke in the upgrade. I was able to fix it by downloading the CVS version of emacs-w3m (I didn't have to reinstall w3m, which I had installed using darwinports) and configuring it using --with-emacs=/Applications/Aquamacs.app/Contents/MacOS/Aquamacs. I did a "make" but not "make install", instead I copied the whole emacs-w3m folder to my emacs packages directory (~/.emacs-pkgs, but the name isn't important) and loading it in my .emacs.el with
;; Use w3m for web browsing (setq load-path (cons "~/.emacs-pkgs/emacs-w3m/" load-path)) (require 'w3m-load)
3. I used htmlize to generate the code snippets in this post.