[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 23:00:11 +0530 (IST) |
* Eli Zaretskii <eliz@gnu.org> <864j5dsgot.fsf@gnu.org>
Wrote on Tue, 15 Oct 2024 15:18:10 +0300
>> Date: Tue, 15 Oct 2024 10:16:33 +0530 (IST)
>> From: Madhu <enometh@meer.net>
[re: savehist for ielm history]
>> 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).
>
> The problem, AFAIU, is not the specification of the encoding when the
> file is written, the problem is to select the right encoding to begin
> with. utf-8-emacs-unix is how characters are represented in Emacs
> internally, so it by definition can encode any character in the
> history; this is not true for any other encoding. I believe this
> issue was what prevented you from existing Emacs, the issue you
> described in your original post. Apologies if I misunderstood.
The point I wanted to make was that savehist-save binds
coding-system-for-write (to 'utf-8-unix) and this seems to work
without throwing a "coding system error".
my ~/.ielm-history (which gets read into comint-input-ring) has this
line (but with raw characters)
```
(rfc2047-encode-string "foo \303\200 bar")
```
(funcall ielm--exit) in the ielm buffer causes the coding system warning:
"These default coding systems were tried to encode the
following[...].. utf-8-unix"
However
```
(let ((coding-system-for-write 'utf-8-unix)) (funcall ielm--exit))
```
saves the history according to the code in ielm--exit without the
coding system error.
but coding-system-for-write is still 'utf-8-unix and not
'utf-8-emacs-unix so I think I still need an explanation, please.
(Also I think I forgot to mention the code in ielm-mode presently sets
kill-buffer-hook to a function rather than adding the function to the
hook variable)
- ielm automatic saving of history -- bug 67000, Madhu, 2024/10/13
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/13
- Re: ielm automatic saving of history -- bug 67000, Madhu, 2024/10/13
- Re: ielm automatic saving of history -- bug 67000, Augusto Stoffel, 2024/10/14
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/14
- Re: ielm automatic saving of history -- bug 67000, Madhu, 2024/10/15
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/15
- Re: ielm automatic saving of history -- bug 67000,
Madhu <=
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/15
- Re: ielm automatic saving of history -- bug 67000, Madhu, 2024/10/16
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/16
- Re: ielm automatic saving of history -- bug 67000, Madhu, 2024/10/16
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/16
- Re: ielm automatic saving of history -- bug 67000, Madhu, 2024/10/31
- Re: ielm automatic saving of history -- bug 67000, Eli Zaretskii, 2024/10/31
Re: ielm automatic saving of history -- bug 67000, Simen Heggestøyl, 2024/10/16