From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#5148: Lossage in comint history Date: Mon, 07 Dec 2009 23:05:16 +0200 Organization: JURTA Message-ID: <87my1upjtq.fsf@mail.jurta.org> References: <87iqcjeq45.fsf@mail.jurta.org> Reply-To: Juri Linkov , 5148@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260226202 22254 80.91.229.12 (7 Dec 2009 22:50:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 22:50:02 +0000 (UTC) Cc: 5148@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 07 23:49:54 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NHmOv-0006Z4-AA for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 23:49:53 +0100 Original-Received: from localhost ([127.0.0.1]:51366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHmOv-0004eO-84 for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 17:49:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHlQb-0007Z4-V0 for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:47:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHlQX-0007T8-0P for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:47:33 -0500 Original-Received: from [199.232.76.173] (port=45653 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHlQW-0007Sj-OG for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:47:28 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47941) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHlQW-0000WD-AT for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 16:47:28 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB7LlPZA015179; Mon, 7 Dec 2009 13:47:25 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nB7LU4Ql013596; Mon, 7 Dec 2009 13:30:04 -0800 Resent-Date: Mon, 7 Dec 2009 13:30:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 07 Dec 2009 21:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5148 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5148-submit@emacsbugs.donarmstrong.com id=B5148.126022090813016 (code B ref 5148); Mon, 07 Dec 2009 21:30:03 +0000 Original-Received: (at 5148) by emacsbugs.donarmstrong.com; 7 Dec 2009 21:21:48 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB7LLkPw013013 for <5148@emacsbugs.donarmstrong.com>; Mon, 7 Dec 2009 13:21:48 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.97.43.cable.starman.ee [82.131.97.43]) by mx1.starman.ee (Postfix) with ESMTP id 4E4BB3F4226; Mon, 7 Dec 2009 23:21:41 +0200 (EET) In-Reply-To: (Stefan Monnier's message of "Mon, 07 Dec 2009 14:23:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 07 Dec 2009 16:47:33 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33383 Archived-At: >> The following patch make `comint-input-ring-size' customizable. >> The type should be `integer' because this value is used by `make-ring' >> to create the history ring. The default value increased to 500 >> to be the same as the default value of HISTFILESIZE and HISTSIZE. > > Actually, to fix the bug right, comint-read-input-ring should be changed > to grow the ring so as to accomodate all the saved history. This might > still truncate it more than bash would have, but at least it won't make > your .bash_history shorter than it was. Someone still might want to truncate the history to the length defined by `comint-input-ring-size'. So adding defcustom is useful in any case. Later we could add more options to `comint-input-ring-size' e.g. `t' like in `message-log-max'. It's easy to implement this (by reading all history in `comint-read-input-ring' and using `ring-insert+extend' while adding new elements) but I don't think this should be the default because bash users might prefer `comint-input-ring-size' to have the same value as `HISTFILESIZE'. Maybe we should add another option for `comint-input-ring-size' to set it to (getenv "HISTFILESIZE") when it is used by `M-x shell'. -- Juri Linkov http://www.jurta.org/emacs/