GNU bug report logs - #44941
28.0.50; M-x grep, perhaps all asynch subprocesses

Previous Next

Package: emacs;

Reported by: rms <at> gnu.org

Date: Sun, 29 Nov 2020 05:23:01 UTC

Severity: normal

Tags: notabug, unreproducible

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jean Louis <bugs <at> gnu.support>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 44941 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>, rms <at> gnu.org
Subject: bug#44941: 28.0.50; M-x grep, perhaps all asynch subprocesses
Date: Mon, 30 Nov 2020 19:46:28 +0300
* Eli Zaretskii <eliz <at> gnu.org> [2020-11-30 19:39]:
> > From: Andreas Schwab <schwab <at> linux-m68k.org>
> > Cc: rms <at> gnu.org,  44941 <at> debbugs.gnu.org
> > Date: Mon, 30 Nov 2020 16:47:28 +0100
> > 
> > On Nov 30 2020, Eli Zaretskii wrote:
> > 
> > >> From: Richard Stallman <rms <at> gnu.org>
> > >> Cc: 44941 <at> debbugs.gnu.org
> > >> Date: Sun, 29 Nov 2020 23:46:22 -0500
> > >> 
> > >> Here is the cgrep script:
> > >> 
> > >> #!/bin/bash
> > >> 
> > >> grep -a "$@" | cut -c -200
> > >> 
> > >> cut seems to be responsible for the problem by buffering output even to a tty.
> > >
> > > Sounds like a useful feature to ask Grep developers to add it.
> > 
> > That feature already exists: stdbuf.
> 
> I'm not sure I understand: I meant the feature to limit the output
> lines to a given column count.

Is it not this option for limiting?

	-m NUM, --max-count=NUM
		Stop reading a  file after NUM matching  lines.  If the
		input is  standard input from  a regular file,  and NUM
		matching  lines  are  output,  grep  ensures  that  the
		standard  input is  positioned to  just after  the last
		matching  line   before  exiting,  regardless   of  the
		presence  of trailing  context lines.   This enables  a
		calling process  to resume  a search.  When  grep stops
		after  NUM  matching  lines, it  outputs  any  trailing
		context lines.  When  the -c or --count  option is also
		used, grep  does not output  a count greater  than NUM.
		When the -v or --invert-match option is also used, grep
		stops after outputting NUM non-matching lines.




This bug report was last modified 4 years and 256 days ago.

Previous Next


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