From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.help Subject: Re: Saving all comint history in real time Date: Tue, 14 Feb 2012 09:52:08 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1329213159 3170 80.91.229.3 (14 Feb 2012 09:52:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2012 09:52:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 14 10:52:37 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 1RxF3t-0002R1-3R for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 10:52:37 +0100 Original-Received: from localhost ([::1]:37159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxF3s-00059S-5z for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 04:52:36 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxF3i-00058c-Q5 for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 04:52:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxF3c-00085Z-8j for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 04:52:26 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxF3c-00085R-3e for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 04:52:20 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RxF3Z-0002BK-IV for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 10:52:17 +0100 Original-Received: from 94-21-170-13.pool.digikabel.hu ([94.21.170.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 10:52:17 +0100 Original-Received: from adatgyujto by 94-21-170-13.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 10:52:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 94.21.170.13 (Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.229 Version/11.61) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:83746 Archived-At: 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.