On Tue, Nov 22, 2022 at 3:38 AM Jeff King <peff@xxxxxxxx> wrote: > It's also unfortunate that we have to repeat the ugly "type" check > above, which also happens again later, after we make the temp file. I > see why you did it this way; the stdout code path does not want to make > the tempfile. But the code before your patch was silly to do it this > way; we should always have been checking the parameters before making a > tempfile. > > I was also puzzled why the stdout mode redirects stderr from the mode > function. Wouldn't the user want to see any errors? > > So together, it might look something like this (instead of, rather than > on top of your patch): Thanks. I've applied it. I was throwing away stderr because Emacs' M-x grep inserted both stdout and stderr into the output destination, and a perl warning was issued. However, the warning itself is meaningful, and I thought it would be very bad not to know the reason when an error occurred, so I came to the conclusion that stderr should be left as is. -- Yoichi NAKAYAMA