In article <[EMAIL PROTECTED]>, Michael Albinus <[EMAIL PROTECTED]> writes:
> I have started "emacs -q -no-site-file". Then I've performed "M-x shell" 
> and "M-: (process-coding-system (get-buffer-process (current-buffer)))"
> afterwards in the shell buffer. Surprisingly, the result is
> "(iso-latin-1-dos . iso-latin-1)".

> The setting of a dos decoding system is nasty. For example, it
> instructs to Tramp convert eol characters of transferred files, as
> reported recently in emacs-pretest-bug. Where does it come from? Is it
> really the correct coding system one has to expect?

That settings comes from this code in comint-exec-1 (lisp/comint.el):

    (let ((coding-systems (process-coding-system proc)))
      (setq decoding (car coding-systems)
            encoding (cdr coding-systems)))
    ;; If start-process decided to use some coding system for decoding
    ;; data sent from the process and the coding system doesn't
    ;; specify EOL conversion, we had better convert CRLF to LF.
    (if (vectorp (coding-system-eol-type decoding))
        (setq decoding (coding-system-change-eol-conversion decoding 'dos)
              changed t))
    ;; Even if start-process left the coding system for encoding data
    ;; sent from the process undecided, we had better use the same one
    ;; as what we use for decoding.  But, we should suppress EOL
    ;; conversion.
    (if (and decoding (not encoding))
        (setq encoding (coding-system-change-eol-conversion decoding 'unix)
              changed t))
    (if changed
        (set-process-coding-system proc decoding encoding))

But, I don't know the rationale of it.

> instructs to Tramp convert eol characters of transferred files, as

If Tramp uses comint for transferring files, it should
anyway set process coding system to `no-conversion' (at
least while transferring files).

---
Kenichi Handa
[EMAIL PROTECTED]


_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to