GNU bug report logs - #72138
30.0.50; [PATCH] Fix ring size in comint-read-input-ring

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Liu Hui <liuhui1610@HIDDEN>; Keywords: patch; dated Tue, 16 Jul 2024 10:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 10:10:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 16 06:10:28 2024
Received: from localhost ([127.0.0.1]:32800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sTf8d-0006T0-T9
	for submit <at> debbugs.gnu.org; Tue, 16 Jul 2024 06:10:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:37998)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liuhui1610@HIDDEN>) id 1sTf8c-0006Sr-0g
 for submit <at> debbugs.gnu.org; Tue, 16 Jul 2024 06:10:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <liuhui1610@HIDDEN>)
 id 1sTf8Z-0002xU-7Z
 for bug-gnu-emacs@HIDDEN; Tue, 16 Jul 2024 06:10:23 -0400
Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <liuhui1610@HIDDEN>)
 id 1sTf8X-0004yn-GQ
 for bug-gnu-emacs@HIDDEN; Tue, 16 Jul 2024 06:10:22 -0400
Received: by mail-ua1-x92f.google.com with SMTP id
 a1e0cc1a2514c-80fbfeecca1so31315241.1
 for <bug-gnu-emacs@HIDDEN>; Tue, 16 Jul 2024 03:10:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1721124620; x=1721729420; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=kWZbB3RUMte9X6B290h5/F6WIxHb/n2nnRJ6YbHsnFE=;
 b=fOuaXjQyPxiyo7GOykCB5ixD8w3w9ubvrHS/z21tyhCs9PULfcFJeZBcIJmUorga7t
 8IJAGJ7weaCj8L4EX4Lrrx+y9xPXV/QRUPHRr6JR2EjcK2yF5cvSG4MUPOKvPPkAWuP4
 0KxH3JkDgHDs9ivmKObYEoXNR9JdsD+urkwfk5U4882rddICxd0y/uUATg5eSfxYFltC
 RARPaVIu70fNaS6xrD/xIGs78Fi1h1tEusVTblmasghp9tgr3/NFeN47XrT+cbsE65Fw
 McdLzpH1FFkTTDsS/B74nWo33l71l+mx22tB0Xw86SL4dCNoWsNmq+/uuubtyrJR8W7U
 q3/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721124620; x=1721729420;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=kWZbB3RUMte9X6B290h5/F6WIxHb/n2nnRJ6YbHsnFE=;
 b=DfP1hqWED/jQutLrwVX+yAa6k8XI5TK54nySH99OIZ2Eniny1qispNh3B8b272C+xr
 GjeArLSrNMoK5/44XfaSYdWQhEhk8fQvs3WSKhqffPF0g1Es47CDGGzZD0Q5XKPahuY7
 vvKXuNZHQ/GUDfHxLi5f6uDdkDIkxeVlhgYwP/6MpZsl7kQMGUHFZAybgNRyBAGZnxJu
 btnPNO74g3fL8DJ/zq3ucWBNLf1KKpSw4VLu32Ymx3jrypDLBzbTSqWEixUOtawC8am3
 noR7uM0qlBfcsi/uFVBgQrf00mruYrfyzwbAcBT2afr+8VPY9PXhELpQ552gNRpoz1Pn
 zUWA==
X-Gm-Message-State: AOJu0YyaTj83SwxEWq3OAwBeKqcn7kNe+saVIEqVc/NYpVi6ny2dOrNt
 lGSS/Z1VvXtY39TRhYiVbJthfR94Ku2WFC216geayhMXMikETudGvlqw+FPX4LZ/xzj5Q+CcAsd
 ulcb9uTD5ObyORjaGbZPdjFkFz4VhsVFSynmo+w==
X-Google-Smtp-Source: AGHT+IGO1Qa1YDeG4QiOS2lDW9EVoAOhz2+5856VlO1KffnSPycgHj1qVomd9x5Ar6gKbaU/I+pLGr94/KFiwFAN/ZI=
X-Received: by 2002:a05:6102:5794:b0:48f:e68d:c1a7 with SMTP id
 ada2fe7eead31-4914c590284mr1698627137.23.1721124619539; Tue, 16 Jul 2024
 03:10:19 -0700 (PDT)
