emacs-devel
[Top][All Lists]
Advanced

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

Shell history is not saved when the shell is exited then restarted


From: Tom
Subject: Shell history is not saved when the shell is exited then restarted
Date: Sat, 30 Oct 2010 20:29:32 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I was wondering why my shell input history is not saved sometimes,
so I checked the code and found this condition in shell-mode:

  (when (ring-empty-p comint-input-ring)

      ...

      ;; Arrange to write out the input ring on exit, if the shell doesn't
      ;; do this itself.

      ...

http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/shell.el#n448


My current shell is the Windows command prompt which needs that arranging
and that ring-empty-p check means if I exit from the shell for some reason
and then restart it with M-x shell then the inputs of the second session are
not saved, because the comint-input-ring already has items from the
previous shell invocation.

Is there a compelling reason for that check? Why can't the inputs be
saved if the comint-input-ring is not empty when the shell is started?






reply via email to

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