From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: ielm automatic saving of history -- bug 67000 Date: Mon, 14 Oct 2024 17:05:31 +0300 Message-ID: <86r08isrtg.fsf@gnu.org> References: <86v7xwtu3i.fsf@gnu.org> <878qurkxte.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23275"; mail-complaints-to="usenet@ciao.gmane.io" Cc: enometh@meer.net, simenheg@runbox.com, emacs-devel@gnu.org To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 14 16:06:43 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 1t0Lid-0005vs-JY for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Oct 2024 16:06:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0Lhl-0005d6-77; Mon, 14 Oct 2024 10:05:49 -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 1t0Lhi-0005cm-Tw for emacs-devel@gnu.org; Mon, 14 Oct 2024 10:05:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0Lhh-0007mO-Oh; Mon, 14 Oct 2024 10:05:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=q1QWUkydqsWGJWG/qU8JEhjjRcQO8DgzzUXMbtlb9XE=; b=NBcy7jkTlTFdUJplCsrK VdEsxCsYRWiXBcR7FUNsmt/ploG+vSykzbXWg+IybmQj3puf5WBz1+lBfqIvHLWmoj/vrGLK70Gph pqK9emeZxL86y8Cko3lgw043v98jzVknxScpmImAzlcGBqvRpEvCJCo7nsHanGVFL4jvAY3a1IKJH 7/I05U0Kn7B8Pr9+yoJYyg2IeRjtqcku2f+GWzPouAqmwFIVp8JZEFnc84DJabSdlrCJ02h7nxpiF P9IRDi0cJpKLuPrJ1+duP03qfpeNnSmNmCobMGLhTiUm98G+dz/E06muK0vz+WRgFq8uBwbmsOPaz iT4DdwQ0Tc07IQ==; In-Reply-To: <878qurkxte.fsf@gmail.com> (message from Augusto Stoffel on Mon, 14 Oct 2024 08:23:09 +0200) 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:324569 Archived-At: > From: Augusto Stoffel > Cc: Madhu , Simen Heggestøyl > , > emacs-devel@gnu.org > Date: Mon, 14 Oct 2024 08:23:09 +0200 > > I have a different suggestion. I think IELM should use savehist-mode to > preserve its history. > > When loading ielm.el: > > (cl-pushnew 'ielm-history savehist-minibuffer-history-variables) > > When starting an IELM buffer: > > (setq comint-input-ring (make-ring comint-input-ring-size)) > (dolist (cmd (take comint-input-ring-size ielm-history)) > (ring-insert-at-beginning comint-input-ring cmd)) > > After each evaluation: > > (add-to-history 'ielm-history code comint-input-ring-size) This addresses only some of the issues brought up by Madhu. For example, the main bug, the one with encoding the saved history, is not addressed, AFAIU.