Subject: bug#35339: closed (Re: bug#35339: Say what buffering is not --line-buffered)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 22 Sep 2020 18:01:02 +0000

Your bug report

#35339: Say what buffering is not --line-buffered

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35339: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35339
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#35339: Say what buffering is not --line-buffered
From: Paul Eggert <[email-masked]>
To: 積丹尼 Dan Jacobson <[email-masked]>
Cc: [email-masked]
Date: Tue, 22 Sep 2020 11:00:15 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 4/20/19 4:41 AM, 積丹尼 Dan Jacobson wrote:
>    ‘--line-buffered’
>         Use line buffering on output.  This can cause a performance
>         penalty.
> 
> OK, but say what will happen if one doesn't use this. Paragraph
> buffering? Page buffering?

Thanks for mentioning this. I installed the attached patch to try to clarify 
this point.
>From 2508eb94fbd01c73f78f742b61953fdf938acf4b Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Tue, 22 Sep 2020 10:56:29 -0700
Subject: [PATCH] doc: improve --line-buffer doc

* doc/grep.texi (Other Options): Document --line-buffered more
carefully, and say what happens when it is not used.  Problem
reported by Dan Jacobson (Bug#35339).
---
 doc/grep.texi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/grep.texi b/doc/grep.texi
index 15185f3..bb76ae1 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -771,8 +771,11 @@ and @file{file2}.
 @item --line-buffered
 @opindex --line-buffered
 @cindex line buffering
-Use line buffering on output.
-This can cause a performance penalty.
+Use line buffering for standard output, regardless of output device.
+By default, standard output is line buffered for interactive devices,
+and is fully buffered otherwise.  With full buffering, the output
+buffer is flushed when full; with line buffering, the buffer is also
+flushed after every output line.  The buffer size is system dependent.
 
 @item -U
 @itemx --binary
-- 
2.17.1

Subject: Say what buffering is not --line-buffered
From: 積丹尼 Dan Jacobson <[email-masked]>
To: [email-masked]
Date: Sat, 20 Apr 2019 19:41:44 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On (info "(grep) Other Options")

  ‘--line-buffered’
       Use line buffering on output.  This can cause a performance
       penalty.

OK, but say what will happen if one doesn't use this. Paragraph
buffering? Page buffering?