emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ielm automatic saving of history -- bug 67000


From: Madhu
Subject: Re: ielm automatic saving of history -- bug 67000
Date: Tue, 15 Oct 2024 10:16:33 +0530 (IST)

*  Eli Zaretskii <eliz@gnu.org> <86r08isrtg.fsf@gnu.org>
Wrote on Mon, 14 Oct 2024 17:05:31 +0300
>> From: Augusto Stoffel <arstoffel@gmail.com>
>> Cc: Madhu <enometh@meer.net>,  Simen Heggestøyl
>>  <simenheg@runbox.com>,
>>   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.

I think that part is covered. if you see the top of ~/.emacs.d/history
the coding system is specified, the savehist-coding-system mechanism
takes care of this to you.  But I haven't tried this idea out yet (to
see the interactions with comint).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]