emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] Inherit process output coding system to stderr process.


From: Eli Zaretskii
Subject: Re: [PATCH 3/3] Inherit process output coding system to stderr process.
Date: Wed, 04 Apr 2018 16:39:55 +0300

> From: Philipp Stephani <address@hidden>
> Date: Wed,  4 Apr 2018 14:02:18 +0200
> Cc: Philipp Stephani <address@hidden>
> 
> * src/process.c (Fmake_process): Inherit output coding system to
> newly-created pipe process.

I'm sorry, I don't understand the need for this "inheriting".  If the
problem is that make-process and make-pipe-process use different logic
to decide on the default coding-systems, then I think we should make
them use the same logic, and then there will be no need for
"inheriting".  Or is there something else I'm missing?

> +        (let ((process (make-process
> +                        :name "stderr-coding"
> +                        :command (list shell-file-name shell-command-switch
> +                                       (concat "echo -e '\\xC3\\xA4\\r'; "
> +                                               "echo -e '\\xC3\\xB6\\r' 
> >&2"))

This shell command is non-portable.  I think even "echo -e" is not
portable enough, let alone with hex escapes and the trailing \r.
Can't we use Emacs instead?  There's also the ";" issue again.

> +          (should (equal (buffer-string) "\u00C3\u00B6\n"))))
> +      (should (equal (buffer-string) "\u00C3\u00A4\n")))))

Why not use literal characters here?  It will make the source more
readable, IMO.



reply via email to

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