GNU bug report logs -
#5148
Lossage in comint history
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Mon, 7 Dec 2009 17:40:05 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5148 in the body.
You can then email your comments to 5148 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5148
; Package
emacs
.
(Mon, 07 Dec 2009 17:40:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> jurta.org>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 07 Dec 2009 17:40:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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/
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5148
; Package
emacs
.
(Mon, 07 Dec 2009 19:30:10 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 07 Dec 2009 19:30:11 GMT)
Full text and
rfc822 format available.
Message #10 received at 5148 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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/
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5148
; Package
emacs
.
(Mon, 07 Dec 2009 21:30:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> jurta.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 07 Dec 2009 21:30:04 GMT)
Full text and
rfc822 format available.
Message #15 received at 5148 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> 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/
Reply sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
(Fri, 01 Jan 2010 18:46:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Juri Linkov <juri <at> jurta.org>
:
bug acknowledged by developer.
(Fri, 01 Jan 2010 18:46:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 5148-done <at> debbugs.gnu.org (full text, mbox):
> 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.
bug archived.
Request was from
Debbugs Internal Request <bug-gnu-emacs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 30 Jan 2010 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.