GNU bug report logs - #62958
[PATCH] Set PAGER=cat in comint.el

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Wed, 19 Apr 2023 21:58:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: sbaugh <at> catern.com, Eli Zaretskii <eliz <at> gnu.org>, 62958 <at> debbugs.gnu.org, Spencer Baugh <sbaugh <at> janestreet.com>
Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el
Date: Fri, 12 May 2023 22:21:19 +0000
>>> I will definitely customize the new option 'comint-pager' to "cat" as 
>>> soon as it arrives to master.  But for such cases when some commands 
>>> produce too long output, would it be also possible to provide an 
>>> additional option to set the number of lines to output before 
>>> stopping?
>>
>> Did you try "cat | head -N"?
>
> Now I tried out, and it works as expected.  Only there is no indication 
> that the output is truncated.  But probably such indication is not 
> important with overly long output.
>

If you want such an indication, I suggest using sed instead of head:

cat | sed -e "<N>aOUTPUT TRUNCATED" -e "<N>q"

(Of course, replace <N> with the number of lines of output you want.  And 
of course you can replace the string "OUTPUT TRUNCATED" with whatever you 
want.)





This bug report was last modified 1 year and 361 days ago.

Previous Next


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