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

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

bug#39667: 26.2; Restarting a *shell* buffer breaks saving history


From: ndame
Subject: bug#39667: 26.2; Restarting a *shell* buffer breaks saving history
Date: Tue, 18 Feb 2020 17:17:47 +0000 (GMT)


I tried it on windows.

Start M-x shell.

Check the value of comint-input-ring-file-name in the buffer. It's
"~/.history" and the input ring has values read from this file.

Exit the shell with Ctrl+D. The shell exits, the buffer remains.

Restart the shell with M-x shell.

Check the value of comint-input-ring-file-name. It's nil, because
comint-input-ring has already has a value from the previous
invocation, so shell-mode skips the whole history setup: (when
(ring-empty-p comint-input-ring) ...

Without the setup shell-write-history-on-exit is not called and if it
were it would do nothing, because comint-input-ring-file-name is nil.

Therefore the restarted *shell* buffer won't save commands made in it
to history.
 
reply via email to

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