From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: ielm automatic saving of history -- bug 67000 Date: Sun, 13 Oct 2024 15:19:28 +0530 (IST) Message-ID: <20241013.151928.1926966009878393680.enometh@meer.net> References: <86v7xwtu3i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: simenheg@runbox.com, emacs-devel@gnu.org To: eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 13 11:50:21 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1szvEz-0006fE-3w for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Oct 2024 11:50:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szvED-0001OM-1E; Sun, 13 Oct 2024 05:49:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szvEB-0001Nu-3T for emacs-devel@gnu.org; Sun, 13 Oct 2024 05:49:31 -0400 Original-Received: from smtp7.ctinetworks.com ([205.166.61.237]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szvE9-0002rT-Ke; Sun, 13 Oct 2024 05:49:30 -0400 X-ctinetworks-Watermark: 1729676963.36124@qc6JmSeU7T8y9rqzhV9WIA X-ctinetworks-Envelope-From: enometh@meer.net X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Message-ID: 86045B18B.A504C Original-Received: from localhost (unknown [117.254.37.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp7.ctinetworks.com (Postfix) with ESMTPSA id 86045B18B; Sun, 13 Oct 2024 05:49:18 -0400 (EDT) In-Reply-To: <86v7xwtu3i.fsf@gnu.org> X-Mailer: Mew version 6.9 on Emacs 31.0.50 Received-SPF: pass client-ip=205.166.61.237; envelope-from=enometh@meer.net; helo=smtp7.ctinetworks.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324540 Archived-At: Hello, * Eli Zaretskii <86v7xwtu3i.fsf@gnu.org> Wrote on Sun, 13 Oct 2024 09:06:25 +0300 >> 2. The way to opt out of this is to set ielm-history-file-name to nil in >> user customization. In that case this code path should be avoided >> altogether. > > If you do that, comint-write-input-ring is supposed to do nothing and > return immediately. Does that not happen? It still interferes with any user customization, (e.g. the my-ielm-mode-hook in the file attached upthread) >> The "worst" problem happens when ielm buffer exits without running >> kill-buffer-hook > > How can this happen? can you show a recipe for this? (let (kill-buffer-hook (executing-kbd-macro 'kludge) buffer-file-name kill-buffer-query-functions) (kill-buffer "*ielm*")) -- used as outlined in the quoted portion below, to opt out of saving history for "this" particular ielm session. I agree it is outside the design-scope of the current implementation, but it does still hurt, -- Regards, Madhu > ( -- historically I've used this pattern to avoid >> saving history for a particular buffer, this is the way to opt out of >> saving the history) but in this case it runs from the kill-emacs-hook, >> and that forces me to choose a coding system to save the buffer. There >> is no option to opt out.