From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: package.el encoding problem
Date: Sat, 25 May 2019 08:15:52 -0400 [thread overview]
Message-ID: <jwvef4mviqd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83k1ef3ugs.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2019 09:43:15 +0300")
>> > Can you enable "Options => Enter Debugger on Quit", then reproduce the
>> > problem then hit C-g when you get the prompt?
>> > [ Or do `M-: (debug)` when you get the prompt. ]
>> Don't bother I managed to reproduce it after all. It should fixed, thanks,
> Thanks, but I don't think I understand the fix.
As you can see in the fix's assertion, the data we receive is
a unibyte string and we need to save it into a file.
We used to put it into a multibyte buffer, which then causes the save
the be all confused because the bytes 128-255 it contains aren't part of
any coding-system. We did try to circumvent this problem by specifying
`no-conversion` coding system, but I think the way we did this wasn't
quite right.
Rather than try to fix the circumvention, I decided to "do it right" and
use a unibyte buffer so the question doesn't show up.
> I thought the need for unibyte buffers was removed long ago, at least
> in the vast majority of situations.
It is definitely *possible* to use multibyte buffers even in cases where
we only manipulate bytes, but it is undesirable.
Stefan
next prev parent reply other threads:[~2019-05-25 12:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 15:18 package.el encoding problem Yuri D'Elia
2019-05-23 15:27 ` Noam Postavsky
2019-05-23 15:33 ` Yuri D'Elia
2019-05-24 15:45 ` Stefan Monnier
2019-05-24 16:36 ` Stefan Monnier
2019-05-25 6:43 ` Eli Zaretskii
2019-05-25 12:15 ` Stefan Monnier [this message]
2019-05-25 13:47 ` Eli Zaretskii
2019-05-25 14:55 ` Stefan Monnier
2019-05-25 15:03 ` Eli Zaretskii
2019-05-25 15:26 ` Stefan Monnier
2019-05-25 16:03 ` Eli Zaretskii
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=jwvef4mviqd.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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.