From unknown Wed Jun 18 00:25:30 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75065 <75065@debbugs.gnu.org> To: bug#75065 <75065@debbugs.gnu.org> Subject: Status: Upon archive download failure print the original error Reply-To: bug#75065 <75065@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:25:30 +0000 retitle 75065 Upon archive download failure print the original error reassign 75065 emacs submitter 75065 Konstantin Kharlamov severity 75065 normal tag 75065 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 10:25:46 2024 Received: (at submit) by debbugs.gnu.org; 24 Dec 2024 15:25:46 +0000 Received: from localhost ([127.0.0.1]:33462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ6n3-0006sD-VQ for submit@debbugs.gnu.org; Tue, 24 Dec 2024 10:25:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:41832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ6n0-0006s4-Ie for submit@debbugs.gnu.org; Tue, 24 Dec 2024 10:25:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ6n0-0003OA-1A for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:25:42 -0500 Received: from forward400a.mail.yandex.net ([178.154.239.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ6mw-0004yT-2f for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:25:41 -0500 Received: from mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:579e:0:640:4778:0]) by forward400a.mail.yandex.net (Yandex) with ESMTPS id 48FA5646E5 for ; Tue, 24 Dec 2024 18:25:31 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id UPZvtw4OfmI0-aikTseph; Tue, 24 Dec 2024 18:25:30 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735053930; bh=4Ikg26riyP0be7VacDU1R5LcAlMyf9cLwZ87NZtRyfc=; h=Date:To:From:Subject:Message-ID; b=ZOUvfXN8+Nr/wrnGzdXv5OQufKL1ZHfuGMwxoJ80tUgaO3ZmCzpyCFpk98JgYOt1a EgE6Qx7Zr2gh+rCOQNpSSzKGpmgeNokKcrfbL8d2OVE6Krq7MA/DMnLfgBlJbD7IRv 8Q1XlQihhdKQa46rCFT4agfH25CRlGg8IIwuOB4Q= Authentication-Results: mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> Subject: Upon archive download failure print the original error From: Konstantin Kharlamov To: bug-gnu-emacs@gnu.org Date: Tue, 24 Dec 2024 18:25:30 +0300 Content-Type: multipart/mixed; boundary="=-JjJpO7rp5UbVLAfyyvCc" User-Agent: Evolution 3.54.2 MIME-Version: 1.0 Received-SPF: pass client-ip=178.154.239.95; envelope-from=Hi-Angel@yandex.ru; helo=forward400a.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-JjJpO7rp5UbVLAfyyvCc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was recently helping out a new Emacs user with package installation=C2=B9= , and I found an interesting thing: if you put to `package-archives` a URL without `https` prefix, download will fail. Long story short, the reason turns out that `package-archives` also supports local paths, which the URL being considered as. However, Emacs never prints a message about that, even though such message exists in the code. Instead it just says that download failed, leaving a user wondering why. That happens because (package--download-and-read-archives) ignores the exception message, and always just prints generic failure message. This code fixes this, so now the actual failure message will be correctly shown. 1: https://emacs.stackexchange.com/questions/82828/is-installing-deadgrep-fron= -melpa-still-possible/82829#82829 --=-JjJpO7rp5UbVLAfyyvCc Content-Disposition: attachment; filename="1.patch" Content-Type: text/x-patch; name="1.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBmYjQ2ODUyMzg3MjZhNzk1OTlmNjM4ODMxODkxNmQyOTYyZGE5M2FlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGluIEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4 LnJ1PgpEYXRlOiBUdWUsIDI0IERlYyAyMDI0IDE4OjE2OjQxICswMzAwClN1YmplY3Q6IFtQQVRD SF0gVXBvbiBhcmNoaXZlIGRvd25sb2FkIGZhaWx1cmUgcHJpbnQgdGhlIG9yaWdpbmFsIGVycm9y CgoqIGxpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsIChwYWNrYWdlLS1kb3dubG9hZC1hbmQtcmVh ZC1hcmNoaXZlcyk6CnVwb24gY2F0Y2hpbmcgZXhjZXB0aW9uLCB1c2UgdGhlIGV4Y2VwdGlvbiBt ZXNzYWdlIGFzIHBhcnQgb2YgdGhlCmVycm9yIHRvIHByb3ZpZGUgbW9yZSBjb250ZXh0IGFib3V0 IHRoZSBmYWlsdXJlLgotLS0KIGxpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsIHwgNiArKystLS0K IDEgZmlsZSBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyksIDMgZGVsZXRpb25zKC0pCgpkaWZmIC0t Z2l0IGEvbGlzcC9lbWFjcy1saXNwL3BhY2thZ2UuZWwgYi9saXNwL2VtYWNzLWxpc3AvcGFja2Fn ZS5lbAppbmRleCA1Zjc4NTA3MWVhMy4uY2I4MWVmYzcxZjAgMTAwNjQ0Ci0tLSBhL2xpc3AvZW1h Y3MtbGlzcC9wYWNrYWdlLmVsCisrKyBiL2xpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCkBAIC0x ODI5LDEwICsxODI5LDEwIEBAIFBvcHVsYXRlIGBwYWNrYWdlLWFyY2hpdmUtY29udGVudHMnIHdp dGggdGhlIHJlc3VsdC4KIElmIG9wdGlvbmFsIGFyZ3VtZW50IEFTWU5DIGlzIG5vbi1uaWwsIHBl cmZvcm0gdGhlIGRvd25sb2FkcwogYXN5bmNocm9ub3VzbHkuIgogICAoZG9saXN0IChhcmNoaXZl IHBhY2thZ2UtYXJjaGl2ZXMpCi0gICAgKGNvbmRpdGlvbi1jYXNlLXVubGVzcy1kZWJ1ZyBuaWwK KyAgICAoY29uZGl0aW9uLWNhc2UtdW5sZXNzLWRlYnVnIGVycgogICAgICAgICAocGFja2FnZS0t ZG93bmxvYWQtb25lLWFyY2hpdmUgYXJjaGl2ZSAiYXJjaGl2ZS1jb250ZW50cyIgYXN5bmMpCi0g ICAgICAoZXJyb3IgKG1lc3NhZ2UgIkZhaWxlZCB0byBkb3dubG9hZCBgJXMnIGFyY2hpdmUuIgot ICAgICAgICAgICAgICAgKGNhciBhcmNoaXZlKSkpKSkpCisgICAgICAoZXJyb3IgKG1lc3NhZ2Ug IkZhaWxlZCB0byBkb3dubG9hZCBgJXMnIGFyY2hpdmUuIEVycm9yOiAlUyIKKyAgICAgICAgICAg ICAgIChjYXIgYXJjaGl2ZSkgKGNkciBlcnIpKSkpKSkKIAogKGRlZnZhciBwYWNrYWdlLXJlZnJl c2gtY29udGVudHMtaG9vayAobGlzdCAjJ3BhY2thZ2UtLWRvd25sb2FkLWFuZC1yZWFkLWFyY2hp dmVzKQogICAiTGlzdCBvZiBmdW5jdGlvbnMgdG8gY2FsbCB0byByZWZyZXNoIHRoZSBwYWNrYWdl IGFyY2hpdmUuCi0tIAoyLjQ3LjEKCg== --=-JjJpO7rp5UbVLAfyyvCc-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 25 09:44:22 2024 Received: (at control) by debbugs.gnu.org; 25 Dec 2024 14:44:22 +0000 Received: from localhost ([127.0.0.1]:36725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQScY-0007z8-4p for submit@debbugs.gnu.org; Wed, 25 Dec 2024 09:44:22 -0500 Received: from mail-ed1-f46.google.com ([209.85.208.46]:61845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQScV-0007yy-9p for control@debbugs.gnu.org; Wed, 25 Dec 2024 09:44:19 -0500 Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5d3d0205bd5so8039746a12.3 for ; Wed, 25 Dec 2024 06:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735137799; x=1735742599; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=pO2BV86Ods0siPGGDOaTbZGR0uGhhBYXf9Qkye4i40A=; b=evEplNqt+GafgFEXS/g2B9dQ3RMCOVc0FVOYPIKRO7X57tSFqQFF0nSnLwUaoxv57+ yzLs+JkqknBjwkDRR+M6wuVNvbjyqOcv+n24iIbCoaw7QslfPsHEu+8TNElozxd0uVxQ m8Ngz4GQdymi3t+8Q2rKyeOxpxhoPsWgdVqah4JL3NthexN5Rjk8oVEyTkWVPaEWHoty g9prqpYkQTGXmOyQy5RWo/xmBX7ZHCpmtn6nDbV1ANZNco4jQOsgV9TLI3Rs7bkfr/mX UVFmERjwozdFt/zUr/b3cYTVYOUCwQFViS69Br1gRwPeZPAynMt6jDgprVZGz0I9Qi5s RIHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735137799; x=1735742599; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pO2BV86Ods0siPGGDOaTbZGR0uGhhBYXf9Qkye4i40A=; b=b0AwS2gZ/4vDznCM3YPjnv3LTMEUvu53Rnhm48dsxz/u6MP+Sj0nXWOiQBq8pxJZCn Ez7Zk/+dSdHbiEbqArAlV3RpZyZ0fm1C1AuYE/YJvybPYlpCHXPG5qO3UVD2hJ/d0U0T 4rz/YGIG4B0Jm1tg/qLpQH7pIH/a0ep2yU5oaGilcLev0WuWmPZjqMeg8V9Vjt6xC2Ks 3ZUdLxw8gt5coPraZKAziAFh6wf7jBJoWpRY1+b58i+0Wb3wjVFayFAuf9HcLqvrfI25 Rt+HSLQYwtnsKs8qx+RUXOmhwjGsYylISyTiQ5S0a7yCN+7VCHaDI2Nzb8cBIP/U3PKA RDGw== X-Gm-Message-State: AOJu0YxidwuJ/AGtRN7B8i1jm3WfLlsj8lasXJijBMd/CyGsf7T8vmYZ 8Er0WUFXewH5oKgXa9shhTAuldn7bA6f5tmH3rD0W/yZnmSscWESeg4iZN2r176NW2MSbTK+SRe xumoLgadYL0IAQJ2MZ1tTMJdsUs89udZe X-Gm-Gg: ASbGncsdTks2OcTH28l+95/fPw2uS3AEiJ+fnOxwwq6H15KMUrJt41cEgWWEIO0uJT7 xL4begGy1nXSzjfSsvYYwmR7IG3rAezuXEU6KlGTo X-Google-Smtp-Source: AGHT+IEcEaHCWYIpmEx3W6INohBZD8Wy65yqxTq1ja2uh2c7fZ52Bl/XvDgyqiqxFxls3h4/oCley/g/7597lNc0+9g= X-Received: by 2002:a05:6402:5207:b0:5d0:bcdd:ff8f with SMTP id 4fb4d7f45d1cf-5d81dd5ed91mr17803088a12.4.1735137798459; Wed, 25 Dec 2024 06:43:18 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 25 Dec 2024 14:43:18 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 25 Dec 2024 14:43:18 +0000 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 75065 + patch thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.46 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.46 listed in bl.score.senderscore.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.46 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.46 listed in wl.mailspike.net] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 75065 + patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 03:55:33 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 08:55:34 +0000 Received: from localhost ([127.0.0.1]:40048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjeX-0001vj-G1 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 03:55:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjeW-0001vK-4A for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 03:55:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQjeQ-0003kH-1L; Thu, 26 Dec 2024 03:55:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Hq3ZP9U+6zSph9DFpegcYLfOOdkWaCS4Tet+Zb35Ae8=; b=hojD+RbDUusBBkySesw0 zhY81fiAwz0hzD0lir7MBlcM/xr0C8S9j7kid4Qr92Raeqq+T81tpL9aOtEe9TNhsH0vVWG3vaoR0 3l5Om6GcPD1jt+sW4X6PDhIfyXVSqJfgFY8+LCKohFYycf8Xeg4NjakfFCmFw+4dSAgk7ROCDXIzX bH84tjk63XKROYKvZa5Ps06MXHqj1A2r8l7BONq02D5uN1vX9Kbo8n++/dpgINUA5tZOvjGzwWKMy anLKfKaoJbDzx2kbKy8MxGguj1LQQMXzcqQ4bKJ5zzfJwUKXSznn6mPXVREFDHbFjSfHQp2S/ohaE bJ6DqfGa4i0f5w==; Date: Thu, 26 Dec 2024 10:55:21 +0200 Message-Id: <867c7mzuva.fsf@gnu.org> From: Eli Zaretskii To: Konstantin Kharlamov , Philip Kaludercic , Stefan Monnier In-Reply-To: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> (message from Konstantin Kharlamov on Tue, 24 Dec 2024 18:25:30 +0300) Subject: Re: bug#75065: Upon archive download failure print the original error References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Konstantin Kharlamov > Date: Tue, 24 Dec 2024 18:25:30 +0300 > > I was recently helping out a new Emacs user with package installation¹, > and I found an interesting thing: if you put to `package-archives` a > URL without `https` prefix, download will fail. Long story short, the > reason turns out that `package-archives` also supports local paths, > which the URL being considered as. However, Emacs never prints a > message about that, even though such message exists in the code. > Instead it just says that download failed, leaving a user wondering > why. > > That happens because (package--download-and-read-archives) ignores the > exception message, and always just prints generic failure message. > > This code fixes this, so now the actual failure message will be > correctly shown. > > 1: > https://emacs.stackexchange.com/questions/82828/is-installing-deadgrep-fron-melpa-still-possible/82829#82829 > > > From fb4685238726a79599f6388318916d2962da93ae Mon Sep 17 00:00:00 2001 > From: Konstantin Kharlamov > Date: Tue, 24 Dec 2024 18:16:41 +0300 > Subject: [PATCH] Upon archive download failure print the original error > > * lisp/emacs-lisp/package.el (package--download-and-read-archives): > upon catching exception, use the exception message as part of the > error to provide more context about the failure. > --- > lisp/emacs-lisp/package.el | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 5f785071ea3..cb81efc71f0 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -1829,10 +1829,10 @@ Populate `package-archive-contents' with the result. > If optional argument ASYNC is non-nil, perform the downloads > asynchronously." > (dolist (archive package-archives) > - (condition-case-unless-debug nil > + (condition-case-unless-debug err > (package--download-one-archive archive "archive-contents" async) > - (error (message "Failed to download `%s' archive." > - (car archive)))))) > + (error (message "Failed to download `%s' archive. Error: %S" > + (car archive) (cdr err)))))) > > (defvar package-refresh-contents-hook (list #'package--download-and-read-archives) > "List of functions to call to refresh the package archive. > -- > 2.47.1 Thanks. Stefan and Philip, is this okay to install? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 13:13:15 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 18:13:15 +0000 Received: from localhost ([127.0.0.1]:42142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQsME-0002bx-Lr for submit@debbugs.gnu.org; Thu, 26 Dec 2024 13:13:15 -0500 Received: from mout01.posteo.de ([185.67.36.65]:35495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQsMA-0002bh-DB for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 13:13:13 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2DBEA240027 for <75065@debbugs.gnu.org>; Thu, 26 Dec 2024 19:13:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735236784; bh=T1nd1mHdGmrRiTIzbzle4Q2VtsaBco9oONGT+Z29+K0=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=VCATvstv65fSg1LdbZs34qEshseeOHg9tRbH48gKLV/7a3DrB3xWvOt1WKqxOX7rC 9jr7jpsA2ujhQPE6C4WwkNfiPFULNLg9qtDjNKbXOrvCqlZ0dYxC70yPnEuec9SN/j RI3VlLP4Y7qYvYDXFDumLqvnnNNBZmINal6lcj7rza7qJG2qIjeanbOWK1BeWk1ALI sbeXSx5lYa5fsVdTxGae6gBPEsMNM1tNaPkjyLRYgETA/L8k3gGexpjZMfzB1yN63M hkH1CPDAbubuTUwaEdp62ajBdaf44f52LItwEhn5KQDGQcq02HHCGqV+IxCbOboylv OYy8fkmtR5Frg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YJxZ50jrWz6tvk; Thu, 26 Dec 2024 19:13:00 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: <867c7mzuva.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Dec 2024 10:55:21 +0200") References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 26 Dec 2024 18:13:00 +0000 Message-ID: <87bjwytis3.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Stefan Monnier , Konstantin Kharlamov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Konstantin Kharlamov >> Date: Tue, 24 Dec 2024 18:25:30 +0300 >>=20 >> I was recently helping out a new Emacs user with package installation=C2= =B9, >> and I found an interesting thing: if you put to `package-archives` a >> URL without `https` prefix, download will fail. Long story short, the >> reason turns out that `package-archives` also supports local paths, >> which the URL being considered as. However, Emacs never prints a >> message about that, even though such message exists in the code. >> Instead it just says that download failed, leaving a user wondering >> why. >>=20 >> That happens because (package--download-and-read-archives) ignores the >> exception message, and always just prints generic failure message. >>=20 >> This code fixes this, so now the actual failure message will be >> correctly shown. >>=20 >> 1: >> https://emacs.stackexchange.com/questions/82828/is-installing-deadgrep-f= ron-melpa-still-possible/82829#82829 >>=20 >>=20 >> From fb4685238726a79599f6388318916d2962da93ae Mon Sep 17 00:00:00 2001 >> From: Konstantin Kharlamov >> Date: Tue, 24 Dec 2024 18:16:41 +0300 >> Subject: [PATCH] Upon archive download failure print the original error >>=20 >> * lisp/emacs-lisp/package.el (package--download-and-read-archives): >> upon catching exception, use the exception message as part of the >> error to provide more context about the failure. >> --- >> lisp/emacs-lisp/package.el | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >>=20 >> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el >> index 5f785071ea3..cb81efc71f0 100644 >> --- a/lisp/emacs-lisp/package.el >> +++ b/lisp/emacs-lisp/package.el >> @@ -1829,10 +1829,10 @@ Populate `package-archive-contents' with the res= ult. >> If optional argument ASYNC is non-nil, perform the downloads >> asynchronously." >> (dolist (archive package-archives) >> - (condition-case-unless-debug nil >> + (condition-case-unless-debug err >> (package--download-one-archive archive "archive-contents" async) >> - (error (message "Failed to download `%s' archive." >> - (car archive)))))) >> + (error (message "Failed to download `%s' archive. Error: %S" >> + (car archive) (cdr err)))))) >>=20=20 >> (defvar package-refresh-contents-hook (list #'package--download-and-rea= d-archives) >> "List of functions to call to refresh the package archive. >> --=20 >> 2.47.1 > > Thanks. > > Stefan and Philip, is this okay to install? It seems harmless, I am just uncertain if we should prefer %S or %s to format the error message. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 13:17:23 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 18:17:23 +0000 Received: from localhost ([127.0.0.1]:42150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQsQE-0002oH-Fq for submit@debbugs.gnu.org; Thu, 26 Dec 2024 13:17:22 -0500 Received: from forward502d.mail.yandex.net ([178.154.239.210]:33146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQsQB-0002o2-G0 for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 13:17:20 -0500 Received: from mail-nwsmtp-smtp-production-main-42.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-42.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:55a0:0:640:1286:0]) by forward502d.mail.yandex.net (Yandex) with ESMTPS id E98776151A; Thu, 26 Dec 2024 21:17:02 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-42.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 0HeYaCXOjKo0-ebig3Ftt; Thu, 26 Dec 2024 21:17:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735237022; bh=rseET+L0SpaMPN4jNMgCKHspF/BBq7d5KmcIt7vzaCI=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=VkKeQUgFvO6HcYl4fzq4DPtRew23xIez1Vw9CFl+aH1nrXM2hySuNzanYCiI+hQZY 0C0Eajx8W8zJUgm5LMlqU/Abuqv0Mvm6hgrGHWNSzO35Q142SQEXISxiLOJ9GHqV4L 7BheeArtsvj7VaIDcBOwlyPp5YgW9FZt+DJA6ZPw= Authentication-Results: mail-nwsmtp-smtp-production-main-42.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <737bc5fd466e36c1a52753d0ce429ad57086c37d.camel@yandex.ru> Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Philip Kaludercic , Eli Zaretskii Date: Thu, 26 Dec 2024 21:17:00 +0300 In-Reply-To: <87bjwytis3.fsf@posteo.net> References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, 2024-12-26 at 18:13 +0000, Philip Kaludercic wrote: > Eli Zaretskii writes: >=20 > > > From: Konstantin Kharlamov > > > Date: Tue, 24 Dec 2024 18:25:30 +0300 > > >=20 > > > I was recently helping out a new Emacs user with package > > > installation=C2=B9, > > > and I found an interesting thing: if you put to `package- > > > archives` a > > > URL without `https` prefix, download will fail. Long story short, > > > the > > > reason turns out that `package-archives` also supports local > > > paths, > > > which the URL being considered as. However, Emacs never prints a > > > message about that, even though such message exists in the code. > > > Instead it just says that download failed, leaving a user > > > wondering > > > why. > > >=20 > > > That happens because (package--download-and-read-archives) > > > ignores the > > > exception message, and always just prints generic failure > > > message. > > >=20 > > > This code fixes this, so now the actual failure message will be > > > correctly shown. > > >=20 > > > 1: > > > https://emacs.stackexchange.com/questions/82828/is-installing-deadgre= p-fron-melpa-still-possible/82829#82829 > > >=20 > > >=20 > > > From fb4685238726a79599f6388318916d2962da93ae Mon Sep 17 00:00:00 > > > 2001 > > > From: Konstantin Kharlamov > > > Date: Tue, 24 Dec 2024 18:16:41 +0300 > > > Subject: [PATCH] Upon archive download failure print the original > > > error > > >=20 > > > * lisp/emacs-lisp/package.el (package--download-and-read- > > > archives): > > > upon catching exception, use the exception message as part of the > > > error to provide more context about the failure. > > > --- > > > =C2=A0lisp/emacs-lisp/package.el | 6 +++--- > > > =C2=A01 file changed, 3 insertions(+), 3 deletions(-) > > >=20 > > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs- > > > lisp/package.el > > > index 5f785071ea3..cb81efc71f0 100644 > > > --- a/lisp/emacs-lisp/package.el > > > +++ b/lisp/emacs-lisp/package.el > > > @@ -1829,10 +1829,10 @@ Populate `package-archive-contents' with > > > the result. > > > =C2=A0If optional argument ASYNC is non-nil, perform the downloads > > > =C2=A0asynchronously." > > > =C2=A0=C2=A0 (dolist (archive package-archives) > > > -=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug nil > > > +=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug err > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package--download-o= ne-archive archive "archive- > > > contents" async) > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download `= %s' archive." > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive)))))) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download `= %s' archive. Error: > > > %S" > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive) (cdr err)))))) > > > =C2=A0 > > > =C2=A0(defvar package-refresh-contents-hook (list #'package--download= - > > > and-read-archives) > > > =C2=A0=C2=A0 "List of functions to call to refresh the package archiv= e. > > > --=20 > > > 2.47.1 > >=20 > > Thanks. > >=20 > > Stefan and Philip, is this okay to install? >=20 > It seems harmless, I am just uncertain if we should prefer %S or %s > to > format the error message. The reason I used %S is that 2x lines below there's similar construction with (error =E2=80=A6) and it's using %S, so the usage here go= es in line with the other code. That said, I have no preference, I can change it to %s, even in both locations if you want. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 13:31:53 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 18:31:54 +0000 Received: from localhost ([127.0.0.1]:42173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQseH-0003SK-BN for submit@debbugs.gnu.org; Thu, 26 Dec 2024 13:31:53 -0500 Received: from mout01.posteo.de ([185.67.36.65]:48841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQseD-0003S4-Qa for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 13:31:52 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 19BD5240027 for <75065@debbugs.gnu.org>; Thu, 26 Dec 2024 19:31:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735237903; bh=3AViChcXMsPOkQkKYkrPvnEciUC63NecxxCvx69xXTU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=DTaF47Ktrjhizgg7KTEgXgX7Qi74n3IoC7hu/uE79ZUgUHlv5suGmBAYiROywg42h 104DFsEbtlF4KXCGTHScXXzFg5xKv9m2c4gFt7Vb/Lp0WVekHXMtQH7LVTUVlBMXxw TWcA2T27aLfh2XSrAYUauSavfH9uc9hP1AYfMOPKUaIYj4PTWm2XE6cZYb1vo6fJq3 xJZja6s/MO3emfXarRPRjqgYUIbc58QwDHKcr2DLm0X8tK/YNxdZqHDwTC0VIyipN0 /iFzID6YPMdYD7GIjt0ZPdN+pr4+4allXZU5Dn5LAzaMBxaI1aWmwQuBHduQ5cHsVo BDU1xMvSVIBZw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YJxzd5PYdz6ty6; Thu, 26 Dec 2024 19:31:41 +0100 (CET) From: Philip Kaludercic To: Konstantin Kharlamov Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: <737bc5fd466e36c1a52753d0ce429ad57086c37d.camel@yandex.ru> (Konstantin Kharlamov's message of "Thu, 26 Dec 2024 21:17:00 +0300") References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> <737bc5fd466e36c1a52753d0ce429ad57086c37d.camel@yandex.ru> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 26 Dec 2024 18:31:41 +0000 Message-ID: <877c7mthwy.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Konstantin Kharlamov writes: > On Thu, 2024-12-26 at 18:13 +0000, Philip Kaludercic wrote: >> Eli Zaretskii writes: >>=20 >> > > From: Konstantin Kharlamov >> > > Date: Tue, 24 Dec 2024 18:25:30 +0300 >> > >=20 >> > > I was recently helping out a new Emacs user with package >> > > installation=C2=B9, >> > > and I found an interesting thing: if you put to `package- >> > > archives` a >> > > URL without `https` prefix, download will fail. Long story short, >> > > the >> > > reason turns out that `package-archives` also supports local >> > > paths, >> > > which the URL being considered as. However, Emacs never prints a >> > > message about that, even though such message exists in the code. >> > > Instead it just says that download failed, leaving a user >> > > wondering >> > > why. >> > >=20 >> > > That happens because (package--download-and-read-archives) >> > > ignores the >> > > exception message, and always just prints generic failure >> > > message. >> > >=20 >> > > This code fixes this, so now the actual failure message will be >> > > correctly shown. >> > >=20 >> > > 1: >> > > https://emacs.stackexchange.com/questions/82828/is-installing-deadgr= ep-fron-melpa-still-possible/82829#82829 >> > >=20 >> > >=20 >> > > From fb4685238726a79599f6388318916d2962da93ae Mon Sep 17 00:00:00 >> > > 2001 >> > > From: Konstantin Kharlamov >> > > Date: Tue, 24 Dec 2024 18:16:41 +0300 >> > > Subject: [PATCH] Upon archive download failure print the original >> > > error >> > >=20 >> > > * lisp/emacs-lisp/package.el (package--download-and-read- >> > > archives): >> > > upon catching exception, use the exception message as part of the >> > > error to provide more context about the failure. >> > > --- >> > > =C2=A0lisp/emacs-lisp/package.el | 6 +++--- >> > > =C2=A01 file changed, 3 insertions(+), 3 deletions(-) >> > >=20 >> > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs- >> > > lisp/package.el >> > > index 5f785071ea3..cb81efc71f0 100644 >> > > --- a/lisp/emacs-lisp/package.el >> > > +++ b/lisp/emacs-lisp/package.el >> > > @@ -1829,10 +1829,10 @@ Populate `package-archive-contents' with >> > > the result. >> > > =C2=A0If optional argument ASYNC is non-nil, perform the downloads >> > > =C2=A0asynchronously." >> > > =C2=A0=C2=A0 (dolist (archive package-archives) >> > > -=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug nil >> > > +=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug err >> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package--download-= one-archive archive "archive- >> > > contents" async) >> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download = `%s' archive." >> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive)))))) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download = `%s' archive. Error: >> > > %S" >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive) (cdr err)))))) >> > > =C2=A0 >> > > =C2=A0(defvar package-refresh-contents-hook (list #'package--downloa= d- >> > > and-read-archives) >> > > =C2=A0=C2=A0 "List of functions to call to refresh the package archi= ve. >> > > --=20 >> > > 2.47.1 >> >=20 >> > Thanks. >> >=20 >> > Stefan and Philip, is this okay to install? >>=20 >> It seems harmless, I am just uncertain if we should prefer %S or %s >> to >> format the error message. > > The reason I used %S is that 2x lines below there's similar > construction with (error =E2=80=A6) and it's using %S, so the usage here = goes > in line with the other code. > > That said, I have no preference, I can change it to %s, even in both > locations if you want. In that case I think %S is preferable, and the patch is fine with me. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 14:17:59 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 19:17:59 +0000 Received: from localhost ([127.0.0.1]:42239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQtMr-0005QX-P0 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 14:17:58 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQtMo-0005QI-Ol for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 14:17:56 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 06E6610004A; Thu, 26 Dec 2024 14:17:48 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735240667; bh=t2zUKLcLdKm+AXG9LzWFsvNotnuwKps6AE9Z24LUwtw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YGaKXJCu6fIjI8nw+ySDlnAyoBD8QybhIVLUw//HBvgNLR6/1nxA+XZLwQ/3lY7a9 uqx21/wEwB9rciKWzag0SfXGc5hhRt3sE/13LLDTeE5shQbdPs713OyhUuWPilNLX0 f2pXqzMtA1Kku0yXHJZCyDKQIOEp3UvQsPMRDFluhQQhHOOC9/g9paUuYubDWgUCoC yeWDL4Td7JrMZNW9XXope7+sy2lqubBGwjYD3dyj6tFliNdEsoditlxy471nhy78K7 KYkVEJxbreblcE0v7RgccniRNUG8d/8W4nLcMsb2hY66fSuP2IlfJYRnNMnMnrSuxr 5pqd9e69oL7aQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3C655100035; Thu, 26 Dec 2024 14:17:47 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 28F8C12023D; Thu, 26 Dec 2024 14:17:47 -0500 (EST) From: Stefan Monnier To: Philip Kaludercic Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: <87bjwytis3.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 26 Dec 2024 18:13:00 +0000") Message-ID: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Date: Thu, 26 Dec 2024 14:17:46 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.550 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Eli Zaretskii , Konstantin Kharlamov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> (dolist (archive package-archives) >>> - (condition-case-unless-debug nil >>> + (condition-case-unless-debug err >>> (package--download-one-archive archive "archive-contents" async) >>> - (error (message "Failed to download `%s' archive." >>> - (car archive)))))) >>> + (error (message "Failed to download `%s' archive. Error: %S" >>> + (car archive) (cdr err)))))) >>> >> Stefan and Philip, is this okay to install? I agree with the idea behind the patch, but printing just `(cdr err)` doesn't seem right, it should print the whole of `err`. > It seems harmless, I am just uncertain if we should prefer %S or %s to > format the error message. `%s` to print `err` or `(cdr err)` would be wrong, since `%s` is for use with strings rather than lists. IOW, IMO, it should be either ...%S" ... err) or ...%s" ... (error-message-string err)) where the first is a bit more "debugging/developer" friendly and the second is a bit more "user" friendly. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:14:33 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:14:33 +0000 Received: from localhost ([127.0.0.1]:42322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuFd-0007of-7x for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:14:33 -0500 Received: from forward501a.mail.yandex.net ([178.154.239.81]:56162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuFa-0007oQ-U2 for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:14:32 -0500 Received: from mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:339a:0:640:a002:0]) by forward501a.mail.yandex.net (Yandex) with ESMTPS id 3024761FE1; Thu, 26 Dec 2024 23:14:14 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id BEgmKssOgW20-Yw0OxQRJ; Thu, 26 Dec 2024 23:14:13 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735244053; bh=l4cEediZ51KQNLoOfP6SPWf1cS43IsMxXdHYbz66HX8=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=ldo+lYcsQPsUddu1YYuLlDlUwc/XwSXGdfWdKS+GdeO9ab3o1qd4RF9egy/V/eAsy P4xNjABLmbToK9q6t/RuMFNem5f6vL9U4G3TuoaOnPpI0LPAaH6WZjzJaGbTyvNbQ1 zmMvNRnr6S3N2JPTcjYIjaXbkrLX2MTaIbDhk0mE= Authentication-Results: mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Monnier , Philip Kaludercic Date: Thu, 26 Dec 2024 23:14:10 +0300 In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, 2024-12-26 at 14:17 -0500, Stefan Monnier wrote: > > > > =C2=A0=C2=A0 (dolist (archive package-archives) > > > > -=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug nil > > > > +=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug err > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package--download= -one-archive archive "archive- > > > > contents" async) > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download= `%s' archive." > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive)))))) > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to download= `%s' archive. Error: > > > > %S" > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (car archive) (cdr err)))))) > > > > > > > Stefan and Philip, is this okay to install? > > I agree with the idea behind the patch, but printing just `(cdr err)` > doesn't seem right, it should print the whole of `err`. The `car` seems to just contain word error. Here's how both compare: =E2=80=A2 current patch with `(cdr err)`: Failed to download =E2=80=98melpa=E2=80=99 archive. Error: ("Location m= elpa.org/packages/ is not a url nor an absolute file name") =E2=80=A2 suggested change with `err`: Failed to download =E2=80=98melpa=E2=80=99 archive. Error: (error "Loca= tion melpa.org/packages/ is not a url nor an absolute file name") I can of course remove the word `Error` in the second case. My question then is: will `(car err)` always be the word "error"? Or may there be another content? > > It seems harmless, I am just uncertain if we should prefer %S or %s > > to > > format the error message. > > `%s` to print `err` or `(cdr err)` would be wrong, since `%s` is for > use > with strings rather than lists.=C2=A0 IOW, IMO, it should be either > > =C2=A0=C2=A0=C2=A0 ...%S" ... err) > > or > > =C2=A0=C2=A0=C2=A0 ...%s" ... (error-message-string err)) > > where the first is a bit more "debugging/developer" friendly and the > second > is a bit more "user" friendly. In my tests there seems to be no difference in the output between %s and %S. I would presume doing `(message "%s" '(a b))` would result in error as the param isn't a string, but it works. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:33:12 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:33:12 +0000 Received: from localhost ([127.0.0.1]:42358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuXg-0000FQ-6Y for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:33:12 -0500 Received: from mail-ed1-f42.google.com ([209.85.208.42]:46532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuXd-0000FG-O1 for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:33:10 -0500 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d0ac27b412so8774489a12.1 for <75065@debbugs.gnu.org>; Thu, 26 Dec 2024 12:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735245129; x=1735849929; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=HQAbkFArTREtNUGvcc2R62zPc/whgEFsO+tTa3gS7KQ=; b=SguJ1qWgNONnxkS8u/Cu5BfjdVQ2/PILSSIHzB5hTcUjI6ezs9AZeKxTag8uVnBJIV vh+ETGmE83G6ndjiFX7VkmESJFkeheNjf3u3ujYlrLgsc0l1RpTLL4YJELRi4kULjUzq NiwzhT5rMeoJVqH/Y5606mZ1CYcT5vrNaLg8ijj0bOoXRVFrPQMD7KaudaPPDGwa2Wpx ZeWHyjyZEZ0tPf4r9jAimprBVSi7g4mvsQSAZTsCrgFmu5IS2KMa6CmyDwjSk8Ov7h9o tZiJI+W9laFNVuCDKY2heVxK+oE9e1XrjKVEInqxk+XAjJZzbpfgS4sRMQOwPDlROCn5 WJPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735245129; x=1735849929; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HQAbkFArTREtNUGvcc2R62zPc/whgEFsO+tTa3gS7KQ=; b=wsWfHSFMdUItqV9vmZNo4ol8YgKs6XCNEubPlLHVE734Qd2D+BPNlFvV82NvE0j+LH Z7Xen8fseU332ZQzWVvMLR/H3HNLnuRRFpEFe9Uj9SuibvcrF+edMK1gK6fAj8yBqG1I aKRMk5qpWwZSLy5fbG/G7ahDxeo4ZQrM2hxI6+qVOHS5r/bS9kak+Lb/MNnD2vD5o1Cf YM3XXrq0NxazrthrxKQNNTKg/aQAAufmgZxsW1SwUKXrzNYqvfgCvnXIMlu0ZdXAjxqE NTEckMexjvWJpl9v/Cu7zN5OTklN7j8Zl3nwsKKVwj2Maaem56LGm7E+lwdB4Z4YYtS1 4KZw== X-Gm-Message-State: AOJu0YwjoDaPHfcYwVvwxBEullAX5AaC1x0c/SyDJVYs/6IHdEcHQ0p/ VpQNYdmJOuHR2yE+uaXTviT0QGf32rkPA0VMbytI+Ihiu+F8Ytj4BV5qlEXJZzDPvqZ+beIbFKB +tgl+bWNTGk7B1XCwOy+1rTC7iZ0= X-Gm-Gg: ASbGnctf2W624t08vu9Odzjd2Mjy+LcmfYqKmwA8KJiG9W7lP7SgTuAJyOqvmUP4rP5 xqAKbPF5IKJGJ75vDnKnx7hXRXmcRQCiWbG5bnUM= X-Google-Smtp-Source: AGHT+IF7hnlhcd55frZZTNdfDq429Y5f3nkDU8sQZOEOJmDdsYw7zyX3tWpioy3/B9kXmEaPAng6ShECdZ/kAAXCtj0= X-Received: by 2002:a05:6402:3495:b0:5d0:f830:ef5b with SMTP id 4fb4d7f45d1cf-5d81de17f35mr18830598a12.29.1735245128732; Thu, 26 Dec 2024 12:32:08 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 26 Dec 2024 20:32:08 +0000 From: Stefan Kangas In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> MIME-Version: 1.0 Date: Thu, 26 Dec 2024 20:32:08 +0000 Message-ID: Subject: Re: bug#75065: Upon archive download failure print the original error To: Konstantin Kharlamov , Stefan Monnier , Philip Kaludercic Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Konstantin Kharlamov writes: > On Thu, 2024-12-26 at 14:17 -0500, Stefan Monnier wrote: >> > > > =C2=A0=C2=A0 (dolist (archive package-archives) >> > > > -=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug nil >> > > > +=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug err >> > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package--downloa= d-one-archive archive "archive- >> > > > contents" async) >> > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to downloa= d `%s' archive." >> > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (car archive)))))) >> > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to downloa= d `%s' archive. Error: >> > > > %S" >> > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (car archive) (cdr err)))))) >> > > > >> > > Stefan and Philip, is this okay to install? >> >> I agree with the idea behind the patch, but printing just `(cdr err)` >> doesn't seem right, it should print the whole of `err`. > > The `car` seems to just contain word error. Here's how both compare: > > =E2=80=A2 current patch with `(cdr err)`: > Failed to download =E2=80=98melpa=E2=80=99 archive. Error: ("Location= melpa.org/packages/ is not a url nor an absolute file name") > > =E2=80=A2 suggested change with `err`: > Failed to download =E2=80=98melpa=E2=80=99 archive. Error: (error "Lo= cation melpa.org/packages/ is not a url nor an absolute file name") The "Error:" part is redundant, so I think it could be shortened to something like: Failed to download =E2=80=98melpa=E2=80=99 archive: Location melpa.org/= packages/ is not a url nor an absolute file name From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:37:54 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:37:54 +0000 Received: from localhost ([127.0.0.1]:42365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQucD-0000UG-W0 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:37:54 -0500 Received: from forward500d.mail.yandex.net ([178.154.239.208]:37802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQucB-0000Tu-I4 for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:37:52 -0500 Received: from mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:504a:0:640:b25:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 69620614C4; Thu, 26 Dec 2024 23:37:34 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id VbgwvMXOpGk0-aPuCDV75; Thu, 26 Dec 2024 23:37:33 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735245453; bh=GSHJoO6flt9wZu0YtI37csXjBuyNQJcO4u71zk0Ejnk=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=TIQyQJbZQUlHVjRMmg3FNDP6LJLbC0NIuJcx1/mjokkVkx8lIdLcmwd/RGJkQXT80 JAAlV0HfoB1qI16Nj5p5yVpmbcsPTs/VKtU9oQS0HrZTfi/AJDMGO3TVtEQjnFgw1G 3cYAV4+toH28yqSWQeT3Py/S1lxcfIOuqo0XXJqY= Authentication-Results: mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Kangas , Stefan Monnier , Philip Kaludercic Date: Thu, 26 Dec 2024 23:37:31 +0300 In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, 2024-12-26 at 20:32 +0000, Stefan Kangas wrote: > Konstantin Kharlamov writes: >=20 > > On Thu, 2024-12-26 at 14:17 -0500, Stefan Monnier wrote: > > > > > > =C2=A0=C2=A0 (dolist (archive package-archives) > > > > > > -=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug nil > > > > > > +=C2=A0=C2=A0=C2=A0 (condition-case-unless-debug err > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package--down= load-one-archive archive "archive- > > > > > > contents" async) > > > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to down= load `%s' archive." > > > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (car archive)))))) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error (message "Failed to down= load `%s' archive. > > > > > > Error: > > > > > > %S" > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (car archive) (cdr err)))))) > > > > > >=20 > > > > > Stefan and Philip, is this okay to install? > > >=20 > > > I agree with the idea behind the patch, but printing just `(cdr > > > err)` > > > doesn't seem right, it should print the whole of `err`. > >=20 > > The `car` seems to just contain word error. Here's how both > > compare: > >=20 > > =E2=80=A2 current patch with `(cdr err)`: > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive. = Error: ("Location > > melpa.org/packages/ is not a url nor an absolute file name") > >=20 > > =E2=80=A2 suggested change with `err`: > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive. = Error: (error "Location > > melpa.org/packages/ is not a url nor an absolute file name") >=20 > The "Error:" part is redundant, so I think it could be shortened to > something like: >=20 > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive: Lo= cation melpa.org/packages/ > is > =C2=A0=C2=A0=C2=A0 not a url nor an absolute file name Please note that in the above examples everything after the word `Error: ` is taken from the exception message, which includes the parentheses and (if I follow Stefan's advice) the downcased word "error". The reason in my patch I used `Error:` is because I have no control over the text that will follow, so I need to make sure it's clear that what follows is an error message. Hence my question to Stefan above: if the downcase word `error` will always be there, then removing `Error:` and replacing `(cdr err)` with `err` will works just as well. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:40:34 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:40:34 +0000 Received: from localhost ([127.0.0.1]:42374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuen-0000eS-Lg for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:40:34 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuel-0000eB-Eo for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:40:32 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 628FD8086A; Thu, 26 Dec 2024 15:40:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735245622; bh=sCpG1ds4T+peRnwLINOzCNESZRqyrLC/K7gOrbhJAj8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cdAjHOiN5o1LD6fETCXZA59jnfG8QEPwMkga61BCXH2+mZSiq2lI92BbnOOYN9TQj GwW7BitAzBkVzQPpfkBa5rCLCFWdHEl7AOgvDdEGooAxNHZ/oMX8s0P3shD1LQOynZ rohlSUOywYGNFz3nTfdgjaE5kQLuq4icoS/46BAiPvqwMVkaWNIepCbLKmdDrXwOPt 250MU9fjjis3Z0Aj0bUlnXgp77OPM2YpSqdjrhVyRUh6A2EaAP7zMZktCOcAPglDSx KAvc/LAUEf8sHnzrG9nYkCzeFtmdwpiNPhadg8Ji0PN7F8Fyd0cR3h+GntvjR8oNln c9ydz3CKIxDGw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 686B4801CC; Thu, 26 Dec 2024 15:40:22 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4DBE5120311; Thu, 26 Dec 2024 15:40:22 -0500 (EST) From: Stefan Monnier To: Konstantin Kharlamov Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: (Konstantin Kharlamov's message of "Thu, 26 Dec 2024 23:14:10 +0300") Message-ID: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Date: Thu, 26 Dec 2024 15:40:21 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.212 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > The `car` seems to just contain word error. Here's how both compare: > > =E2=80=A2 current patch with `(cdr err)`: > Failed to download =E2=80=98melpa=E2=80=99 archive. Error: ("Location= melpa.org/packages/ is not a url nor an absolute file name") > > =E2=80=A2 suggested change with `err`: > Failed to download =E2=80=98melpa=E2=80=99 archive. Error: (error "Lo= cation melpa.org/packages/ is not a url nor an absolute file name") > > I can of course remove the word `Error` in the second case. > My question then is: will `(car err)` always be the word "error"? Or > may there be another content? The shape and content of `err` depends on the actual error that caused the download to fail. `(car err)` contains the error "type", which can be `error` but can also be more specific such as `wrong-number-of-arguments`, `file-error`, ... >> > It seems harmless, I am just uncertain if we should prefer %S or %s >> > to format the error message. >> >> `%s` to print `err` or `(cdr err)` would be wrong, since `%s` is for >> use with strings rather than lists.=C2=A0 IOW, IMO, it should be either >> >> =C2=A0=C2=A0=C2=A0 ...%S" ... err) >> >> or >> >> =C2=A0=C2=A0=C2=A0 ...%s" ... (error-message-string err)) >> >> where the first is a bit more "debugging/developer" friendly and the >> second is a bit more "user" friendly. > > In my tests there seems to be no difference in the output between %s > and %S. Try (format "%S" '(a "b")) vs (format "%s" '(a "b")) > I would presume doing `(message "%s" '(a b))` would result in > error as the param isn't a string, but it works. I agree that in an ideal world it should signal an error, but here we are. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:51:53 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:51:53 +0000 Received: from localhost ([127.0.0.1]:42393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQupk-0001B1-Cv for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:51:52 -0500 Received: from forward500d.mail.yandex.net ([178.154.239.208]:46866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQuph-0001Al-KE for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:51:51 -0500 Received: from mail-nwsmtp-smtp-production-main-69.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-69.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7d99:0:640:43c9:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 20983614C6; Thu, 26 Dec 2024 23:51:33 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-69.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id Upga7HCOra60-ewQuxY45; Thu, 26 Dec 2024 23:51:32 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735246292; bh=nnDOQgeNEEYAh6sclqba11hrPp9S6Dka7SJH6gtDtlo=; h=Date:In-Reply-To:Cc:References:To:From:Subject:Message-ID; b=apZF20MaspQopD1Skexb2l6uMYtJGUPndTZhHqIaHJ0UTljOsAUgmNNfYy8VXOP0Z N1ZWi9/JAeoA70DVgZdLU0jkAW+VKRPu5K/TdmkFWcsv210Zbymd+XcCq9yLL5EiPD m/JyXcv2r1zqHfctv+K+ChK6qdgPmnQBqvcGwKp0= Authentication-Results: mail-nwsmtp-smtp-production-main-69.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <99ffe203d32ceb552d2fced282e50b760174140b.camel@yandex.ru> Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Monnier Date: Thu, 26 Dec 2024 23:51:30 +0300 In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Content-Type: multipart/mixed; boundary="=-qthhvHoMrlv0IEcPMIHb" User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-qthhvHoMrlv0IEcPMIHb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2024-12-26 at 15:40 -0500, Stefan Monnier wrote: > > The `car` seems to just contain word error. Here's how both > > compare: > >=20 > > =E2=80=A2 current patch with `(cdr err)`: > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive. = Error: ("Location > > melpa.org/packages/ is not a url nor an absolute file name") > >=20 > > =E2=80=A2 suggested change with `err`: > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive. = Error: (error "Location > > melpa.org/packages/ is not a url nor an absolute file name") > >=20 > > I can of course remove the word `Error` in the second case. > > My question then is: will `(car err)` always be the word "error"? > > Or > > may there be another content? >=20 > The shape and content of `err` depends on the actual error that > caused > the download to fail.=C2=A0 `(car err)` contains the error "type", which > can > be `error` but can also be more specific such as > `wrong-number-of-arguments`, `file-error`, ... Thank you, I see! Please check the attached patch. With this change the error of accessing https-less address is shown as follows: Failed to download =E2=80=98melpa=E2=80=99 archive: (error "Location melpa= .org/packages/ is not a url nor an absolute file name") --=-qthhvHoMrlv0IEcPMIHb Content-Disposition: attachment; filename="1.patch" Content-Type: text/x-patch; name="1.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBjZWE4OTYyYzQyMzUyMmU2YWZjYzdhYmNlNGViMzAyODBmZTEwMjdjIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGluIEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4 LnJ1PgpEYXRlOiBUdWUsIDI0IERlYyAyMDI0IDE4OjE2OjQxICswMzAwClN1YmplY3Q6IFtQQVRD SF0gVXBvbiBhcmNoaXZlIGRvd25sb2FkIGZhaWx1cmUgcHJpbnQgdGhlIG9yaWdpbmFsIGVycm9y CgoqIGxpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsIChwYWNrYWdlLS1kb3dubG9hZC1hbmQtcmVh ZC1hcmNoaXZlcyk6CnVwb24gY2F0Y2hpbmcgZXhjZXB0aW9uLCB1c2UgdGhlIGV4Y2VwdGlvbiBt ZXNzYWdlIGFzIHBhcnQgb2YgdGhlCmVycm9yIHRvIHByb3ZpZGUgbW9yZSBjb250ZXh0IGFib3V0 IHRoZSBmYWlsdXJlLgotLS0KIGxpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsIHwgNiArKystLS0K IDEgZmlsZSBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyksIDMgZGVsZXRpb25zKC0pCgpkaWZmIC0t Z2l0IGEvbGlzcC9lbWFjcy1saXNwL3BhY2thZ2UuZWwgYi9saXNwL2VtYWNzLWxpc3AvcGFja2Fn ZS5lbAppbmRleCA1Zjc4NTA3MWVhMy4uODFmMGFjMDE2MmYgMTAwNjQ0Ci0tLSBhL2xpc3AvZW1h Y3MtbGlzcC9wYWNrYWdlLmVsCisrKyBiL2xpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCkBAIC0x ODI5LDEwICsxODI5LDEwIEBAIFBvcHVsYXRlIGBwYWNrYWdlLWFyY2hpdmUtY29udGVudHMnIHdp dGggdGhlIHJlc3VsdC4KIElmIG9wdGlvbmFsIGFyZ3VtZW50IEFTWU5DIGlzIG5vbi1uaWwsIHBl cmZvcm0gdGhlIGRvd25sb2FkcwogYXN5bmNocm9ub3VzbHkuIgogICAoZG9saXN0IChhcmNoaXZl IHBhY2thZ2UtYXJjaGl2ZXMpCi0gICAgKGNvbmRpdGlvbi1jYXNlLXVubGVzcy1kZWJ1ZyBuaWwK KyAgICAoY29uZGl0aW9uLWNhc2UtdW5sZXNzLWRlYnVnIGVycgogICAgICAgICAocGFja2FnZS0t ZG93bmxvYWQtb25lLWFyY2hpdmUgYXJjaGl2ZSAiYXJjaGl2ZS1jb250ZW50cyIgYXN5bmMpCi0g ICAgICAoZXJyb3IgKG1lc3NhZ2UgIkZhaWxlZCB0byBkb3dubG9hZCBgJXMnIGFyY2hpdmUuIgot ICAgICAgICAgICAgICAgKGNhciBhcmNoaXZlKSkpKSkpCisgICAgICAoZXJyb3IgKG1lc3NhZ2Ug IkZhaWxlZCB0byBkb3dubG9hZCBgJXMnIGFyY2hpdmU6ICVTIgorICAgICAgICAgICAgICAgKGNh ciBhcmNoaXZlKSBlcnIpKSkpKQogCiAoZGVmdmFyIHBhY2thZ2UtcmVmcmVzaC1jb250ZW50cy1o b29rIChsaXN0ICMncGFja2FnZS0tZG93bmxvYWQtYW5kLXJlYWQtYXJjaGl2ZXMpCiAgICJMaXN0 IG9mIGZ1bmN0aW9ucyB0byBjYWxsIHRvIHJlZnJlc2ggdGhlIHBhY2thZ2UgYXJjaGl2ZS4KLS0g CjIuNDcuMQoK --=-qthhvHoMrlv0IEcPMIHb-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 15:53:50 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 20:53:51 +0000 Received: from localhost ([127.0.0.1]:42405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQure-0001GL-Gk for submit@debbugs.gnu.org; Thu, 26 Dec 2024 15:53:50 -0500 Received: from forward500d.mail.yandex.net ([178.154.239.208]:52836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQurb-0001FX-Sh for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 15:53:49 -0500 Received: from mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:504a:0:640:b25:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 70AFB614A9; Thu, 26 Dec 2024 23:53:42 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id frg86TXOpOs0-yNmmPRw9; Thu, 26 Dec 2024 23:53:41 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735246421; bh=IYKosuK60ZmEqCn69DJ1J1cDS69HiS8au/U6Wp+s0uU=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=TJENY3he95FEHQ0+iUSd6A8EQwmLUI5PaKVDAuceufQhJs97pIiDBc3/0LLamFSOv t6pfs/yjA+wrPncXSV+espbNqxnihrcrq197GfyLHwDH7gBHEAJdVojBL1onnm9AZV at77O2INXMtn3FeiB9D6CwjUHFn310rRE40h6RZc= Authentication-Results: mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Monnier Date: Thu, 26 Dec 2024 23:53:41 +0300 In-Reply-To: <99ffe203d32ceb552d2fced282e50b760174140b.camel@yandex.ru> References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> <99ffe203d32ceb552d2fced282e50b760174140b.camel@yandex.ru> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Oh, actually, let me fix the other place as well then=E2=80=A6 On Thu, 2024-12-26 at 23:51 +0300, Konstantin Kharlamov wrote: > On Thu, 2024-12-26 at 15:40 -0500, Stefan Monnier wrote: > > > The `car` seems to just contain word error. Here's how both > > > compare: > > >=20 > > > =E2=80=A2 current patch with `(cdr err)`: > > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive= . Error: ("Location > > > melpa.org/packages/ is not a url nor an absolute file name") > > >=20 > > > =E2=80=A2 suggested change with `err`: > > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archive= . Error: (error "Location > > > melpa.org/packages/ is not a url nor an absolute file name") > > >=20 > > > I can of course remove the word `Error` in the second case. > > > My question then is: will `(car err)` always be the word "error"? > > > Or > > > may there be another content? > >=20 > > The shape and content of `err` depends on the actual error that > > caused > > the download to fail.=C2=A0 `(car err)` contains the error "type", whic= h > > can > > be `error` but can also be more specific such as > > `wrong-number-of-arguments`, `file-error`, ... >=20 > Thank you, I see! >=20 > Please check the attached patch. With this change the error of > accessing https-less address is shown as follows: >=20 > Failed to download =E2=80=98melpa=E2=80=99 archive: (error "Location > melpa.org/packages/ is not a url nor an absolute file name") From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 16:04:19 2024 Received: (at 75065) by debbugs.gnu.org; 26 Dec 2024 21:04:19 +0000 Received: from localhost ([127.0.0.1]:42422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQv1n-0001pD-0w for submit@debbugs.gnu.org; Thu, 26 Dec 2024 16:04:19 -0500 Received: from forward502d.mail.yandex.net ([178.154.239.210]:46908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQv1k-0001oz-KO for 75065@debbugs.gnu.org; Thu, 26 Dec 2024 16:04:17 -0500 Received: from mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:504a:0:640:b25:0]) by forward502d.mail.yandex.net (Yandex) with ESMTPS id 902516150C; Fri, 27 Dec 2024 00:04:00 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id x3hk3XXOp8c0-llaU5S8V; Fri, 27 Dec 2024 00:03:59 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735247039; bh=xYMu/Wa910any6vnyZY7RTNUa1KCHy0HgSTuvqezds8=; h=Date:In-Reply-To:Cc:References:To:From:Subject:Message-ID; b=BBEg0dGUvfSVUegQlywfJ/wvTaOh7em2QHhK9u2gziXbJ3jqaxylHIk/zMufCfEVF /9T+H89BygpT7SDawGsEl2JFblXj4+F8+wVsrV+TKVTDwzD1c9o9HMiDk+Anfe6+Hy 0/r887H13JBvw91YNaZIhR6LZfRY3mmoljLZEYQc= Authentication-Results: mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Monnier Date: Fri, 27 Dec 2024 00:03:59 +0300 In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> <99ffe203d32ceb552d2fced282e50b760174140b.camel@yandex.ru> Content-Type: multipart/mixed; boundary="=-WT3IIMIt3IaQT6zr+ODJ" User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-WT3IIMIt3IaQT6zr+ODJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2024-12-26 at 23:53 +0300, Konstantin Kharlamov wrote: > Oh, actually, let me fix the other place as well then=E2=80=A6 >=20 > On Thu, 2024-12-26 at 23:51 +0300, Konstantin Kharlamov wrote: > > On Thu, 2024-12-26 at 15:40 -0500, Stefan Monnier wrote: > > > > The `car` seems to just contain word error. Here's how both > > > > compare: > > > >=20 > > > > =E2=80=A2 current patch with `(cdr err)`: > > > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archi= ve. Error: ("Location > > > > melpa.org/packages/ is not a url nor an absolute file name") > > > >=20 > > > > =E2=80=A2 suggested change with `err`: > > > > =C2=A0=C2=A0=C2=A0 Failed to download =E2=80=98melpa=E2=80=99 archi= ve. Error: (error "Location > > > > melpa.org/packages/ is not a url nor an absolute file name") > > > >=20 > > > > I can of course remove the word `Error` in the second case. > > > > My question then is: will `(car err)` always be the word > > > > "error"? > > > > Or > > > > may there be another content? > > >=20 > > > The shape and content of `err` depends on the actual error that > > > caused > > > the download to fail.=C2=A0 `(car err)` contains the error "type", > > > which > > > can > > > be `error` but can also be more specific such as > > > `wrong-number-of-arguments`, `file-error`, ... > >=20 > > Thank you, I see! > >=20 > > Please check the attached patch. With this change the error of > > accessing https-less address is shown as follows: > >=20 > > Failed to download =E2=80=98melpa=E2=80=99 archive: (error "Location > > melpa.org/packages/ is not a url nor an absolute file name") >=20 Done, please review =F0=9F=98=8A --=-WT3IIMIt3IaQT6zr+ODJ Content-Disposition: attachment; filename="1.patch" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="1.patch"; charset="UTF-8" RnJvbSA2NDJjOTM0ZmIwY2IxNjUwZmZkNWIxMzEyNzc3NGQ3M2M4YTFhZjM1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGluIEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4 LnJ1PgpEYXRlOiBUdWUsIDI0IERlYyAyMDI0IDE4OjE2OjQxICswMzAwClN1YmplY3Q6IFtQQVRD SCAxLzJdIFVwb24gYXJjaGl2ZSBkb3dubG9hZCBmYWlsdXJlIHByaW50IHRoZSBvcmlnaW5hbCBl cnJvcgogKEJ1ZyM3NTA2NSkKCiogbGlzcC9lbWFjcy1saXNwL3BhY2thZ2UuZWwgKHBhY2thZ2Ut LWRvd25sb2FkLWFuZC1yZWFkLWFyY2hpdmVzKToKdXBvbiBjYXRjaGluZyBleGNlcHRpb24sIHVz ZSB0aGUgZXhjZXB0aW9uIG1lc3NhZ2UgYXMgcGFydCBvZiB0aGUKZXJyb3IgdG8gcHJvdmlkZSBt b3JlIGNvbnRleHQgYWJvdXQgdGhlIGZhaWx1cmUuCi0tLQogbGlzcC9lbWFjcy1saXNwL3BhY2th Z2UuZWwgfCA2ICsrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMyBkZWxl dGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL2VtYWNzLWxpc3AvcGFja2FnZS5lbCBiL2xpc3Av ZW1hY3MtbGlzcC9wYWNrYWdlLmVsCmluZGV4IDVmNzg1MDcxZWEzLi44MWYwYWMwMTYyZiAxMDA2 NDQKLS0tIGEvbGlzcC9lbWFjcy1saXNwL3BhY2thZ2UuZWwKKysrIGIvbGlzcC9lbWFjcy1saXNw L3BhY2thZ2UuZWwKQEAgLTE4MjksMTAgKzE4MjksMTAgQEAgUG9wdWxhdGUgYHBhY2thZ2UtYXJj aGl2ZS1jb250ZW50cycgd2l0aCB0aGUgcmVzdWx0LgogSWYgb3B0aW9uYWwgYXJndW1lbnQgQVNZ TkMgaXMgbm9uLW5pbCwgcGVyZm9ybSB0aGUgZG93bmxvYWRzCiBhc3luY2hyb25vdXNseS4iCiAg IChkb2xpc3QgKGFyY2hpdmUgcGFja2FnZS1hcmNoaXZlcykKLSAgICAoY29uZGl0aW9uLWNhc2Ut dW5sZXNzLWRlYnVnIG5pbAorICAgIChjb25kaXRpb24tY2FzZS11bmxlc3MtZGVidWcgZXJyCiAg ICAgICAgIChwYWNrYWdlLS1kb3dubG9hZC1vbmUtYXJjaGl2ZSBhcmNoaXZlICJhcmNoaXZlLWNv bnRlbnRzIiBhc3luYykKLSAgICAgIChlcnJvciAobWVzc2FnZSAiRmFpbGVkIHRvIGRvd25sb2Fk IGAlcycgYXJjaGl2ZS4iCi0gICAgICAgICAgICAgICAoY2FyIGFyY2hpdmUpKSkpKSkKKyAgICAg IChlcnJvciAobWVzc2FnZSAiRmFpbGVkIHRvIGRvd25sb2FkIGAlcycgYXJjaGl2ZTogJVMiCisg ICAgICAgICAgICAgICAoY2FyIGFyY2hpdmUpIGVycikpKSkpCiAKIChkZWZ2YXIgcGFja2FnZS1y ZWZyZXNoLWNvbnRlbnRzLWhvb2sgKGxpc3QgIydwYWNrYWdlLS1kb3dubG9hZC1hbmQtcmVhZC1h cmNoaXZlcykKICAgIkxpc3Qgb2YgZnVuY3Rpb25zIHRvIGNhbGwgdG8gcmVmcmVzaCB0aGUgcGFj a2FnZSBhcmNoaXZlLgotLSAKMi40Ny4xCgoKRnJvbSBjZjhmMmNhMDkxNTc0MzAyNzE2MGRjNTE2 ZWVhNGZkNTY1YjYyZmZhIE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGlu IEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4LnJ1PgpEYXRlOiBUaHUsIDI2IERlYyAyMDI0IDIz OjU0OjI1ICswMzAwClN1YmplY3Q6IFtQQVRDSCAyLzJdIFVwb24ga2V5cmluZyBpbXBvcnQgZmFp bCBwcmludCB0aGUgZnVsbCBlcnJvciAoQnVnIzc1MDY1KQoKQXMgZGlzY3Vzc2VkIGF0IEJ1ZyM3 NTA2NSwgdGhlIGAoY2FyIGVycm9yKScgY29udGFpbnMgdGhlIGV4Y2VwdGlvbgp0eXBlIGFuZCBp dCdzIGJldHRlciB0byBwcmludCB0aGUgZnVsbCBlcnJvciBjb250ZW50LgoKKiBsaXNwL2VtYWNz LWxpc3AvcGFja2FnZS5lbCAocGFja2FnZS1yZWZyZXNoLWNvbnRlbnRzKTogdXBvbiBrZXlyaW5n CmltcG9ydCBmYWlsdXJlIHByaW50IHRoZSBmdWxsIGNvbnRlbnQuCi0tLQogbGlzcC9lbWFjcy1s aXNwL3BhY2thZ2UuZWwgfCAyICstCiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyksIDEg ZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL2VtYWNzLWxpc3AvcGFja2FnZS5lbCBiL2xp c3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCmluZGV4IDgxZjBhYzAxNjJmLi5lMjRkYjQ1NjdlMSAx MDA2NDQKLS0tIGEvbGlzcC9lbWFjcy1saXNwL3BhY2thZ2UuZWwKKysrIGIvbGlzcC9lbWFjcy1s aXNwL3BhY2thZ2UuZWwKQEAgLTE4NTYsNyArMTg1Niw3IEBAIGRvd25sb2FkcyBpbiB0aGUgYmFj a2dyb3VuZC4iCiAgICAgKHdoZW4gKGFuZCAocGFja2FnZS1jaGVjay1zaWduYXR1cmUpIChmaWxl LWV4aXN0cy1wIGRlZmF1bHQta2V5cmluZykpCiAgICAgICAoY29uZGl0aW9uLWNhc2UtdW5sZXNz LWRlYnVnIGVycm9yCiAgICAgICAgICAgKHBhY2thZ2UtaW1wb3J0LWtleXJpbmcgZGVmYXVsdC1r ZXlyaW5nKQotICAgICAgICAoZXJyb3IgKG1lc3NhZ2UgIkNhbm5vdCBpbXBvcnQgZGVmYXVsdCBr ZXlyaW5nOiAlUyIgKGNkciBlcnJvcikpKSkpKQorICAgICAgICAoZXJyb3IgKG1lc3NhZ2UgIkNh bm5vdCBpbXBvcnQgZGVmYXVsdCBrZXlyaW5nOiAlUyIgZXJyb3IpKSkpKQogICAocnVuLWhvb2st d2l0aC1hcmdzICdwYWNrYWdlLXJlZnJlc2gtY29udGVudHMtaG9vayBhc3luYykpCiAKIAwKLS0g CjIuNDcuMQoK --=-WT3IIMIt3IaQT6zr+ODJ-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 02:22:30 2024 Received: (at 75065) by debbugs.gnu.org; 27 Dec 2024 07:22:30 +0000 Received: from localhost ([127.0.0.1]:44506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR4g1-0008Nq-N4 for submit@debbugs.gnu.org; Fri, 27 Dec 2024 02:22:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR4fz-0008Na-0T for 75065@debbugs.gnu.org; Fri, 27 Dec 2024 02:22:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tR4fs-00062w-KJ; Fri, 27 Dec 2024 02:22:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=m782V8V74YGsNx5qWLJ4fIArEJpOncXgkwKEELgLs5k=; b=jrkzQSrbD8o93P4eyZkN Lcs2yAlYee+aSz5HazX+RIrOuhCdULW/7q/3uLk3mdHOojYhHtlOxz40bRCUTfI4yS2/jod3IBGfu 9Tag4SyXTsq5rOB1UgH+uio89soakCPLYLOYOaGOnofGpZDyz9oZ5ZGK+KbzPQsq/Ps/2lBjG4PNE mb+lYXFqZ7CbDSitmIvCz7OSL1+tgv2lqo48dlq1sbSrTmycgDYwTHya4sxtN5w2b1EJX+luVGtor qD6dDWFQKAwNKvk4EaJn3wDOwE+yK8fQFbqvWGcA+HlXBtxzWxdsRJ5BeeBdNqf8Z4wCeEssfFG2F XXjDz1OMel0mjA==; Date: Fri, 27 Dec 2024 09:22:19 +0200 Message-Id: <86cyhdy4ic.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Thu, 26 Dec 2024 15:40:21 -0500) Subject: Re: bug#75065: Upon archive download failure print the original error References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, philipk@posteo.net, Hi-Angel@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Philip Kaludercic , Eli Zaretskii , > 75065@debbugs.gnu.org > Date: Thu, 26 Dec 2024 15:40:21 -0500 > > > The `car` seems to just contain word error. Here's how both compare: > > > > • current patch with `(cdr err)`: > > Failed to download ‘melpa’ archive. Error: ("Location melpa.org/packages/ is not a url nor an absolute file name") > > > > • suggested change with `err`: > > Failed to download ‘melpa’ archive. Error: (error "Location melpa.org/packages/ is not a url nor an absolute file name") > > > > I can of course remove the word `Error` in the second case. > > My question then is: will `(car err)` always be the word "error"? Or > > may there be another content? > > The shape and content of `err` depends on the actual error that caused > the download to fail. `(car err)` contains the error "type", which can > be `error` but can also be more specific such as > `wrong-number-of-arguments`, `file-error`, ... Yes, the car part is not redundant, it can include useful information that we should not lose. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 12:01:26 2024 Received: (at 75065-done) by debbugs.gnu.org; 27 Dec 2024 17:01:26 +0000 Received: from localhost ([127.0.0.1]:47388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRDiH-0003wP-Q4 for submit@debbugs.gnu.org; Fri, 27 Dec 2024 12:01:26 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRDiF-0003w4-E2 for 75065-done@debbugs.gnu.org; Fri, 27 Dec 2024 12:01:23 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C3DAF100043; Fri, 27 Dec 2024 12:01:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735318876; bh=q0ZwJbndcIoo+uSWd1Foy6HFwpgAfGbRDxpMht7cqpE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=n8+3rvte0M/HLJ6sBcpa80o9deUGOmh+A+LGbiRN5FY5O/rrgVYgF+miQ8eyVuSOe pkgqke1/uH2rsCChMOJ+Kk/++i5VpftPAYE1oz7oxNM0IKZeiRxee0OHo1v8KUttut Y7d3zuUluzE6zKU5FdZnYXBzsJ2Txpk9Zo/6gF/zrFztz9JLVkTOPu8DI5esJp/4Jj Y+bp8NENp5zYNkK7ssT+rrBKLBD5S7mulO4z+8loQZ8C4sncZqPaZAP5PVth5kn2lu T+qQgDsHm5oHbTDrYcuu2Xp0cv+2fx91m4yxrJ73Rpjx2/z5cuqEeh9dqdlJI24lmU ATQmKZxfyMgAA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0F15F10002E; Fri, 27 Dec 2024 12:01:16 -0500 (EST) Received: from asado (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DBFDF120568; Fri, 27 Dec 2024 12:01:15 -0500 (EST) From: Stefan Monnier To: Philip Kaludercic Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: (Stefan Monnier's message of "Thu, 26 Dec 2024 14:17:46 -0500") Message-ID: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Date: Fri, 27 Dec 2024 12:01:14 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.907 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065-done Cc: 75065-done@debbugs.gnu.org, Eli Zaretskii , Konstantin Kharlamov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain > `%s` to print `err` or `(cdr err)` would be wrong, since `%s` is for use > with strings rather than lists. IOW, IMO, it should be either > > ...%S" ... err) > > or > > ...%s" ... (error-message-string err)) > > where the first is a bit more "debugging/developer" friendly and the second > is a bit more "user" friendly. Revising the code of `package.el` I see that those errors&messages are meant to be exposed to the user, so they should preferably use `error-message-string`. So I installed the patch below into `master`. Thank you! Closing, Stefan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=package.patch commit a99e1cc745047977b0b7cbd25fe9df66e9c86a39 Author: Stefan Monnier Date: Fri Dec 27 11:58:30 2024 -0500 (package--download-and-read-archives): Fix bug#75065 * lisp/emacs-lisp/package.el (package--download-and-read-archives): Include the error info in the error message. Suggested by Konstantin Kharlamov . (package-refresh-contents, package-menu--perform-transaction): Use `error-message-string`. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5f785071ea3..bff45d57b07 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1829,10 +1829,11 @@ package--download-and-read-archives If optional argument ASYNC is non-nil, perform the downloads asynchronously." (dolist (archive package-archives) - (condition-case-unless-debug nil + (condition-case-unless-debug err (package--download-one-archive archive "archive-contents" async) - (error (message "Failed to download `%s' archive." - (car archive)))))) + (error (message "Failed to download `%s' archive: %s" + (car archive) + (error-message-string err)))))) (defvar package-refresh-contents-hook (list #'package--download-and-read-archives) "List of functions to call to refresh the package archive. @@ -1856,7 +1857,8 @@ package-refresh-contents (when (and (package-check-signature) (file-exists-p default-keyring)) (condition-case-unless-debug error (package-import-keyring default-keyring) - (error (message "Cannot import default keyring: %S" (cdr error)))))) + (error (message "Cannot import default keyring: %s" + (error-message-string error)))))) (run-hook-with-args 'package-refresh-contents-hook async)) @@ -3989,8 +3991,9 @@ package-menu--perform-transaction (package-delete elt nil 'nosave)) (error (push (package-desc-full-name elt) errors) - (message "Error trying to delete `%s': %S" - (package-desc-full-name elt) err))))) + (message "Error trying to delete `%s': %s" + (package-desc-full-name elt) + (error-message-string err)))))) errors)) (defun package--update-selected-packages (add remove) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 13:34:41 2024 Received: (at 75065-done) by debbugs.gnu.org; 27 Dec 2024 18:34:41 +0000 Received: from localhost ([127.0.0.1]:47559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRFAX-000842-AO for submit@debbugs.gnu.org; Fri, 27 Dec 2024 13:34:41 -0500 Received: from forward502a.mail.yandex.net ([178.154.239.82]:50106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRFAV-00083o-0j for 75065-done@debbugs.gnu.org; Fri, 27 Dec 2024 13:34:40 -0500 Received: from mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0d:9:0:640:2d51:0]) by forward502a.mail.yandex.net (Yandex) with ESMTPS id 414E7612E4; Fri, 27 Dec 2024 21:34:33 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id UYfQmb4OmmI0-ScDP7UCS; Fri, 27 Dec 2024 21:34:32 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735324472; bh=KKYCMXpnrWgKh43Bzb4eKcOk4AWcW9H8A5R6Go2N9R8=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=t9E21ZqQV7B1Jm4cFUzgAFKCkp3UXqaQtxOd4oZF19Hdg7meq6WIwQRphA0m/kajT yF75pdkH9U+v4zMoPIrQTWYLhpi5w7LohbHbd+/C3ja6eTFh2h1VvEvGadOixQR8SY bATxIMA851/MWiIeS1G3GsFl4bNEr5Ix8WdyhQOo= Authentication-Results: mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <3c76908be3fea66640bded9494013d1393bc660c.camel@yandex.ru> Subject: Re: bug#75065: Upon archive download failure print the original error From: Konstantin Kharlamov To: Stefan Monnier , Philip Kaludercic Date: Fri, 27 Dec 2024 21:34:30 +0300 In-Reply-To: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75065-done Cc: 75065-done@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, 2024-12-27 at 12:01 -0500, Stefan Monnier wrote: > > `%s` to print `err` or `(cdr err)` would be wrong, since `%s` is > > for use > > with strings rather than lists.=C2=A0 IOW, IMO, it should be either > >=20 > > =C2=A0=C2=A0=C2=A0 ...%S" ... err) > >=20 > > or > >=20 > > =C2=A0=C2=A0=C2=A0 ...%s" ... (error-message-string err)) > >=20 > > where the first is a bit more "debugging/developer" friendly and > > the second > > is a bit more "user" friendly. >=20 > Revising the code of `package.el` I see that those errors&messages > are > meant to be exposed to the user, so they should preferably use > `error-message-string`. >=20 > So I installed the patch below into `master`. > Thank you! This is not fair: despite me actively answering on my patch, you took my changes, just changed one function call to another, and rewritten the author like if it were you who were writing and debugging the code and the issue rather than me. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 22:09:37 2024 Received: (at 75065) by debbugs.gnu.org; 28 Dec 2024 03:09:38 +0000 Received: from localhost ([127.0.0.1]:48228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRNCr-0000Rf-IL for submit@debbugs.gnu.org; Fri, 27 Dec 2024 22:09:37 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRNCp-0000RK-1f for 75065@debbugs.gnu.org; Fri, 27 Dec 2024 22:09:35 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9661A807AA; Fri, 27 Dec 2024 22:09:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735355362; bh=NQ7tDyfgSEiSfs6t3sVH+VrjJ9fkXl1nypHRhH/t6Xc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HETOU36NyYJ7DCkF/CJHYOjxZJ/lWQ9Q/kE+KH2hV7ddYNQ/yVXylNtQfQZWm0G8s vA/HbTtUsGFaySsxeOEWRy7bJpdDjMI5AWhT3D+/bHVshORuTWrCYdt/Uov3OLDF+T 779MktNkzx+gplczbRIGbRfZq2AOMp8UifE394xpGjQDccSpdFFz/dmQ7MDhOsKkRo a0d3pGs+vPwYMdNwqeteSPizYyKlYcrgP2OH9yI7J1hVwO8i4RzgigUNslUwgo8aHq ogAZ7ALBLLCEWLS7EVh2WsIMf9nTTE+poiADkMWXzJpdN/IyKOXFbZEJ2T6tN6GTJS U3mkSIdLaEH7g== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 99F7980065; Fri, 27 Dec 2024 22:09:22 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5AB47120480; Fri, 27 Dec 2024 22:09:22 -0500 (EST) From: Stefan Monnier To: Konstantin Kharlamov Subject: Re: bug#75065: Upon archive download failure print the original error In-Reply-To: <3c76908be3fea66640bded9494013d1393bc660c.camel@yandex.ru> (Konstantin Kharlamov's message of "Fri, 27 Dec 2024 21:34:30 +0300") Message-ID: References: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> <867c7mzuva.fsf@gnu.org> <87bjwytis3.fsf@posteo.net> <3c76908be3fea66640bded9494013d1393bc660c.camel@yandex.ru> Date: Fri, 27 Dec 2024 22:09:21 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.050 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75065 Cc: 75065@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > This is not fair: despite me actively answering on my patch, you took > my changes, just changed one function call to another, and rewritten > the author like if it were you who were writing and debugging the code > and the issue rather than me. You're right, I'm sorry. Stefan From unknown Wed Jun 18 00:25:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 25 Jan 2025 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator