From: Eli Zaretskii <eliz@gnu.org>
To: Tom Gillespie <tgbugs@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] * etc/NEWS: Announce addition of BOM to utf-8-auto
Date: Mon, 30 Jan 2023 16:16:12 +0200 [thread overview]
Message-ID: <83y1pk3y6r.fsf@gnu.org> (raw)
In-Reply-To: <CA+G3_PMTAXx70+Ta=D8fEHgHdRXY0XYhAU21vTqhy7Pbb0sP4A@mail.gmail.com> (message from Tom Gillespie on Sun, 29 Jan 2023 14:56:11 -0500)
> From: Tom Gillespie <tgbugs@gmail.com>
> Date: Sun, 29 Jan 2023 14:56:11 -0500
> Cc: emacs-devel@gnu.org
>
> > Encoding with 'utf-8-auto' now correctly produces a byte order mark.
>
> Much better.
>
> > Maybe (you assume that people really read all the small print in
> > NEWS?). But first, could you explain why on earth are you using
> > utf-8-auto _on_encoding_? It basically makes no sense at all.
>
> Hah, no, I don't think many people do, but maybe the maintainers
> of some of the more widely used packages might?
I'll dwell on this.
> If I had to guess this issue is probably the result of people
> copying what is done in async.el where there is a comment
> that reads:
>
> ;; FIXME: Why use `utf-8-auto' instead of `utf-8-unix'? This is
> ;; a communication channel over which we have complete control,
> ;; so we get to choose exactly which encoding and EOL we use, isn't it?
>
> https://github.com/jwiegley/emacs-async/blob/270c3d0bd99386dd9a8538990401993a6a3cb1bc/async.el#L201-L203
>
> Which suggests that your account of the confusion is exactly the issue.
>
> However there is also a comment about it somehow mitigating issues
> with strings that have EOFs in them?? Is this even true?
>
> ;; Just in case the string we're sending might contain EOF
> (encode-coding-region (point-min) (point-max) 'utf-8-auto)
> https://github.com/jwiegley/emacs-async/blob/270c3d0bd99386dd9a8538990401993a6a3cb1bc/async.el#L222-L223
I think both of these are mistakes of the kind I described. I filed
an issue with emacs-async, but someone should probably fix the one we
have in ELPA. Stefan?
next prev parent reply other threads:[~2023-01-30 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 17:58 [PATCH] * etc/NEWS: Announce addition of BOM to utf-8-auto Tom Gillespie
2023-01-29 18:14 ` Andreas Schwab
2023-01-29 18:29 ` Eli Zaretskii
2023-01-29 19:11 ` Tom Gillespie
2023-01-29 19:38 ` Eli Zaretskii
2023-01-29 19:56 ` Tom Gillespie
2023-01-30 14:16 ` Eli Zaretskii [this message]
2023-01-30 15:06 ` Stefan Monnier
2023-01-30 17:12 ` Eli Zaretskii
2023-02-02 10:36 ` Eli Zaretskii
2023-02-02 17:56 ` Tom Gillespie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y1pk3y6r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tgbugs@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.