[mew-int 2255] A patch: make-string in emacs 23

Duloc Wen dulocwen at example.com
Wed Jan 10 00:21:55 JST 2007


hi
  everybody.
  after 5-hours tracking, i found what the following happing:
http://www.mew.org/pipermail/mew-int/2006-November/001727.html

I got this error
"error in process filter: Args out of range:
"Googlexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 32593"

when I was retrieve the mails from gmail, it works because 3 of 10 messages
had been retrieved, how can I resolve this?

===========================================================
just because of the return value of make-string didn't act as
multibyte if we don't supply a non-ascii initial element.
I don't change all of make-string, because i didn't have
enough time.

diff -urN mew-5.2rc3/mew-header.el mew-5.2rc3-work/mew-header.el
--- mew-5.2rc3/mew-header.el	2007-01-11 11:43:57.641918750 +0800
+++ mew-5.2rc3-work/mew-header.el	2007-01-11 11:44:56.893621750 +0800
@@ -276,7 +276,15 @@
 	(setq str (string-as-unibyte str))) ;; A bug of Emacs 20.7
     (let* ((i 0) (len (length str))
 	   (par-cnt 0) (tmp-cnt 0) (sep-cnt 0)
-	   (tmp (make-string len ?x))
+	   ;;; dulocwen at example.com
+	   ;;; in emacs 23 (emacs-unicode):
+	   ;;; we should promise (multibyte-string-p tmp) holds,
+	   ;;; but (multibyte-string-p (make-string len ?x)) failed,
+	   ;;; so I make this changed.
+	   ;;; see make-string implementation in Emacs source code.
+	   ;;; I think this is Emacs fault, not mew.
+	   ;;;(tmp (make-string len ?x)
+	   (tmp (make-string len (if (>= emacs-major-version 23) 256 ?x)))
 	   c ret)
       (catch 'max
 	(while (< i len)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mew.patch
Type: application/octet-stream
Size: 874 bytes
Desc: not available
URL: <http://www.mew.org/pipermail/mew-int/attachments/20070109/2ad2670f/attachment.obj>


More information about the Mew-int mailing list