GNU bug report logs - #39667
26.2; Restarting a *shell* buffer breaks saving history

Previous Next

Package: emacs;

Reported by: ndame <emacsuser <at> freemail.hu>

Date: Tue, 18 Feb 2020 17:22:01 UTC

Severity: normal

Tags: fixed

Found in version 26.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39667 in the body.
You can then email your comments to 39667 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39667; Package emacs. (Tue, 18 Feb 2020 17:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ndame <emacsuser <at> freemail.hu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Feb 2020 17:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ndame <emacsuser <at> freemail.hu>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.2; Restarting a *shell* buffer breaks saving history
Date: Tue, 18 Feb 2020 17:17:47 +0000 (GMT)
[Message part 1 (text/plain, inline)]
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.
 
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39667; Package emacs. (Tue, 27 Oct 2020 12:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 39667 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <emacsuser <at> freemail.hu>
Cc: 39667 <at> debbugs.gnu.org
Subject: Re: bug#39667: 26.2; Restarting a *shell* buffer breaks saving history
Date: Tue, 27 Oct 2020 13:44:45 +0100
ndame <emacsuser <at> freemail.hu> writes:

> 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) ...

Yup.  This should now be fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 27 Oct 2020 12:46:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 39667 <at> debbugs.gnu.org and ndame <emacsuser <at> freemail.hu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 27 Oct 2020 12:46:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 25 Nov 2020 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.