unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
Date: Mon, 17 Oct 2022 18:40:32 +0300	[thread overview]
Message-ID: <83sfjm1mrz.fsf@gnu.org> (raw)
In-Reply-To: <87y1tewkms.fsf@gmail.com> (message from Robert Pluim on Mon, 17 Oct 2022 17:11:07 +0200)

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 17 Oct 2022 17:11:07 +0200
> 
> >>>>> On Mon, 17 Oct 2022 18:01:57 +0300, Eli Zaretskii <eliz@gnu.org> said:
> 
>     >> From: Robert Pluim <rpluim@gmail.com>
>     >> Cc: Eli Zaretskii <eliz@gnu.org>
>     >> Date: Mon, 17 Oct 2022 16:42:35 +0200
>     >> 
>     >> >>>>> On Sat, 15 Oct 2022 07:01:02 -0400 (EDT), Eli Zaretskii <eliz@gnu.org> said:
>     Eli> (process-environment (eshell-environment-variables))
>     Eli> +         (coding-system-for-read coding-system-for-read)
>     Eli> +         (coding-system-for-write coding-system-for-write)
>     >> 
>     >> Isnʼt passing `:coding' to `make-process' preferred to binding
>     >> `coding-system-for-{read,write}'? It has less of a global effect.
> 
>     Eli> But I _want_ a more global effect here.
> 
> You do? I thought the whole point was to influence the coding system
> used by `make-process', which you can do by passing in :coding.

The case for using :coding here is quite weak:

  . the let-binding in this case is restricted to creation of the
    processes, so here it doesn't have more "global" effect that
    :coding
  . there are two processes being created, not one; let-binding
    affects both of them, whereas :coding would have to be applied to
    each one separately
  . :coding overrides coding-system-for-read/write, which is somewhat
    surprising and perhaps unexpected; while we could have code that
    sets :coding only if coding-system-for-read/write are nil, it
    would be a trickier code, and perhaps not self-explanatory without
    a suitable commentary

Now let me turn the table and ask you why is :coding preferred, in
your opinion?



  reply	other threads:[~2022-10-17 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166583166191.28035.1408947255493373295@vcs2.savannah.gnu.org>
     [not found] ` <20221015110102.361A6C1AB48@vcs2.savannah.gnu.org>
2022-10-17 14:42   ` master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows Robert Pluim
2022-10-17 15:01     ` Eli Zaretskii
2022-10-17 15:11       ` Robert Pluim
2022-10-17 15:40         ` Eli Zaretskii [this message]
2022-10-17 16:05           ` Robert Pluim
2022-10-17 16:14             ` Eli Zaretskii

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=83sfjm1mrz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.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 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).