From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34909: 26.1; Error refreshing packages under language environment Date: Tue, 19 Mar 2019 22:00:36 +0200 Message-ID: <83h8bytz17.fsf@gnu.org> References: <83zhprt8eo.fsf@gnu.org> <83mulqu2kf.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58167"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34909@debbugs.gnu.org, choroba@matfyz.cz To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 21:12:42 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6L6I-000EzD-42 for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 21:12:42 +0100 Original-Received: from localhost ([127.0.0.1]:34281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6L6H-0004ee-0V for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 16:12:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6L60-0004aB-Lx for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 16:12:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Kvz-00050i-7f for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 16:02:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6Kvy-00050V-SH for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 16:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h6Kvy-0001jO-Ju for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 16:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Mar 2019 20:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34909 X-GNU-PR-Package: emacs Original-Received: via spool by 34909-submit@debbugs.gnu.org id=B34909.15530256656573 (code B ref 34909); Tue, 19 Mar 2019 20:02:02 +0000 Original-Received: (at 34909) by debbugs.gnu.org; 19 Mar 2019 20:01:05 +0000 Original-Received: from localhost ([127.0.0.1]:50883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6Kv2-0001hw-S4 for submit@debbugs.gnu.org; Tue, 19 Mar 2019 16:01:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6Kv0-0001hJ-9W for 34909@debbugs.gnu.org; Tue, 19 Mar 2019 16:01:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Kur-0003q5-VG; Tue, 19 Mar 2019 16:00:54 -0400 Original-Received: from [176.228.60.248] (port=1443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h6Kuk-0006X8-RP; Tue, 19 Mar 2019 16:00:48 -0400 In-reply-to: (message from Stefan Monnier on Tue, 19 Mar 2019 15:41:27 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156514 Archived-At: > From: Stefan Monnier > Cc: choroba@matfyz.cz, 34909@debbugs.gnu.org > Date: Tue, 19 Mar 2019 15:41:27 -0400 > > > (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.) > > Of course, when dealing with data we only transfer from network to file, > using unibyte (or more specifically: without decoding nor encoding) is > simply more efficient, but it's also safer: Encoding using utf-8 is only > safe if the decoding was itself done using the same coding system and > I don't see where we do that, so it's not clear that it's always decoded > with utf-8. Did you also look in url-*.el stuff, which package.el invokes? My motivation to use UTF-8 instead of making the buffer unibyte was that select-safe-coding-system popped up a buffer which clearly showed characters, not raw bytes, and it offered to select UTF-8, not raw-text. This can mean only one thing: that text in the buffer is already correctly represented, and the problem was with an attempt to encode it using a coding-system which cannot handle some of the text (specifically, Chinese characters and a few Latin characters not supported by ISO 8859-2). > > 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. > > "nightmare" is very appropriate, indeed. I will just add that the wider becomes our use of sophisticated Lisp techniques in core packages, the harder it will be to debug our own code. I really wish someone would start some serious work on expanding our debugging facilities and making them adequate for debugging the kind of code we see in package.el. 'Nough said.