unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: ndame <emacsuser@freemail.hu>
To: 39667@debbugs.gnu.org
Subject: bug#39667: 26.2; Restarting a *shell* buffer breaks saving history
Date: Tue, 18 Feb 2020 17:17:47 +0000 (GMT)	[thread overview]
Message-ID: <AySrog.nESYTxvfG8HP.WUrlHpJLYJJRoCOs4fwc@freemail.hu> (raw)

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]


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.
 

[-- Attachment #2: Type: text/html, Size: 884 bytes --]

             reply	other threads:[~2020-02-18 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 17:17 ndame [this message]
2020-10-27 12:44 ` bug#39667: 26.2; Restarting a *shell* buffer breaks saving history Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AySrog.nESYTxvfG8HP.WUrlHpJLYJJRoCOs4fwc@freemail.hu \
    --to=emacsuser@freemail.hu \
    --cc=39667@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).