all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: phst@google.com, emacs-devel@gnu.org
Subject: Re: [PATCH 3/3] Inherit process output coding system to stderr process.
Date: Sat, 07 Apr 2018 21:12:10 +0000	[thread overview]
Message-ID: <CAArVCkSQb9_NGU5co5ce7DKBYHAz9Hx3WPoJ=rB3vpA62Rgakg@mail.gmail.com> (raw)
In-Reply-To: <83370b3xas.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1970 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Mi., 4. Apr. 2018 um 15:39 Uhr:

> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Wed,  4 Apr 2018 14:02:18 +0200
> > Cc: Philipp Stephani <phst@google.com>
> >
> > * 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?
>

At least I would expect Emacs to use the same output encoding for both
standard output and error streams if an explicit output encoding is
provided, given that most external programs will also use the same encoding
for both streams. But currently Emacs uses the default encoding for the
standard error stream if it creates the pipe itself.


>
> > +        (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.
>

Is it possible to write raw bytes to the standard output/error streams
using Emacs?


>
> > +          (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.
>

I don't care much, but using the character escapes here makes it obvious
that the output is decoded as Latin-1.

[-- Attachment #2: Type: text/html, Size: 2998 bytes --]

  reply	other threads:[~2018-04-07 21:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 12:02 [PATCH 1/3] Document that 'make-process' mixes the output streams Philipp Stephani
2018-04-04 12:02 ` [PATCH 2/3] Don't print "process finished" into the stderr buffer Philipp Stephani
2018-04-04 13:14   ` Eli Zaretskii
2018-04-07 20:21     ` Philipp Stephani
2018-04-08 13:13       ` Eli Zaretskii
2018-04-10  4:14         ` Stephen Leake
2018-04-10  4:59           ` Eli Zaretskii
2019-04-19 19:28         ` Philipp Stephani
2019-04-20  7:30           ` Eli Zaretskii
2019-04-21 13:55             ` Philipp Stephani
2019-04-21 19:09               ` Eli Zaretskii
2019-04-21 20:57             ` Stefan Monnier
2019-04-22  9:37               ` Eli Zaretskii
2019-04-22 14:43                 ` Stefan Monnier
2019-04-22 15:23                   ` Eli Zaretskii
2019-04-22 15:45                     ` Philipp Stephani
2019-04-22 15:52                       ` Eli Zaretskii
2018-04-04 12:02 ` [PATCH 3/3] Inherit process output coding system to stderr process Philipp Stephani
2018-04-04 13:39   ` Eli Zaretskii
2018-04-07 21:12     ` Philipp Stephani [this message]
2018-04-08 13:18       ` Eli Zaretskii
2018-04-08 16:39         ` Eli Zaretskii
2018-04-04 13:12 ` [PATCH 1/3] Document that 'make-process' mixes the output streams Eli Zaretskii
2018-04-07 20:18   ` Philipp Stephani

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkSQb9_NGU5co5ce7DKBYHAz9Hx3WPoJ=rB3vpA62Rgakg@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=phst@google.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.