From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [HELP] (bug?) Saving a buffer without any conversion? Date: 16 Jan 2003 23:52:18 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xd6mwoggt.fsf@kfs2.cua.dk> References: <87fzrxszs8.fsf@lexx.delysid.org> <200301150116.KAA09223@etlken.m17n.org> <5xk7h67k1b.fsf@kfs2.cua.dk> <200301151059.TAA09873@etlken.m17n.org> <5xbs2i7dc4.fsf@kfs2.cua.dk> <1659-Wed15Jan2003193004+0200-eliz@is.elta.co.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042754700 16657 80.91.224.249 (16 Jan 2003 22:05:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2003 22:05:00 +0000 (UTC) Cc: handa@m17n.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ZI89-0004KC-00 for ; Thu, 16 Jan 2003 23:04:57 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ZIHH-0005HQ-00 for ; Thu, 16 Jan 2003 23:14:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZI56-0002we-03 for emacs-devel@quimby.gnus.org; Thu, 16 Jan 2003 17:01:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ZI4J-00020F-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 17:00:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ZI34-00019T-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 16:59:43 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZHwW-0006Ok-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 16:52:56 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 51D0C7C012; Thu, 16 Jan 2003 22:52:54 +0100 (CET) Original-To: Eli Zaretskii In-Reply-To: <1659-Wed15Jan2003193004+0200-eliz@is.elta.co.il> Original-Lines: 38 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: emacs-devel@gnu.org Original-cc: mlang@delysid.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10782 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10782 "Eli Zaretskii" writes: > > From: storm@cua.dk (Kim F. Storm) > > Date: 15 Jan 2003 14:27:23 +0100 > > > > E.g. add this to the doc string for `set-process-filter': > > > > If the process' input coding system is no-conversion or raw-text, the > > string argument to the filter function is a unibyte string; otherwise > > it is a multibyte string. Use `string-as-multibyte' on a unibyte > > string before inserting it in a multibyte buffer. > > > > Note: If the sole purpose of the filter is to insert received data > > into a specific buffer, it is better NOT to define a process filter, > > but instead set the process' buffer to that buffer. > > The issue involved is not specific to process filters, so it should > probably be mentioned in other doc strings as well, like in that of > `insert'. Well, I added something to set-process-filter, but I'm quite unsure what to add to `insert's doc string which already says this about the issue: If the current buffer is multibyte, unibyte strings are converted to multibyte for insertion (see `unibyte-char-to-multibyte'). If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. It seems very odd that we have to suggest to use string-as-multibyte (or string-as-unibyte) to convert strings prior to insertion when the doc string says it does that automatically. I guess it has to say something about buffer coding systems here, but what ...? Handa-san, maybe you can tell the "true story" ? -- Kim F. Storm http://www.cua.dk