Hi.
> The procedure to reproduce (in my case) are quite easy: type some non-ascii
> characters in a draft message in Wanderlust, something like
>
> äëïöÿüäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöüÿäëïöü
>
> Try to save the draft (C-x s). This works. Now, copy the line about 50 times,
> so you have a whole block of these characters. If I now try to save, emacs
> gets very busy (CPU goes to the max), and it never seems to recover (waited
> for at least 15 minutes), and I have to kill emacs.
It is a bug of emacs (23.1 and trunk at present). Emacs 23's decoder
for ccl coding system can't output larger than 16KB. You can confirm
that by below code.
(progn
(define-ccl-program ccl-test
'(1 (loop
(read r0)
(write-repeat r0))))
(make-coding-system 'test 4 ?t "" '(ccl-test . ccl-test))
(let ((string "=")
count)
(dotimes (count 16)
(setq string (concat string string)))
;; When number is less than 16384, it works with no problem.
;; When number is 16385, return value is 16384.
;; When number is 16386 and larger, emacs hangs.
(setq string (substring string 0 16385))
(length (decode-coding-string string 'test))))
I sent a bug report to mule-ja ML (*1) in Japanese. Below patch for
mel-q-ccl.el would fix the problem. The patch also fixes emacs 23
multibyte problem and emacs 22 EOL problem (*2) and makes decoder not
to discard illegally encoded data. But last change is not functional
on Emacs 23.1 because of Emacs 23.1's bug (not in trunk).
(*1) http://www.m17n.org/mule/ml.en.html
(*2) http://article.gmane.org/gmane.emacs.mime.japanese/676
> Before, someone suggested using
> (mel-use-module 'mel-q '("quoted-printable" "Q"))
> however, that gives me an error instead:
> insert: Args out of range: "0123456789ABCDEF", 262140
> and refuses to save.
That is known problem. Please see
http://article.gmane.org/gmane.mail.wanderlust.general.japanese/6830
--
Kazuhiro Ito
Attachment:
mel-q-ccl.el.diff
Description: Binary data