From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: ctext-pre-write-conversion barfs Date: Sat, 23 Feb 2002 08:11:49 -0800 (PST) Organization: Sony Electronics Inc. Message-ID: <20020223.081149.60852929.Takaaki.Ota@am.sony.com> References: <20020222.225355.01365596.Takaaki.Ota@am.sony.com> <9743-Sat23Feb2002104842+0200-eliz@is.elta.co.il> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: quimby2.netfonds.no 1014480864 29243 195.204.10.66 (23 Feb 2002 16:14:24 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 23 Feb 2002 16:14:24 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16eeoZ-0007bZ-00 for ; Sat, 23 Feb 2002 17:14:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eemU-0003tD-00; Sat, 23 Feb 2002 11:12:14 -0500 Original-Received: from mail6.fw-sj.sony.com ([160.33.82.73]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eemD-0003qe-00 for ; Sat, 23 Feb 2002 11:11:57 -0500 Original-Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.11]) by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id QAA25752; Sat, 23 Feb 2002 16:11:55 GMT Original-Received: by mail1.bc.in.sel.sony.com id QAA28732; Sat, 23 Feb 2002 16:11:52 GMT Original-To: eliz@is.elta.co.il In-Reply-To: <9743-Sat23Feb2002104842+0200-eliz@is.elta.co.il> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew version 3.0.54 on Emacs 21.2.50.1 / Mule 5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1458 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1458 Sat, 23 Feb 2002 10:48:42 +0200: "Eli Zaretskii" wrote: > Do you have any real-life example of using compound-text in a way that > causes it to be called from write-region? Note that compound-text is > generally inappropriate for use in file I/O, as its string says (it > can't DTRT with multibyte text). I don't know the exact mechanism why ctext-pre-write-conversion was summoned. But it was where the debug-on-error brought me to, while using a mail package 'Mew' (3.0.54). Following is the last function issued in Mew (mew-mark.el) where write-region was called with a string for the argument START. (defun mew-summary-clean-folder-cache (folder) "Erase Summary mode then remove and touch the cache file." (if (get-buffer folder) (save-excursion (set-buffer folder) (mew-erase-buffer) (set-buffer-modified-p nil))) (let ((cfile (mew-expand-folder folder mew-summary-cache-file))) (if (file-exists-p cfile) (write-region "" nil cfile nil 'no-msg)))) BTW, I just now tried to save this buffer and noticed that ctext-pre-write-conversion was invoked. It is called 3 times for each save-buffer. Here is the output from describe-coding-system. -Tak Coding system for saving this buffer: x -- ctext-unix Default coding system (for new files): S -- sjis (alias of japanese-shift-jis) Coding system for keyboard input: S -- sjis (alias of japanese-shift-jis) Coding system for terminal output: S -- sjis (alias of japanese-shift-jis) Defaults for subprocess I/O: decoding: S -- sjis (alias of japanese-shift-jis) encoding: S -- sjis (alias of japanese-shift-jis) Priority order for recognizing coding systems when reading files: 1. iso-2022-jp (alias: junet) 2. japanese-iso-8bit (alias: euc-japan-1990 euc-japan euc-jp) 3. japanese-shift-jis (alias: shift_jis sjis) 4. iso-2022-jp-2 5. iso-latin-1 (alias: iso-8859-1 latin-1) 6. iso-2022-7bit 7. iso-2022-8bit-ss2 8. emacs-mule 9. raw-text (alias: mew-cs-text mew-cs-text-lf mew-cs-text-crlf mew-cs-text-cr mew-cs-text-net) 10. chinese-big5 (alias: big5 cn-big5) 11. no-conversion (alias: binary) 12. mule-utf-8 (alias: utf-8) Other coding systems cannot be distinguished automatically from these, and therefore cannot be recognized automatically with the present coding system priorities. The following are decoded correctly but recognized as iso-2022-jp-2: iso-2022-7bit-ss2 iso-2022-7bit-lock iso-2022-7bit-lock-ss2 iso-2022-cn iso-2022-cn-ext iso-2022-kr Particular coding systems specified for certain file names: OPERATION TARGET PATTERN CODING SYSTEM(s) --------- -------------- ---------------- File I/O "\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.tgz\\'" (no-conversion . no-conversion) "\\.bz2\\'" (no-conversion . no-conversion) "\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.elc\\'" (emacs-mule . emacs-mule) "\\.utf\\(-8\\)?\\'" utf-8 "\\(\\`\\|/\\)loaddefs.el\\'" (raw-text . raw-text-unix) "\\.tar\\'" (no-conversion . no-conversion) "" find-buffer-file-type-coding-system Process I/O nothing specified Network I/O "nntp" (junet-unix . junet-unix) 110 (no-conversion . no-conversion) 25 (no-conversion . no-conversion) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel