bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34909: 26.1; Error refreshing packages under language environment


From: Eli Zaretskii
Subject: bug#34909: 26.1; Error refreshing packages under language environment
Date: Tue, 19 Mar 2019 20:44:16 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: "E. Choroba" <choroba@matfyz.cz>,  34909@debbugs.gnu.org
> Date: Tue, 19 Mar 2019 12:27:24 -0400
> 
> > -            (progn (write-region content nil local-file nil 'silent)
> > +            (progn (let ((coding-system-for-write 'utf-8))
> > +                     (write-region content nil local-file nil 'silent))
> 
> This is probably safe, but I think the buffer should be unibyte

It isn't unibyte because no one makes it unibyte.  package.el uses
temporary buffers with no special settings, so everything is basically
determined by user locale's defaults.

> and if it isn't I think it indicates a bug elsewhere (likely in
> package--with-response-buffer tho its use in describe-package-1
> might prefer a decoded (aka multibyte) result).

Feel free to work on package--with-response-buffer in this direction.
Debugging this was a small nightmare, due to the use of macros and
async retrieval with callbacks, so I felt lucky when I finally found
the problematic code and understood why it worked in the English
language environment.  I don't feel I know enough about package.el to
make more significant changes, sorry, and as you point out, it is used
in several places in several different ways.

(I also don't understand why you say the buffer must be unibyte: if
the coding-systems for each operation are set correctly, there should
be no difference at all, not nowadays.  IME, using unibyte buffers is
just the easy way out when one doesn't want to mess with the
coding-systems stuff.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]