From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Juri Linkov <juri@jurta.org>
Cc: 5148@emacsbugs.donarmstrong.com
Subject: bug#5148: Lossage in comint history
Date: Mon, 07 Dec 2009 14:23:46 -0500 [thread overview]
Message-ID: <jwvbpia6177.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <87iqcjeq45.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 07 Dec 2009 19:27:34 +0200")
> 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/
next prev parent reply other threads:[~2009-12-07 19:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y6kh8y0j.fsf@stupidchicken.com>
2009-12-07 17:27 ` bug#5148: Lossage in comint history Juri Linkov
2009-12-07 19:23 ` Stefan Monnier [this message]
2009-12-07 21:05 ` Juri Linkov
2010-01-01 18:46 ` bug#5148: marked as done (Lossage in comint history) Emacs bug Tracking System
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbpia6177.fsf-monnier+emacsbugreports@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=5148@emacsbugs.donarmstrong.com \
--cc=juri@jurta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).