all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Shell history is not saved when the shell is exited then restarted
@ 2010-10-30 20:29 Tom
  0 siblings, 0 replies; only message in thread
From: Tom @ 2010-10-30 20:29 UTC (permalink / raw
  To: emacs-devel

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?






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-30 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-30 20:29 Shell history is not saved when the shell is exited then restarted Tom

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.