unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 34909@debbugs.gnu.org, choroba@matfyz.cz
Subject: bug#34909: 26.1; Error refreshing packages under language environment
Date: Tue, 19 Mar 2019 22:00:36 +0200	[thread overview]
Message-ID: <83h8bytz17.fsf@gnu.org> (raw)
In-Reply-To: <jwva7hqu061.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 19 Mar 2019 15:41:27 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> 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.





      reply	other threads:[~2019-03-19 20:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 21:32 bug#34909: 26.1; Error refreshing packages under language environment E. Choroba
2019-03-19 11:23 ` Eli Zaretskii
2019-03-19 11:57   ` E. Choroba
2019-03-19 12:29     ` Eli Zaretskii
2019-03-19 13:06       ` E. Choroba
2019-03-19 14:32         ` Eli Zaretskii
2019-03-19 14:43           ` Eli Zaretskii
2019-03-19 15:49             ` E. Choroba
2019-03-19 18:34               ` Eli Zaretskii
2019-03-20  7:00                 ` Eli Zaretskii
2022-04-12 16:40                   ` Lars Ingebrigtsen
2022-04-12 22:52                     ` E. Choroba
2022-04-12 23:27                       ` Lars Ingebrigtsen
2019-03-20 12:45               ` Noam Postavsky
2019-03-20 13:09                 ` Eli Zaretskii
2019-03-19 16:27   ` Stefan Monnier
2019-03-19 18:44     ` Eli Zaretskii
2019-03-19 19:41       ` Stefan Monnier
2019-03-19 20:00         ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h8bytz17.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34909@debbugs.gnu.org \
    --cc=choroba@matfyz.cz \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).