[Top][All Lists]

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

Re: [HELP] (bug?) Saving a buffer without any conversion?

From: Kim F. Storm
Subject: Re: [HELP] (bug?) Saving a buffer without any conversion?
Date: 16 Jan 2003 23:52:18 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Eli Zaretskii" <address@hidden> writes:

> > From: address@hidden (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

  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 <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]