From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#7041: comint seems to truncate from places other than the top Date: Tue, 8 Dec 2020 19:18:34 +0000 Message-ID: References: <87y2i8dzap.fsf@gnus.org> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000beed5805b5f8cf49" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 7041@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 20:29:42 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmigA-0007RE-5y for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 20:29:42 +0100 Original-Received: from localhost ([::1]:50998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmig9-0001mV-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 14:29:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmiVs-0001Fh-5t for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:19:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmiVq-000895-C4 for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:19:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmiVq-0004YG-8N for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2020 19:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7041 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 7041-submit@debbugs.gnu.org id=B7041.160745513317482 (code B ref 7041); Tue, 08 Dec 2020 19:19:02 +0000 Original-Received: (at 7041) by debbugs.gnu.org; 8 Dec 2020 19:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:59816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmiVh-0004Xt-21 for submit@debbugs.gnu.org; Tue, 08 Dec 2020 14:18:53 -0500 Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:41424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmiVf-0004Xg-3C for 7041@debbugs.gnu.org; Tue, 08 Dec 2020 14:18:51 -0500 Original-Received: by mail-ot1-f46.google.com with SMTP id x13so9341084oto.8 for <7041@debbugs.gnu.org>; Tue, 08 Dec 2020 11:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WEMJwinyaoy1dYZSfbtwIg1Twb6dzOCEvrPjInizuFE=; b=1+FFdE+h/MOCBrMsYrZoLOBojVwIC8/hKETpkBk2vj2AQy93dbkkkaVDHRuQvJY79B 55OTEh3KymgRL383Om5VlD1cFQE5xB1CrB68i7VaMF4cyIN3ZIyGG/jlh9BGrU9Wmx/1 Sq9fDTW1+Ywm5U7aIAgW2fM4N/MauoLIGHVaY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WEMJwinyaoy1dYZSfbtwIg1Twb6dzOCEvrPjInizuFE=; b=K7hinfbScQnF2mhbbLmDDSawa+XIKgb5c7IFjSzGpc5AQzdPx8vFRTF1DOGtqpwotz M7a2o8JI7HZUgHlHfOHUZ5ucj2GCTlT2/AGjoLEPE2ldV053J7tn99oS+A9HK0VWHoo1 7c4ei6lRFgm8yZonTSdHzX2sjRFe/UgoJX5BUofLlcRsqqjjp9ehXFLdQfRM2iRWmMNH uUR8sJTzTwg4VCJ1cPLTVKtQKrp3zKwXVjy0Ee3cmen7vZ1W36EQd1hAu9SFJqlTpU2K uskfC4vhxw7PpA7HyII3l9lB89/dzSXdSurI8L6WnasrLJTRg3SYdSnuVGKJLJKFoGMU Agzw== X-Gm-Message-State: AOAM533Zjwf/+7HzM1+/F546RPaxpeYBzWkOMk6JFSFr/e82eKgwrCZe 4TVARXBmvecDkDD4/DN1yHaiR2u0YE4nO9iHZyrD4g== X-Google-Smtp-Source: ABdhPJzD+CbOoTLDVFlDARbGf4txmhILOOrh27Y0lqI3iQPJd2/Zscr63+VvCK5TF81uFJ/4xCUAeATUJWnTmn8l/a4= X-Received: by 2002:a9d:7f15:: with SMTP id j21mr18258089otq.76.1607455125459; Tue, 08 Dec 2020 11:18:45 -0800 (PST) In-Reply-To: <87y2i8dzap.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195431 Archived-At: --000000000000beed5805b5f8cf49 Content-Type: text/plain; charset="UTF-8" On Tue, 8 Dec 2020 at 16:43, Lars Ingebrigtsen wrote: > Reuben Thomas writes: > > > If I add comint-truncate-buffer to comint-output-filter-functions, and > > set comint-buffer-maximum-size to 1024, then when a term buffer > > reaches about that size, and I run a command that produces a lot of > > output, then scroll back, some of the output is missing. In other > > words, rather than truncate from the top of the buffer, some of the > > truncation at least seems to happen much nearer the bottom. > > (This bug report unfortunately got no response at the time.) > > Do you have a step-by-step recipe to reproduce this error, starting from > "emacs -Q"? > If I try it now, it doesn't seem to truncate the buffer as expected: for example emacs -Q M-: (add-to-list 'comint-output-filter-functions 'comint-truncate-buffer) M-x term C-c M-x set-variable comint-buffer-maximum-size 256 ; do this after M-x term because before comint-buffer-maximum-size is not defined $ seq 1 1024 The entire output is retained, and not truncated. Truncation seems to happen at 2048 lines. This does not even correspond to the original value of the variable (1024). However, I cannot detect any truncation at the bottom of the output. If I run C-c M-x comint-truncate-buffer, the buffer is truncated as expected, to 256 lines. -- https://rrt.sc3d.org --000000000000beed5805b5f8cf49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 8 Dec 2020 at 16:43, Lars Ingebrigtsen <larsi@gnus.org> wrote:
Reuben Thomas <rrt@sc3d.org> writes:

> If I add comint-truncate-buffer to comint-output-filter-functions, and=
> set comint-buffer-maximum-size to 1024, then when a term buffer
> reaches about that size, and I run a command that produces a lot of > output, then scroll back, some of the output is missing. In other
> words, rather than truncate from the top of the buffer, some of the > truncation at least seems to happen much nearer the bottom.

(This bug report unfortunately got no response at the time.)

Do you have a step-by-step recipe to reproduce this error, starting from "emacs -Q"?

If I try it now, it doesn't seem to truncate the buffer as expected: = for example

emacs -Q
M-: (add-to-list 'comint-output-filter-functions= 'comint-truncate-buffer)
M-x term
C-c M-x= set-variable comint-buffer-maximum-size 256 ; do this after M-x term becau= se before comint-buffer-maximum-size is not defined
$ seq 1 1024

The = entire output is retained, and not truncated. Truncation seems to happen at= 2048 lines. This does not even correspond to the original value of the var= iable (1024).

However,= I cannot detect any truncation at the bottom of the output.

If I run C-c M-x comint-truncate-buf= fer, the buffer is truncated as expected, to 256 lines.

--
--000000000000beed5805b5f8cf49--