MIME-Version: 1.0
From: Liu Hui <liuhui1610@HIDDEN>
Date: Tue, 16 Jul 2024 18:10:00 +0800
Message-ID: <CAOQTW-NC=0Au3vnHgW9vdirgx0P0AOBVpQ58vWGJ27n4Zfi_fg@HIDDEN>
Subject: 30.0.50; [PATCH] Fix ring size in comint-read-input-ring
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="0000000000008ff935061d5a8d64"
Received-SPF: pass client-ip=2607:f8b0:4864:20::92f;
 envelope-from=liuhui1610@HIDDEN; helo=mail-ua1-x92f.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--0000000000008ff935061d5a8d64
Content-Type: text/plain; charset="UTF-8"

Hi,

When comint-read-input-ring reads history to the ring, the global
value of comint-input-ring-size (i.e. 500) is used regardless of the
local value due to the use of temp buffer. For example:

1. HISTSIZE=10 emacs -Q
2. M-x shell

The buffer-local value of comint-input-ring-size is correctly set to
10, but C-c C-l shows 500 commands.

The attached patch fixes the problem that comint-read-input-ring
ignores the buffer-local comint-input-ring-size. Thanks.

--0000000000008ff935061d5a8d64
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-lisp-comint.el-comint-read-input-ring-Fix-ring-size.patch"
Content-Disposition: attachment; 
	filename="0001-lisp-comint.el-comint-read-input-ring-Fix-ring-size.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lyo70c2l0>
X-Attachment-Id: f_lyo70c2l0

RnJvbSA1MGY0ZTdlMzQ5NjkzZGZiNzJlNGRiYTIzZWM2OWVmZGI5MGI3ZWFiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBMaXUgSHVpIDxsaXVodWkxNjEwQGdtYWlsLmNvbT4KRGF0ZTog
VHVlLCAxNiBKdWwgMjAyNCAxODowNTo0N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aXN0
b3J5IGZpbGVzIQogICAgICAgICAgICAgIChnb3RvLWNoYXIgKHBvaW50LW1heCkpCiAgICAgICAg
ICAgICAgKGxldCAoc3RhcnQgZW5kIGhpc3RvcnkpCi0gICAgICAgICAgICAgICAod2hpbGUgKGFu
ZCAoPCBjb3VudCBjb21pbnQtaW5wdXQtcmluZy1zaXplKQorICAgICAgICAgICAgICAgKHdoaWxl
IChhbmQgKDwgY291bnQgcmluZy1tYXgtc2l6ZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAg
IChyZS1zZWFyY2gtYmFja3dhcmQgcmluZy1zZXBhcmF0b3IgbmlsIHQpCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAoc2V0cSBlbmQgKG1hdGNoLWJlZ2lubmluZyAwKSkpCiAgICAgICAgICAg
ICAgICAgIChnb3RvLWNoYXIgKGlmIChyZS1zZWFyY2gtYmFja3dhcmQgcmluZy1zZXBhcmF0b3Ig
bmlsIHQpCkBAIC0xMDg4LDcgKzEwODksNyBAQCBjb21pbnQtcmVhZC1pbnB1dC1yaW5nCiAJCQkJ
KG5vdCAoc3RyaW5nLWVxdWFsIChyaW5nLXJlZiByaW5nIDApCiAJCQkJCQkgICBoaXN0b3J5KSkp
KQogCQkgICAod2hlbiAoPSBjb3VudCByaW5nLXNpemUpCi0JCSAgICAgKHJpbmctZXh0ZW5kIHJp
bmcgKG1pbiAoLSBjb21pbnQtaW5wdXQtcmluZy1zaXplIHJpbmctc2l6ZSkKKwkJICAgICAocmlu
Zy1leHRlbmQgcmluZyAobWluICgtIHJpbmctbWF4LXNpemUgcmluZy1zaXplKQogCQkJCQkgICAg
cmluZy1zaXplKSkKIAkJICAgICAoc2V0cSByaW5nLXNpemUgKHJpbmctc2l6ZSByaW5nKSkpCiAJ
CSAgIChyaW5nLWluc2VydC1hdC1iZWdpbm5pbmcgcmluZyBoaXN0b3J5KQotLSAKMi4yNS4xCgo=
--0000000000008ff935061d5a8d64--




Acknowledgement sent to Liu Hui <liuhui1610@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#72138; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 16 Jul 2024 10:15:02 UTC

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