6c6 < ;; Version: 0.9 --- > ;; Version: 0.9.5 55,58c55,65 < ;; Note: the discussion below assumes that 'epop3-leave-mail-on-server' is < ;; set to 't'. If set to 'nil', 'normal' rmail behavior (i.e., delete < ;; mail from server) is maintained. This is for backward compatibility < ;; for those who don't want or need leave-mail-on-server but would like to --- > ;; Note: an enterprising Gnus user () has > ;; tested and helped with the Gnus-compatibility. For those wanting to > ;; use this with Gnus, ignore the references to 'rmail' and note > ;; references to Gnus below. > ;; > ;; -------------------------------------------------------------------------- > ;; > ;; The discussion below assumes that 'epop3-leave-mail-on-server' is set > ;; to 't'. If set to 'nil', 'normal' rmail behavior (i.e., delete mail > ;; from server) is maintained. This is for backward compatibility for > ;; those who don't want or need leave-mail-on-server but would like to 83d89 < ;; 199a206,216 > ;; > ;; Gnus users: > ;; (setq epop3-mail-package 'gnus > ;; nnmail-movemail-program 'epop3-mail > ;; nnmail-spool-file "po:user@popserver" > ;; nnmail-pop-password-required nil) > ;; > ;; The internal (require 'rmail) is ignored by epop3mail if the above setq > ;; is performed. > ;; > ;; 202a220,223 > ;; > ;; (autoload 'epop3-mail "epop3mail" > ;; "Get mail from pop server for PO:USER@HOST and put it in TOFILE." t) > ;; 220a242 > ;; epop3-mail-package (default is 'rmail) 239c261,264 < --- > ;; epop3-authentication-always-use-default (default is t) > ;; epop3-authentication-default (default is 'pass) > ;; epop3-authentication-timeout-seconds (default is 3) > ;; 309a335 > ;; 311a338,340 > ;; > ;; > ;; 319a349,351 > ;; any omissions in the above, I apologize, the omission was NOT intentional! > ;; > ;; 386a419,446 > ;; 03/30/1998 version 0.9.1: made epop3-prompt-authentication-scheme > ;; immune to mouse clicks (annoying!) and have a configurable timeout and > ;; default (thanks to for suggesting the ideas). > ;; also, epop3-prompt-authentication-scheme flushes input, so you don't > ;; get that annoying null password syndrome... (thanks to > ;; for pointing out the syndrome). > ;; > ;; 07/25/1998 version 0.9.2: incorporated epop3-biff-hook code from > ;; . Cool. > ;; > ;; 08/08/1998 version 0.9.3: incorporated Gnus compatibility stuff thanks > ;; to . Tres cool. See references to > ;; Gnus in the Usage section above. > ;; > ;; 08/12/1998: version 0.9.4.beta: added > ;; `epop3-authentication-always-use-default' so that you can avoid > ;; the "annoying" authentication query the first time for each mailbox. > ;; this only is helpful when you have exactly one mailbox or all of > ;; your mailboxes use the same authentication scheme. It's been asked > ;; for several times, so why not add it? > ;; > ;; 08/13/1998: version 0.9.4.gamma: documentation changes for jvinson's > ;; review... > ;; > ;; 08/15/1998: version 0.9.5: oops! biff doesn't know about > ;; nnmail-spool-file yet! More fixes... now uses epop3-mailbox-list > ;; > ;; 427d486 < (or (featurep 'rmail) (require 'rmail)) 437a497,510 > (defvar epop3-mail-package 'rmail ;; jvinson > "The mail package that epop3 uses. > Valid entries are 'rmail and 'gnus.") > > (defvar epop3-mailbox-list nil) > > (case epop3-mail-package > (rmail (or (featurep 'rmail) (require 'rmail)) > (setq epop3-mailbox-list rmail-primary-inbox-list)) > (gnus (setq epop3-mailbox-list > (if (listp nnmail-spool-file) > nnmail-spool-file > (list nnmail-spool-file))))) > 440a514,527 > (defvar epop3-authentication-default 'pass > "*Default POP3 authentication to be used.") > > (defvar epop3-authentication-always-use-default t > "*Always use 'epop3-authentication-default' and don't query. > This overrides `epop3-authentication-timeout-seconds' waiting. > > Setting `epop3-authentication-timeout-seconds' to t is useful only > in when you have one mailbox to query OR all of your mailboxes > use the same authentication scheme.") > > (defvar epop3-authentication-timeout-seconds 3 > "*Number of seconds before timing out on authentication question.") > 488a576,578 > (defvar epop3-biff-ding t > "*Set this to non-nil to bave Biff 'ding' if there's new mail.") > 522a613,626 > (defvar epop3-biff-hook nil > "List of functions to call after biffing. > Each function is called with two arguments: the current and previous > number of available messages. For example, to ring the bell once for > each new message detected, use something like this: > > (add-hook 'epop3-biff-hook > (function (lambda (n old-n) > (while (> n old-n) > (beep) > (sit-for 0.2) > (setq n (1- n))))))") > > 578a683,689 > (defvar epop3-old-n 0 > "Number of available messages at last check.") > (defvar epop3-unix-mail-delimiter ;; jvinson > (if (eq epop3-mail-package 'gnus) > message-unix-mail-delimiter > rmail-unix-mail-delimiter) > "The regexp string used to delimit messages in UNIX mail format.") 580c691 < (defconst epop3-mail-version "0.9" "Version of epop3mail.") --- > (defconst epop3-mail-version "0.9.5" "Version of epop3mail.") 676c787,788 < epop3-biffed-at-least-once t) --- > epop3-biffed-at-least-once t > epop3-old-n 0) 682c794 < ((and (< 0 minutes) (< 0 (length rmail-primary-inbox-list))) --- > ((and (< 0 minutes) (< 0 (length epop3-mailbox-list))) 737c849 < rmail-primary-inbox-list) --- > epop3-mailbox-list) 873a986,987 > (when n > (run-hook-with-args 'epop3-biff-hook n epop3-old-n)) 883a998,999 > (when epop3-biff-ding > (ding)) 899c1015,1016 < "")))))) --- > ""))) > (setq epop3-old-n (or n 0))))) 1125c1242,1245 < (epop3-prompt-authentication-scheme key)) --- > ;; 0.9.4 > (if epop3-authentication-always-use-default > epop3-authentication-default > (epop3-prompt-authentication-scheme key))) 1133a1254,1255 > (done nil) > (res nil) 1135,1136c1257,1260 < (format "authentication for %s? 1 = PASS, 2 = APOP [1],2: " < user@host))) --- > (format "authentication for %s? 1 = PASS, 2 = APOP? " user@host))) > (with-timeout > (epop3-authentication-timeout-seconds epop3-authentication-default) > (while (not done) 1138,1141c1262,1267 < (case (read-char) < (?1 'pass) < (?2 'apop) < (otherwise 'pass)))) --- > (case (event-basic-type (read-event)) > (?1 (setq done t res 'pass)) > (?2 (setq done t res 'apop)) > ('return (setq done t res epop3-authentication-default)))) > (discard-input) > res))) 1166a1293 > (discard-input) 1177a1305,1307 > ;; thanks to Jack Vinson for > ;; ensure-final-newline for Gnusen users > (epop3-ensure-final-newline) 1183a1314,1324 > ;; JMV 1998.08.06 > (defun epop3-ensure-final-newline () ;; jvinson > "Make sure that there is a final newline in the message. > If not, add it. This is an attempt to fix a problem with Gnus reading mail." > (save-excursion > (goto-char (point-max)) > (forward-line -1) > (unless (looking-at "\n") > (forward-line 1) > (insert "\n")))) > 1195c1336 < (unless (looking-at rmail-unix-mail-delimiter) --- > (unless (looking-at epop3-unix-mail-delimiter) 1251a1393 > ;; OR: adjust for Gnus usage... 1255c1397,1398 < (cond ((= emacs-major-version 20) --- > (case epop3-mail-package > (rmail (cond ((= emacs-major-version 20) 1258c1401,1404 < (load "epop3-riit19"))) --- > (load "epop3-riit19")))) > ;; jvinson... > (gnus (setq nnmail-movemail-program 'epop3-mail > nnmail-pop-password-required nil)))