From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0Cc2BLVi+GP+WwEAbAwnHQ (envelope-from ) for ; Fri, 24 Feb 2023 08:09:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YAAPBLVi+GPPlgAAauVa8A (envelope-from ) for ; Fri, 24 Feb 2023 08:09:41 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 83FC22D19A for ; Fri, 24 Feb 2023 08:09:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVSCJ-0000My-TC; Fri, 24 Feb 2023 02:08:51 -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 1pVSCI-0000Mp-E1 for emacs-orgmode@gnu.org; Fri, 24 Feb 2023 02:08:50 -0500 Received: from mail.choca.pics ([2001:910:1410:500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVSCG-0005Wn-K0 for emacs-orgmode@gnu.org; Fri, 24 Feb 2023 02:08:50 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 6345218095AB4; Fri, 24 Feb 2023 08:08:44 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id DowAtvmzjgjv; Fri, 24 Feb 2023 08:08:44 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id DEE7118095AB3; Fri, 24 Feb 2023 08:08:43 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id tnAhFsSp7gDc; Fri, 24 Feb 2023 08:08:43 +0100 (CET) Received: from localhost (91.60.75.86.rev.sfr.net [86.75.60.91]) by mail.choca.pics (Postfix) with ESMTPSA id 9BDAD18095AB2; Fri, 24 Feb 2023 08:08:43 +0100 (CET) From: Damien Cassou To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Avoid crash in `org-file-contents' in case of network failure In-Reply-To: <87y1oqcaif.fsf@localhost> References: <87cz66278h.fsf@cassou.me> <87y1oqcaif.fsf@localhost> Date: Fri, 24 Feb 2023 08:08:43 +0100 Message-ID: <87y1onsfpg.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:910:1410:500::1; envelope-from=damien@cassou.me; helo=mail.choca.pics X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677222580; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=YC0fDzskzgoeSmZynQjdv07KRcmdkJ/UiihNKLktzTY=; b=nDT/hQvE43s2m7scbSm3F47VA37VijUlcRh0gTfu1HmbIppdX2kJRiadBKePg/iYKo20Yb qI0zToVi96uS7dHC4ozsa1s3FEjpYGxcDO8GP3DDp9hgO8/aetWvUjbDyrEpMYrNMbvJh9 Yv0ason4wJQWAJDtb9vpQaqCpS8VNzQtFIGdsLXNqpf5OlPAFh+YrQidku1eSRD862Rl1w xyVoE4OiVjCJZGh0jOIckj/lfr/ZX2BQQwpNLFy+Qr+61wRVAdc0kXOel161AlbytDqRxR AWH49Sl1ZBadqmhJNcAnoXDbY5WTg81CgfewM/JKlmseqaopa6hwchq0k2Y/2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677222580; a=rsa-sha256; cv=none; b=tXcEihrWv+0yJRJ1uJ3tGzXaqT6OyPq16h/JdxhNUJSvj229t0T7i4LRM4ZZtf2DuP0C3w 80FrB6RcBfJ/bwLh6yNkY5R3fmrF7ivXHzkYolyJxL1h/jXPk6TbfFNWNai5+brJQfVvjf RNm31KgnqlXG6l/ZvqKHq8uja6sUXQJLASiXr62o+FogBMXtJDTL3XmHlFEcdVVo00BQ3Y 1u/Fh+w04aFzASojcKO8Sk5dW1zJqWzEOmtx+tIVp5FMKDouV4aprrYRn8DPYh1qkGik/e ed33iIWf/s9DPAZvfBEeEk6GaesvmBRe+AIW/T7F4BDYLtvHmnY8z1cfkb1kDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Spam-Score: -3.72 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -3.72 X-Migadu-Queue-Id: 83FC22D19A X-TUID: ZulYfNXeaQPA Hi Ihor, thank you for your review. Ihor Radchenko writes: > According to our records in https://orgmode.org/worg/contributors.html, > you haven't signed FSF copyright agreement. May you add a TINYCHANGE > cookie to the commit message as required by > https://orgmode.org/worg/org-contribute.html#first-patch I've signed the FSF copyright agreement in the context of my contributions to Emacs. Do I need to do any more paperwork? I've added TINYCHANGE to the patch anyway. >> + (error (if noerror >> + (message "%s %S" (car error) (cdr error)) >> + (signal (car error) (cdr error))))) > > I think that it will be a good idea to indicate in the `message' where > the error is coming from. The error intercepted by this `condition-case' > form will likely be a network error, and it may be unclear to the user > which function is failing to make the connection. I tried to make that a little bit clearer: (message "Org could't download \"%s\": %s %S" file (car error) (cdr error)) Do you want me to explicitly refer to the current function name? -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill