From juri@jurta.org Mon Dec 7 09:33:00 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Dec 2009 17:33:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.2 required=4.0 tests=AWL,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB7HWxEH022069 for ; Mon, 7 Dec 2009 09:33:00 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHhSE-0004DU-SC for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 12:32:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHhS9-00046g-BT for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 12:32:57 -0500 Received: from [199.232.76.173] (port=60832 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHhS9-00046S-4r for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 12:32:53 -0500 Received: from smtp-out3.starman.ee ([85.253.0.5]:46781 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHhS9-00063f-8j for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 12:32:53 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.97.43.cable.starman.ee [82.131.97.43]) by mx1.starman.ee (Postfix) with ESMTP id A0C823F429C for ; Mon, 7 Dec 2009 19:32:45 +0200 (EET) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Lossage in comint history Organization: JURTA Date: Mon, 07 Dec 2009 19:27:34 +0200 Message-ID: <87iqcjeq45.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Using M-x shell in Emacs causes lossage in .bash_history. I set HISTFILESIZE and HISTSIZE to large values in .bashrc to not truncate the history file but comint.el disregards my settings and truncates the history file used by bash. 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. Index: lisp/comint.el =================================================================== RCS file: /sources/emacs/emacs/lisp/comint.el,v retrieving revision 1.402 diff -c -r1.402 comint.el *** lisp/comint.el 1 Dec 2009 20:32:00 -0000 1.402 --- lisp/comint.el 7 Dec 2009 17:27:08 -0000 *************** *** 309,317 **** :type 'integer :group 'comint) ! ;; FIXME: this should be defcustom ! (defvar comint-input-ring-size 150 ! "Size of input history ring.") (defvar comint-input-ring-separator "\n" "Separator between commands in the history file.") --- 309,319 ---- :type 'integer :group 'comint) ! (defcustom comint-input-ring-size 500 ! "Size of input history ring." ! :type 'integer ! :group 'comint ! :version "23.2") (defvar comint-input-ring-separator "\n" "Separator between commands in the history file.") -- Juri Linkov http://www.jurta.org/emacs/ From monnier@faina.iro.umontreal.ca Mon Dec 7 11:23:50 2009 Received: (at 5148) by emacsbugs.donarmstrong.com; 7 Dec 2009 19:23:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB7JNmYO001446 for <5148@emacsbugs.donarmstrong.com>; Mon, 7 Dec 2009 11:23:49 -0800 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nB7JNkPW014551; Mon, 7 Dec 2009 14:23:46 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 74B983A122; Mon, 7 Dec 2009 14:23:46 -0500 (EST) From: Stefan Monnier To: Juri Linkov Cc: 5148@debbugs.gnu.org Subject: Re: bug#5148: Lossage in comint history Message-ID: References: <87iqcjeq45.fsf@mail.jurta.org> Date: Mon, 07 Dec 2009 14:23:46 -0500 In-Reply-To: <87iqcjeq45.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 07 Dec 2009 19:27:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3422=0 > Using M-x shell in Emacs causes lossage in .bash_history. > I set HISTFILESIZE and HISTSIZE to large values in .bashrc > to not truncate the history file but comint.el disregards > my settings and truncates the history file used by bash. That's the bug, yes, thank you. > 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. Stefan > Index: lisp/comint.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/comint.el,v > retrieving revision 1.402 > diff -c -r1.402 comint.el > *** lisp/comint.el 1 Dec 2009 20:32:00 -0000 1.402 > --- lisp/comint.el 7 Dec 2009 17:27:08 -0000 > *************** > *** 309,317 **** > :type 'integer > :group 'comint) > ! ;; FIXME: this should be defcustom > ! (defvar comint-input-ring-size 150 > ! "Size of input history ring.") > (defvar comint-input-ring-separator "\n" > "Separator between commands in the history file.") > --- 309,319 ---- > :type 'integer > :group 'comint) > ! (defcustom comint-input-ring-size 500 > ! "Size of input history ring." > ! :type 'integer > ! :group 'comint > ! :version "23.2") > (defvar comint-input-ring-separator "\n" > "Separator between commands in the history file.") > -- > Juri Linkov > http://www.jurta.org/emacs/ From juri@jurta.org Mon Dec 7 13:21:48 2009 Received: (at 5148) by emacsbugs.donarmstrong.com; 7 Dec 2009 21:21:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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 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) From: Juri Linkov To: Stefan Monnier Cc: 5148@debbugs.gnu.org Subject: Re: bug#5148: Lossage in comint history Organization: JURTA References: <87iqcjeq45.fsf@mail.jurta.org> Date: Mon, 07 Dec 2009 23:05:16 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 07 Dec 2009 14:23:46 -0500") Message-ID: <87my1upjtq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> 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/ From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 01 13:45:38 2010 Received: (at 5148-done) by debbugs.gnu.org; 1 Jan 2010 18:45:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQmVG-0007dZ-HZ for submit@debbugs.gnu.org; Fri, 01 Jan 2010 13:45:38 -0500 Received: from pantheon-po29.its.yale.edu ([130.132.50.124]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQmVF-0007dT-At for 5148-done@debbugs.gnu.org; Fri, 01 Jan 2010 13:45:37 -0500 Received: from furry (dhcp128036014103.central.yale.edu [128.36.14.103]) (authenticated bits=0) by pantheon-po29.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o01IjW6C029207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 1 Jan 2010 13:45:32 -0500 Received: by furry (Postfix, from userid 1000) id D6819C05D; Fri, 1 Jan 2010 13:45:32 -0500 (EST) From: Chong Yidong To: Juri Linkov Subject: Re: Lossage in comint history Date: Fri, 01 Jan 2010 13:45:32 -0500 Message-ID: <87y6kh8y0j.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 5148-done Cc: 5148-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.3 (-) > Using M-x shell in Emacs causes lossage in .bash_history. > > I set HISTFILESIZE and HISTSIZE to large values in .bashrc > to not truncate the history file but comint.el disregards > my settings and truncates the history file used by bash. > > 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. Looks reasonable enough to me. Checked in, thanks. From unknown Sat Aug 09 12:59:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 Jan 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator