From 57565636ecae0afad6700679b6fcf50f0974b4a8 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 29 Sep 2010 21:39:28 +0200 Subject: [PATCH] (pop3-stream-length): New variable. --- lisp/ChangeLog | 3 +++ lisp/pop3.el | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10ece92dd..58e17f62e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-29 Lars Magne Ingebrigtsen + * pop3.el (pop3-send-streaming-command, pop3-stream-length): New + variable. + * nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. diff --git a/lisp/pop3.el b/lisp/pop3.el index d2953dcff..20fe56091 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -82,6 +82,15 @@ valid value is 'apop'." :version "22.1" ;; Oort Gnus :group 'pop3) +(defcustom pop3-stream-length 100 + "How many messages should be requested at one time. +The lower the number, the more latency-sensitive the fetching +will be. If your pop3 server doesn't support streaming at all, +set this to 1." + :type 'number + :version "24.1" + :group 'pop3) + (defcustom pop3-leave-mail-on-server nil "*Non-nil if the mail is to be left on the POP server after fetching. @@ -156,7 +165,7 @@ Use streaming commands." (while (>= count i) (process-send-string process (format "%s %d\r\n" command i)) ;; Only do 100 messages at a time to avoid pipe stalls. - (when (zerop (% i 100)) + (when (zerop (% i pop3-stream-length)) (pop3-wait-for-messages process i total-size)) (incf i))) (pop3-wait-for-messages process count total-size)) -- 2.25.1