>>>> "Jerry" == Jerry James
<james(a)xemacs.org> writes:
Jerry> I had a few free minutes this afternoon (okay, so I *took*
Jerry> a few free minutes this afternoon), and poked around in the
Jerry> coding system stuff to see what's up with the LFD/RET
Jerry> problems on TTYs. I found that TTYs get the 'undecided
Jerry> coding system, and that the 'undecided coding system has
Jerry> the 'do-eol property, which triggers EOL autodetection.
OK. I don't really understand the new detectors, but I suspect this
is a bug in them. There are dire warnings about attempting to detect
on non-seekable streams. Since when are TTYs seekable?
Jerry> Changing from 'undecided to 'undecided-unix (which does not
Jerry> have the 'do-eol property) seems to be the right way to go.
I dunno. Do you know for a fact that there are no TTYs out there that
send CRLF?
Jerry> It looks like this would be a problem on Windows machines
Jerry> with MULE as well. Can somebody confirm or deny that?
Erm, I can't get XEmacs to run in a TTY on a Windows box.
Jerry> The patch below seems to fix the problem for me, but as I
Jerry> don't know this code terribly well, I'd appreciate a few
Jerry> more eyes looking at it.
I think that the right thing to do is to fix the detectors, but this
is not terribly harmful (the worst that could happen is
stair-stepping, I suspect).
However, all appearances to the contrary, "raw-text" does not mean
"binary", it means "autodetect EOL." So if setting the EOL to -unix
makes sense, both of those should be "binary". (I would actually go so
far as to put all of the keyboard "binary". I'm pretty sure
autodetection fails in a uxterm.)
Bottom line, I'd like to hear from Ben, but if Steve Y makes an
executive decision to put this in it's OK by me.
Jerry's patch for Ben's benefit:
------------------------------------------------------------------------
lisp/ChangeLog addition:
2003-05-08 Jerry James <james(a)xemacs.org>
* code-init.el (coding-system-variable-default-value-table): Use
undecided-unix for keyboards to avoid EOL autodetection.
* code-init.el (coding-system-variable-default-value): Update the
comment to reflect the changed table.
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: lisp/code-init.el
Index: lisp/code-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-init.el,v
retrieving revision 1.5
diff -d -u -u -r1.5 code-init.el
--- lisp/code-init.el 2003/02/21 06:56:47 1.5
+++ lisp/code-init.el 2003/05/08 22:15:35
@@ -79,7 +79,7 @@
(native
binary binary binary raw-text-dos mswindows-multibyte-system-default-dos)
(keyboard
- binary raw-text undecided raw-text undecided)
+ binary raw-text undecided-unix raw-text undecided-unix)
;; the `terminal' coding system is used for output to stderr. such
;; streams do automatic lf->crlf encoding in the C library, so we need
;; to not do the same translations ourselves.
@@ -158,16 +158,16 @@
The table of default values looks like this: (see below for abbreviations)
- Unix Unix+EOL Unix+Mule MSW MSW+Mule
-------------------------------------------------------------------------------
-bfcs-for-read binary raw-text undecided raw-text undecided
-default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos
-native binary binary binary raw-text-dos MSW-MB-SD-dos
-keyboard binary raw-text undecided raw-text undecided
-terminal binary binary binary binary MSW-MB-unix
-process-read binary raw-text undecided raw-text undecided
-process-write binary binary binary raw-text MSW-MB-SD
-no-conv-cs binary raw-text raw-text raw-text MSW-MB
+ Unix Unix+EOL Unix+Mule MSW MSW+Mule
+-----------------------------------------------------------------------------
+bfcs-for-read binary raw-text undecided raw-text undecided
+default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos
+native binary binary binary raw-text-dos MSW-MB-SD-dos
+keyboard binary raw-text undecided-unix raw-text undecided-unix
+terminal binary binary binary binary MSW-MB-unix
+process-read binary raw-text undecided raw-text undecided
+process-write binary binary binary raw-text MSW-MB-SD
+no-conv-cs binary raw-text raw-text raw-text MSW-MB
VAR can be one of: (abbreviations in parens)
--
Jerry James
http://www.ittc.ku.edu/~james/
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.