emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] Don't print "process finished" into the stderr buffer.


From: Philipp Stephani
Subject: Re: [PATCH 2/3] Don't print "process finished" into the stderr buffer.
Date: Sun, 21 Apr 2019 15:55:54 +0200

Am Sa., 20. Apr. 2019 um 09:31 Uhr schrieb Eli Zaretskii <address@hidden>:
>
> > From: Philipp Stephani <address@hidden>
> > Date: Fri, 19 Apr 2019 21:28:32 +0200
> > Cc: Emacs developers <address@hidden>, Philipp Stephani <address@hidden>
> >
> > > But I'm guessing that the current behavior was unexpected for some
> > > reason, and that's why you looked in the documentation.  If the guess
> > > is correct, could you describe why it was unexpected/unwanted?
> >
> > It's unexpected that Emacs writes something. This is an instance of
> > the general case that by default you expect nothing to happen instead
> > of something, unless you request the "something". For example, after
> > $ echo foo > bar
> > would you expect that the file "bar" contains content other than
> > "foo\n" because the shell decides to write additional text before
> > closing redirections? This is the same thing.
>
> But Emacs does that for ages, so in Emacs this is veteran behavior of
> the default sentinel function.

Sure, but the documentation doesn't state clearly that Emacs creates a
pipe process with the default sentinel if the caller passes a buffer,
so it's unexpected that the default sentinel runs.

>
> > The documentation for make-process doesn't state that if :stderr is a
> > buffer, make-process creates a pipe process with the default sentinel;
>
> Actually, it does, albeit in the parent section:
>
>      Alternatively, you could use the ‘:stderr’ parameter with a non-‘nil’
>   value in a call to ‘make-process’ (*note make-process: Asynchronous
>   Processes.) to make the destination of the error output separate from
>   the standard output; in that case, Emacs will use pipes for
>   communicating with the subprocess.

That seems rather subtle and even unrelated. The "pipe" here refers to
Unix pipes, not to Emacs pipe processes.
If you don't want to change the behavior, how about at least
clarifying the documentation? I can install a patch for that.



reply via email to

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