Merge slippers:etc/profile
[profile] / dot / gnus.el
index 0cfe467..ebf83f2 100644 (file)
 ;; We may have the misfortune to talk to an Exchange server.
 (setq imap-enable-exchange-bug-workaround t)
 
+;; Save articles in mbox format by default, of course, and save an entire
+;; batch with the same name.
+(setq gnus-prompt-before-saving t
+      gnus-default-article-saver 'gnus-summary-save-in-mail)
+
 ;; Clean up properly when closing the summary.
 (defadvice gnus-summary-exit (before mdw-kill-debris compile activate)
   (gnus-summary-expand-window))
 
+;; Configure article display a bit.
+(defun mdw-gnus-article-setup ()
+  (setq truncate-lines nil
+       truncate-partial-width-windows nil
+       word-wrap t
+       wrap-prefix (concat (propertize "..." 'face 'mdw-ellipsis-face)
+                           " ")))
+(add-hook 'gnus-article-mode-hook #'mdw-gnus-article-setup)
+
 ;;;--------------------------------------------------------------------------
 ;;; Local configuration.
 
 ;; Fetching news from the local news server seems sensible.
-(setq gnus-select-method `(nntp ,(mdw-config 'nntp-server)))
+(setq gnus-select-method
+      (let ((server (mdw-config 'nntp-server)))
+       (if server
+           `(nntp ,server)
+         '(nnnil ""))))
 
 ;; Now load a local configuration file.
 (load "~/.gnus-local.el")