[mew-dist 29214] Re: lost fist one message via nntp access when updating summary

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
2010年 4月 27日 (火) 16:59:58 JST


> たとえば、summary mode で
>     s last:10
> とかして、しばらくして、新しい投稿があった後に、
>     s update
> しますと、update されたものの中の最初のメッセージが取得されま
> せん。2つ目以降のメッセージは取得されます。

もう環境がないのですが、IMAP のロジックと見比べてみると、こう修正すべき
のような気がします。どうでしょうか?

--かず

diff --git a/mew-nntp.el b/mew-nntp.el
index c55f817..0c59dde 100644
--- a/mew-nntp.el
+++ b/mew-nntp.el
@@ -124,18 +124,18 @@
 	    (setq last (string-to-number (mew-match-string 2)))
 	    (cond
 	     ((stringp max)
-	      (setq max (1+ (string-to-number max))))
+	      (setq max (string-to-number max)))
 	     (max ;; backward compatibility
 	      ;; reversed
 	      (setq max (car max))
-	      (setq max (1+ (string-to-number max))))
+	      (setq max (string-to-number max)))
 	     ((and (eq directive 'scan) (integerp range))
-	      (setq max (1+ (- last range)))
-	      (if (< max first) (setq max first)))
+	      (setq max (- last range))
+	      (if (< max first) (setq max (1- first))))
 	     (t
-	      (setq max first)))
+	      (setq max (1- first))))
 	    (mew-nntp-set-max pnm max)
-	    (mew-nntp-process-send-string pro "XOVER %d-" max))
+	    (mew-nntp-process-send-string pro "XOVER %d-" (1+ max)))
 	(mew-nntp-set-status pnm "quit")
 	(mew-nntp-command-quit pro pnm)))))
 


Mew-dist メーリングリストの案内