[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Saving all comint history in real time
From: |
Tom |
Subject: |
Re: Saving all comint history in real time |
Date: |
Tue, 14 Feb 2012 09:52:08 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Yaroslav Bulatov <yaroslavvb <at> 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.