From: Madhu <enometh@meer.net>
To: eliz@gnu.org
Cc: arstoffel@gmail.com, simenheg@runbox.com, emacs-devel@gnu.org
Subject: Re: ielm automatic saving of history -- bug 67000
Date: Tue, 15 Oct 2024 10:16:33 +0530 (IST) [thread overview]
Message-ID: <20241015.101633.2219948655969771381.enometh@meer.net> (raw)
In-Reply-To: <86r08isrtg.fsf@gnu.org>
* 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).
next prev parent reply other threads:[~2024-10-15 4:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-13 4:17 ielm automatic saving of history -- bug 67000 Madhu
2024-10-13 6:06 ` Eli Zaretskii
2024-10-13 9:49 ` Madhu
2024-10-14 6:23 ` Augusto Stoffel
2024-10-14 14:05 ` Eli Zaretskii
2024-10-15 4:46 ` Madhu [this message]
2024-10-15 12:18 ` Eli Zaretskii
2024-10-15 17:30 ` Madhu
2024-10-15 18:23 ` Eli Zaretskii
2024-10-16 4:25 ` Madhu
2024-10-16 6:04 ` Eli Zaretskii
2024-10-16 9:03 ` Madhu
2024-10-16 18:36 ` Eli Zaretskii
2024-10-16 17:02 ` Simen Heggestøyl
2024-10-17 2:04 ` Madhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241015.101633.2219948655969771381.enometh@meer.net \
--to=enometh@meer.net \
--cc=arstoffel@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=simenheg@runbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).