unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs-diffs Digest, Vol 2, Issue 28
Date: Tue, 28 Jan 2003 09:32:54 +0900 (JST)	[thread overview]
Message-ID: <200301280032.JAA15601@etlken.m17n.org> (raw)
In-Reply-To: <E18b2yf-0007yS-00@fencepost.gnu.org> (message from Richard Stallman on Tue, 21 Jan 2003 13:18:25 -0500)

In article <E18b2yf-0007yS-00@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:
>     [...]
> 	    * process.c (read_process_output): Decide the multibyteness of
> 	    string given to a process filter by a coding system used for
> 	    decoding the process output.

>     But, I don't remeber the detail now.

> set-process-multibyte should be a good solution.

I think we have extrapolated the behaviour of process I/O
from that of file I/O.  But set-process-multibyte breaks it.
It's something like declaring the multibyteness of a process
but we don't declare that of a file.  So it's not easy to
extrapolate the exact semantics of set-process-multibyte.

It is fairly clear for the case that a process has a fileter
and coding system is no-conversion or raw-text.  But what to
do with the other coding systems (e.g. Latin-1,
iso-2022-jp).  If a process is unibyte, what kind of string,
the filter should get?  Should we suppress a text decoding
like the case of inserting a file into a unibyte buffer?

And if the process has no filter but has a buffer, what to
do for a unibyte process that has a multibyte buffer, or for
a multibyte process that has a unibyte buffer?

And what to do with process-send-string/region.

I think it is better to keep extrapolating the behaviour of
process reading/sending from file reading/writing.

For inserting a proecss output in a buffer, there's no
difficulty to extrapolate the behaviour.

For a filter, although we don't have a function something
like string-from-file, the most resembling code will be
this.

(with-temp-buffer
  (insert-file-contents FILE)
  (buffer-string))

A string given to a process filter must be the same as the
result of that code, which means that
default-enable-multibyte-characters decides the
multibyteness, and if it is nil, character conversion except
for end-of-line conversion is suppressed.

The only question is when to check
default-enable-multibyte-characters.  When a process is
created, or just before calling a filter?  I think the
former is more like file I/O.  And it may be ok to have a
function set-process-filter-multibyte which can change the
multibyteness of a string to a filter on the way.

Or, was the intention of set-process-multibyte actually
set-process-filter-multibyte?

---
Ken'ichi HANDA
handa@m17n.org

  reply	other threads:[~2003-01-28  0:32 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E18ZDQC-0003mt-02@monty-python.gnu.org>
2003-01-18  0:48 ` Emacs-diffs Digest, Vol 2, Issue 28 Richard Stallman
2003-01-18 12:35   ` Kim F. Storm
2003-01-18 12:40   ` Eli Zaretskii
2003-01-20  0:49     ` Richard Stallman
2003-01-20  2:29     ` unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28] Kenichi Handa
2003-01-20 18:48       ` Eli Zaretskii
2003-01-20 20:55         ` Stefan Monnier
2003-01-21  0:20           ` Kenichi Handa
2003-01-21  0:54             ` Stefan Monnier
2003-01-21  5:57             ` Eli Zaretskii
2003-01-22  9:59           ` Richard Stallman
2003-01-22 14:12             ` Stefan Monnier
2003-01-22 18:09               ` Eli Zaretskii
2003-01-23 11:38                 ` Richard Stallman
2003-01-23 16:18                   ` Stefan Monnier
2003-01-24 17:16                     ` Richard Stallman
2003-01-23 17:48                   ` Eli Zaretskii
2003-01-24  5:43               ` Richard Stallman
2003-01-26  1:30                 ` Stefan Monnier
2003-01-27  2:31                   ` Richard Stallman
2003-01-27  7:38                   ` Kenichi Handa
2003-01-27 14:12                     ` Stefan Monnier
2003-01-29 11:23                       ` Kenichi Handa
2003-01-21  0:10         ` Kenichi Handa
2003-01-21  0:45           ` Stefan Monnier
2003-01-21  6:01             ` Eli Zaretskii
2003-01-21  6:43               ` Kenichi Handa
2003-01-21  8:04             ` Kenichi Handa
2003-01-21 15:02               ` Miles Bader
2003-01-21 17:44               ` Stefan Monnier
2003-01-22 10:00               ` Richard Stallman
2003-01-21  5:56           ` Eli Zaretskii
2003-01-21  6:38             ` Kenichi Handa
2003-01-22 10:00           ` Richard Stallman
2003-01-22 14:12             ` Stefan Monnier
2003-01-20  1:52   ` Emacs-diffs Digest, Vol 2, Issue 28 Kenichi Handa
2003-01-21 18:18     ` Richard Stallman
2003-01-28  0:32       ` Kenichi Handa [this message]
2003-01-28 12:35         ` Kim F. Storm
2003-02-10  8:15           ` set-process-filter-multibyte and etc Kenichi Handa
2003-02-10 14:57             ` Kim F. Storm
2003-02-11  0:15               ` Kenichi Handa
2003-02-20  1:27             ` Tak Ota
2003-02-20  1:56               ` Kenichi Handa
2003-02-20  2:44                 ` Tak Ota
2003-03-03 18:59         ` Emacs-diffs Digest, Vol 2, Issue 28 Richard Stallman
2003-01-21 18:18     ` Richard Stallman
2003-01-27 12:20       ` Kenichi Handa
2003-01-29  0:05         ` Richard Stallman

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=200301280032.JAA15601@etlken.m17n.org \
    --to=handa@m17n.org \
    --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).