[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ielm automatic saving of history -- bug 67000
From: |
Eli Zaretskii |
Subject: |
Re: ielm automatic saving of history -- bug 67000 |
Date: |
Wed, 16 Oct 2024 09:04:51 +0300 |
> Date: Wed, 16 Oct 2024 09:55:42 +0530 (IST)
> Cc: emacs-devel@gnu.org
> From: Madhu <enometh@meer.net>
>
> >> (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.
> >
> > And loses some of those bytes as part of that. This is exactly why I
> > suggest to use utf-8-emacs-unix.
>
> In this case there was no loss of bytes.
There was, trust me.
> Apparently using utf-8-unix
> is sufficient to encode the contents of the buffer beings saved
> without any loss of data.
It is not. It can only safely encode characters that are inside the
Unicode codepoint space, and raw bytes are outside that range.
> The file written is identical to the file which was read.
I don't understand what you mean. AFAIU, IELM history records what
you typed, so what file was read here?
> I think the question I wanted to ask was: does specifying
> coding-system-for-write (to any non-nil acceptable value)
> unconditionally suppress the "coding system warning" error?
No. It is only sufficient if Emacs has some way of dealing with the
characters which prompted the coding system warning in the first
place. That is not always the case.
> from your
> response above I think the answer is: "yes, but it may clobber it".
It might clobber them, but in some cases it will actually be unable to
do even that.
> The second issue is that the coding system warning which is printed
> when emacs prompts for a suitable coding system isn't entire accurate.
> it says the default coding system which was tried, to encode ".." is
> utf-8-unix and cannot encode these characters etc. but if it is
> sufficient, and if i type utf-8-unix into the prompt, the file is
> encoded and saved.
See above: it means cannot encode safely.
- 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, 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, 2024/10/16
- Re: ielm automatic saving of history -- bug 67000,
Eli Zaretskii <=
- 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