[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reproducable hang with non-ascii characters in Wanderlust draft



At Wed, 10 Feb 2010 13:18:22 +0900,
Katsumi Yamaoka wrote:
>
> Committed.  Thanks.  A temporary snapshot is now as:
> 
> ftp://ftp.jpl.org/pub/m17n/flim-1_14-201002100417.tar.gz
> http://www.jpl.org/ftp/pub/m17n/flim-1_14-201002100417.tar.gz
> 
> I share with you as much as possible in the responsibility of
> any fault the changes made.

Today Kenichi Handa commited a different fix to Emacs' bzr repository:

---
2010-02-17  Kenichi Handa

        * coding.c (decode_coding_ccl): Don't setup ccl program here.  Fix
        for the case that the output buffer is fullfilled.
        (decode_coding): Setup ccl program here.  Keep looping when the
        decoder stopped because the output buffer is
        fullfilled (bug#5534).

        * ccl.c (ccl_driver): Never reset ic to CCL_HEADER_MAIN.
---

And now flim is broken again. :-( 

I reverted mel-q-ccl.el to 1.5.6.4 and mel-q.el to 1.12.6.5 and
applied only the following patch:

--- flim.orig/mel-q-ccl.el      2010-01-11 22:45:46.000000000 +0100
+++ flim/mel-q-ccl.el   2010-01-11 22:42:09.000000000 +0100
@@ -893,7 +893,13 @@
   (defun quoted-printable-ccl-encode-region (start end)
     "Encode the region from START to END with quoted-printable encoding."
     (interactive "*r")
-    (decode-coding-region start end 'mel-ccl-quoted-printable-lf-lf-rev))
+    (save-excursion
+      (goto-char start)
+      (insert (prog1
+                 (decode-coding-string
+                  (string-as-unibyte (buffer-substring start end))
+                  'mel-ccl-quoted-printable-lf-lf-rev)
+               (delete-region start end)))))
 
   (defun quoted-printable-ccl-insert-encoded-file (filename)
     "Encode contents of the file named as FILENAME, and insert it."
@@ -932,7 +938,10 @@
 (defun quoted-printable-ccl-write-decoded-region (start end filename)
   "Decode quoted-printable encoded current region and write out to FILENAME."
   (interactive "*r\nFWrite decoded region to file: ")
-  (let ((coding-system-for-write 'mel-ccl-quoted-printable-lf-lf-rev)
+  (let ((coding-system-for-write
+        (if (coding-system-p 'mel-ccl-quoted-printable-lf-lf-rev-unix)
+            'mel-ccl-quoted-printable-lf-lf-rev-unix
+          'mel-ccl-quoted-printable-lf-lf-rev))
        jka-compr-compression-info-list jam-zcat-filename-list)
     (write-region start end filename)))



-Herbert