GNU bug report logs - #48129
28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable

Previous Next

Package: emacs;

Reported by: Thomas Hisch <thomas.hisch <at> ims.co.at>

Date: Fri, 30 Apr 2021 23:11:01 UTC

Severity: wishlist

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thomas Hisch <thomas.hisch <at> ims.co.at>
Cc: 48129 <at> debbugs.gnu.org
Subject: bug#48129: 28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable
Date: Sat, 15 May 2021 10:23:10 +0300
> Date: Fri, 7 May 2021 21:46:15 +0200
> From: Thomas Hisch <thomas.hisch <at> ims.co.at>
> CC: <48129 <at> debbugs.gnu.org>
> 
> >> We have make-pipe-process; can't you solve your problem by connecting
> >> your process's stdout to such a pipe-process?  If not, why not?
> >>
> >
> > Thx Eli for the fast reply! I had to study the docs of make-pipe-process
> > and make-process to understand what you mean. However, I'm not fully
> > sure if I fully get what you mean.
> >
> > AFAICS the pipe process which is returned by make-pipe-process can be
> > passed to the :stderr keyword argument of make-process. Is that what you
> > head in mind?
> >
> > According to the docs of make-process, process-connection-type is
> > ignored if :stderr is passed to make-process:
> >
> >>  This parameter and the value of ‘process-connection-type’ are
> > ignored if a non-‘nil’ value is specified for the ‘:stderr’ parameter;
> > in that case, the type will always be ‘pipe’.
> >
> > What I want is that stdout and stderr are connected to a pipe but stdin
> > is connected to a pty.
> >
> > Here is the new test script that I used
> >
> > (let* (
> >       (stderr-buffer (get-buffer-create "*stderr*"))
> >       (stderr-proc (make-pipe-process :name "stderr"
> >                       :buffer stderr-buffer))
> >       (process-buf (get-buffer-create "*temp*")))
> >     (make-process
> >      :name "isatty"
> >      :buffer process-buf ;; it is not possible to pass the output of
> > make-pipe-process to :buffer
> >      :connection-type 'pty ;; unfortunately ignored if :stderr is used
> >      :stderr stderr-proc
> >      :command (list "/tmp/output-isatty.py")))
> >
> 
> Eli can you tell me if you meant that we should use make-process in
> combination with make-pipe-process?

If it's possible to solve your problem by using make-pipe-process, I'd
prefer such a solution.  Introducing yet another obscure option to
make-process should best be avoided, IMO.




This bug report was last modified 3 years and 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.