all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
       [not found] ` <20221015110102.361A6C1AB48@vcs2.savannah.gnu.org>
@ 2022-10-17 14:42   ` Robert Pluim
  2022-10-17 15:01     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2022-10-17 14:42 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

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

Robert
-- 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-10-17 15:01 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

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

But I _want_ a more global effect here.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
  2022-10-17 15:01     ` Eli Zaretskii
@ 2022-10-17 15:11       ` Robert Pluim
  2022-10-17 15:40         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2022-10-17 15:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

Robert
-- 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
  2022-10-17 15:11       ` Robert Pluim
@ 2022-10-17 15:40         ` Eli Zaretskii
  2022-10-17 16:05           ` Robert Pluim
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-10-17 15:40 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> 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?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
  2022-10-17 15:40         ` Eli Zaretskii
@ 2022-10-17 16:05           ` Robert Pluim
  2022-10-17 16:14             ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2022-10-17 16:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>>>>> On Mon, 17 Oct 2022 18:40:32 +0300, Eli Zaretskii <eliz@gnu.org> said:

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

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

Because weʼve had bugs where coding-system-for-read/write was used,
and processes created further down the call chain would use it, and by
the time they did its value had changed, which would have been avoided
by using :coding (I seem to remember an issue with an invocation of
gpg, although I wouldnʼt be surprised if there was some asynchronicity
involved as well)

Robert
-- 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master 63d084d4e4: Fix encoding and decoding of process I/O in Eshell on Windows
  2022-10-17 16:05           ` Robert Pluim
@ 2022-10-17 16:14             ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2022-10-17 16:14 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 17 Oct 2022 18:05:20 +0200
> 
>     Eli> Now let me turn the table and ask you why is :coding preferred, in
>     Eli> your opinion?
> 
> Because weʼve had bugs where coding-system-for-read/write was used,
> and processes created further down the call chain would use it, and by
> the time they did its value had changed, which would have been avoided
> by using :coding (I seem to remember an issue with an invocation of
> gpg, although I wouldnʼt be surprised if there was some asynchronicity
> involved as well)

But that's in no way a general preference, just a practical
consideration.  And the kind of problems you mention don't exist in
this case.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-17 16:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
2022-10-17 16:05           ` Robert Pluim
2022-10-17 16:14             ` Eli Zaretskii

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.