From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yaroslav Bulatov Newsgroups: gmane.emacs.help Subject: Re: Saving all comint history in real time Date: Tue, 14 Feb 2012 11:44:40 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1329248695 30426 80.91.229.3 (14 Feb 2012 19:44:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2012 19:44:55 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tom Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 14 20:44:54 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxOJ3-0006g9-NZ for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 20:44:53 +0100 Original-Received: from localhost ([::1]:50176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxOJ3-00037e-2M for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 14:44:53 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxOIt-00037O-L4 for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 14:44:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxOIr-0004j3-Pa for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 14:44:43 -0500 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:56691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxOIr-0004hN-GK for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 14:44:41 -0500 Original-Received: by bkty12 with SMTP id y12so400364bkt.0 for ; Tue, 14 Feb 2012 11:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GNQ/BoOcP8ZB0TTecmtfHgfLPaIMDWoKepTE4G3m/L8=; b=arEMbP9rI8k5nqleP9kbOxLM4IAtZo+GAak+doe8NPJ3XnvWxqbF13cSngEF4hA3oR x9RgQpDEAJUCKMMpf0mUgJE+qcAFenCTIp7mw4t7vKhqcZlWtI2DC7v2b2sMvGISQj3Z 3065p5u1xXpdSxn81Q0hvt/fA0jL7EUM8Ox9U= Original-Received: by 10.204.143.131 with SMTP id v3mr9943774bku.44.1329248680296; Tue, 14 Feb 2012 11:44:40 -0800 (PST) Original-Received: by 10.204.224.1 with HTTP; Tue, 14 Feb 2012 11:44:40 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83749 Archived-At: Yes, that actually saves all the commands. However, when I exit the shell, this file is overwritten by something else, and new version does not include commands from subshells On Tue, Feb 14, 2012 at 1:52 AM, Tom wrote: > Yaroslav Bulatov gmail.com> writes: > >> >> Is there something out there to save all of my comint history after >> each command (as opposed to the end of the session?) >> I'm using shell-mode right now, and it logs history to >> .bash_history.log, but that misses any commands issued when I ssh, and >> doesn't save anything until the end of the session >> > > > Try setting the environment variable HISTFILE, before starting M-x shell, > because otherwise history won't be saved for bash (at least that's the > case in Emacs 23 which I use). > > Then you can try calling (comint-write-input-ring) from M-: after typing > some commands to see if it saves the inputs to the file you set in HISTFILE. > > If it does then you can add an after advise to comint-send-input to call > comint-write-input-ring after each command. > > > >