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 22:37:52 +0000 Message-ID: References: <87y2i8dzap.fsf@gnus.org> <87lfe87ww9.fsf@gnus.org> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000081d60505b5fb9873" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14466"; 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 23:43:14 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 1kmlhS-0003fH-Dz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 23:43:14 +0100 Original-Received: from localhost ([::1]:46462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmlhR-0000bI-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 17:43:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmldO-0004nr-2x for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 17:39:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmldN-0006Rn-PL for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 17:39:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmldN-0005hr-ME for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 17:39:01 -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 22:39:01 +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.160746709121851 (code B ref 7041); Tue, 08 Dec 2020 22:39:01 +0000 Original-Received: (at 7041) by debbugs.gnu.org; 8 Dec 2020 22:38:11 +0000 Original-Received: from localhost ([127.0.0.1]:60122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmlcY-0005gN-Un for submit@debbugs.gnu.org; Tue, 08 Dec 2020 17:38:11 -0500 Original-Received: from mail-oi1-f179.google.com ([209.85.167.179]:46166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmlcX-0005gA-By for 7041@debbugs.gnu.org; Tue, 08 Dec 2020 17:38:09 -0500 Original-Received: by mail-oi1-f179.google.com with SMTP id k2so247629oic.13 for <7041@debbugs.gnu.org>; Tue, 08 Dec 2020 14:38:09 -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=haHXs7XJ4Yd7xtnqN0dh65WXVZ0o9BB8n0d+ajDOa6M=; b=Q6UM65Ie+RNxTF7iO915uCfJJw3cAOgwpg2jJw+9Mnnw1yYEVw90c3KrxzNz9Lk2M8 P1HGN8VrqNjxPwKUnc92RSALXdHh15fTAnkM4HDTsb/STrHTafEOBsYHPIfqBcgXRrNX 0rh9lBVPVbU0Tk6+KQZav6qbDzyFjQy4KgcjI= 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=haHXs7XJ4Yd7xtnqN0dh65WXVZ0o9BB8n0d+ajDOa6M=; b=U/+MwWqkMeve5tgnjxn42VQI9rFGe4G1W7x1pj9DFl/tJFu+1elvapB+r0tJHUv5+B ZeVansGsU12eb8WtGfoNuOSclsNWnqbrvvFoMvWDfk70HSZTfC3te3mk2CtlcCqn5AmD fLvUgIM6ugWayeTyk0ikD3PVovJkjYpFBnK56JdFEUuy0xEDBug9XsUjMF6/i/cmEs7h qoiQnWvHnJABYC8Quux4cwQtVrSDmDAmqr65EIAd2EpL5gASe2F6S2bzWfEOs6pzYIvG RcL5+EbrBztDS/X4bvuvEuZg6zjVN13iKLqcz09uqtJom6RAw/RrnK1Bg2yZqvveOhiJ TtoQ== X-Gm-Message-State: AOAM5300hizn+TxQG41eoQxBIWNK2UxvUfXC2BJv5MLijmwBjjfoW0OZ EiJXLSA0YhcvEV2XFyBU5vgaK2aHw8NlqPJixYnQmw== X-Google-Smtp-Source: ABdhPJxwhQkyNUEnwhtsEAVoZpqg1CesaLBZGmWDGWpYJIwVcsV+b3+Zmsi/Lemad2QPj0I7xhx6FGpIfSpWg9qTnCw= X-Received: by 2002:aca:a9c8:: with SMTP id s191mr84996oie.11.1607467083610; Tue, 08 Dec 2020 14:38:03 -0800 (PST) In-Reply-To: <87lfe87ww9.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:195453 Archived-At: --00000000000081d60505b5fb9873 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 8 Dec 2020 at 22:31, Lars Ingebrigtsen wrote: > Reuben Thomas writes: > > > If I try it now, it doesn't seem to truncate the buffer as expected: fo= r > example > > > > emacs -Q > > M-: (add-to-list 'comint-output-filter-functions 'comint-truncate-buffe= r) > > 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). > > I'm not getting any truncation... but that variable is about comint > buffers, like in `M-x shell' and the like. Is term-mode a comint > buffer? It's not derived from comint-mode, so I'm not sure whether this > is supposed to work there? > Ah, that would seem to explain it! Indeed, `term-buffer-maximum-size` defaults to 2048. So this bug report is based on a misunderstanding, and you can close it, sorry! In investigating, I noticed that the following text in term.el appears to be out of date: ;; Brief Command Documentation: =E2=80=A6 for example: ;; M-s comint-next-matching-input Next input that matches =E2=86=90 = This is not true! It is bound to term-next-matching-input. Is there any point retaining this documentation at the top of the file where it doesn't appear in the manual or any docstring? --=20 https://rrt.sc3d.org --00000000000081d60505b5fb9873 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 8 Dec 2020 at 22:31, Lars Ingebrigtsen <larsi@gnus.org> wrote:
Reuben Thomas <rrt@sc3d.org> writes:

> If I try it now, it doesn't seem to truncate the buffer as expecte= d: for example
>
> emacs -Q
> M-: (add-to-list 'comint-output-filter-functions 'comint-trunc= ate-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).

I'm not getting any truncation...=C2=A0 but that variable is about comi= nt
buffers, like in `M-x shell' and the like.=C2=A0 Is term-mode a comint<= br> buffer?=C2=A0 It's not derived from comint-mode, so I'm not sure wh= ether this
is supposed to work there?

Ah, that would seem to explain it! Indeed, `term-buffer-maximum-si= ze` defaults to 2048.

= So this bug report is based on a misunderstanding, and you can close it, so= rry!

In investigating,= I noticed that the following text in term.el appears to be out of date:

;; Brief Command Doc= umentation:
=E2=80=A6 for example:
;; M-s =C2=A0 =C2=A0 comint-next-matching-input =C2=A0 =C2= =A0Next input that matches =E2=86=90 This is not true! It is bound to term-= next-matching-input.

I= s there any point retaining this documentation at the top of the file where= it doesn't appear in the manual or any docstring?

--
--00000000000081d60505b5fb9873--