From unknown Sat Jun 14 21:26:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#39667 <39667@debbugs.gnu.org> To: bug#39667 <39667@debbugs.gnu.org> Subject: Status: 26.2; Restarting a *shell* buffer breaks saving history Reply-To: bug#39667 <39667@debbugs.gnu.org> Date: Sun, 15 Jun 2025 04:26:23 +0000 retitle 39667 26.2; Restarting a *shell* buffer breaks saving history reassign 39667 emacs submitter 39667 ndame severity 39667 normal tag 39667 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 18 12:21:32 2020 Received: (at submit) by debbugs.gnu.org; 18 Feb 2020 17:21:32 +0000 Received: from localhost ([127.0.0.1]:41213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j46Yt-0007MG-TM for submit@debbugs.gnu.org; Tue, 18 Feb 2020 12:21:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:52940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j46Yr-0007M6-RG for submit@debbugs.gnu.org; Tue, 18 Feb 2020 12:21:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52612) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j46Yq-0004qh-PW for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 12:21:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPOOFED_FREEMAIL autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j46Yp-0003PT-OD for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 12:21:28 -0500 Received: from fmfe22.onbox.hu ([46.107.16.227]:13492 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j46Yp-0003IG-Eq for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 12:21:27 -0500 X-fm-smtp-source: yes Received: from localhost (localhost [178.164.166.72]) by web-out.onbox.hu (Postfix) with SMTP id 48MSLj5cJJzZyq for ; Tue, 18 Feb 2020 18:21:17 +0100 (CET) Date: Tue, 18 Feb 2020 17:17:47 +0000 (GMT) From: ndame Message-ID: Subject: 26.2; Restarting a *shell* buffer breaks saving history MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1223_1213870708.1582046267246" To: "bug-gnu-emacs@gnu.org" X-AccountId: 57978162 X-Originating-Ip: 178.164.166.72 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrjeekgddutdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpucfhtffggffotefknfenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffkufggtgfvihesrgdtregstddtudenucfhrhhomhepnhgurghmvgcuoegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhuqeenucfkphepudejkedrudeigedrudeiiedrjedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheppdhinhgvthepudejkedrudeigedrudeiiedrjedvpdhmrghilhhfrhhomhepvghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuhdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.227 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (emacsuser[at]freemail.hu) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) ------=_Part_1223_1213870708.1582046267246 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. =C2=A0 ------=_Part_1223_1213870708.1582046267246 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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.
  ------=_Part_1223_1213870708.1582046267246-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 08:44:58 2020 Received: (at 39667) by debbugs.gnu.org; 27 Oct 2020 12:44:58 +0000 Received: from localhost ([127.0.0.1]:43229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXOLS-0007Jc-9j for submit@debbugs.gnu.org; Tue, 27 Oct 2020 08:44:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXOLP-0007JM-QW for 39667@debbugs.gnu.org; Tue, 27 Oct 2020 08:44:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M6EZ9naA9UGxIzWwNsDiogXZ8ruraId7CDNgt5yHjvY=; b=CzyXM1PVrONrXHnZUccTK4I9Ra ErfeK1l7GpLnRMnAOEjGSOF7/mou+u/BbM5LRo8W7hZEHQXFB0qj3b9FMVATrCbiDTI3ZU6IU43w7 AOCLpKeHc7wU5ppY6Hw/3P2K43+hY/J8zXsgvxAZq2IjpAD4jnC57QPeBQu3pvemqOf4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXOLG-0007Ss-RT; Tue, 27 Oct 2020 13:44:49 +0100 From: Lars Ingebrigtsen To: ndame Subject: Re: bug#39667: 26.2; Restarting a *shell* buffer breaks saving history References: X-Now-Playing: Neil Young's _Neil Young_: "The Emperor Of Wyoming" Date: Tue, 27 Oct 2020 13:44:45 +0100 In-Reply-To: (ndame's message of "Tue, 18 Feb 2020 17:17:47 +0000 (GMT)") Message-ID: <87361zhm82.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: ndame 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 skip [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39667 Cc: 39667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ndame 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 08:45:04 2020 Received: (at control) by debbugs.gnu.org; 27 Oct 2020 12:45:04 +0000 Received: from localhost ([127.0.0.1]:43233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXOLY-0007Kd-Fv for submit@debbugs.gnu.org; Tue, 27 Oct 2020 08:45:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXOLW-0007Ja-Ug for control@debbugs.gnu.org; Tue, 27 Oct 2020 08:45:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ygho1urVZ7WW29SEWTLWrggpNDBiEE/n8enAmFpV3PE=; b=QNdjDHEctvafdOYZ6IZdWVMTAR +VmEehYQIwA5WYTGLrVex9MZPRhaXEqNRx///vLzSm41MnoUaIBW6NEOJ1P4pHOCS6hYg5i4OHjGJ lKM13HvARzSkiijSuoaZ7vtI8JUqEidzdeNUMfuNgv7pO8/Jls6IbyBeY6AxflpqNp+k=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXOLO-0007T9-R5 for control@debbugs.gnu.org; Tue, 27 Oct 2020 13:44:57 +0100 Date: Tue, 27 Oct 2020 13:44:53 +0100 Message-Id: <871rhjhm7u.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39667 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 39667 fixed close 39667 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 39667 fixed close 39667 28.1 quit From unknown Sat Jun 14 21:26:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 25 Nov 2020 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator