help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving all comint history in real time


From: Yaroslav Bulatov
Subject: Re: Saving all comint history in real time
Date: Tue, 14 Feb 2012 11:44:40 -0800

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 <address@hidden> wrote:
> 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.
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]