From: Tak Ota <Takaaki.Ota@am.sony.com>
Cc: emacs-devel@gnu.org
Subject: Re: ctext-pre-write-conversion barfs
Date: Sat, 23 Feb 2002 08:11:49 -0800 (PST) [thread overview]
Message-ID: <20020223.081149.60852929.Takaaki.Ota@am.sony.com> (raw)
In-Reply-To: <9743-Sat23Feb2002104842+0200-eliz@is.elta.co.il>
Sat, 23 Feb 2002 10:48:42 +0200: "Eli Zaretskii" <eliz@is.elta.co.il> 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
next prev parent reply other threads:[~2002-02-23 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-23 6:53 ctext-pre-write-conversion barfs Tak Ota
2002-02-23 8:48 ` Eli Zaretskii
2002-02-23 16:11 ` Tak Ota [this message]
2002-02-23 18:51 ` (no subject) Eli Zaretskii
2002-02-23 23:11 ` Tak Ota
2002-02-25 1:11 ` [mew-int 00737] " Kazu Yamamoto
2002-02-25 6:55 ` Eli Zaretskii
2002-02-26 16:51 ` ctext-pre-write-conversion barfs Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020223.081149.60852929.Takaaki.Ota@am.sony.com \
--to=takaaki.ota@am.sony.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).