From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kIdrCZJ232RNHAEASxT56A (envelope-from ) for ; Fri, 18 Aug 2023 15:48:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ZXAzCZJ232Sv5AAA9RJhRA (envelope-from ) for ; Fri, 18 Aug 2023 15:48:02 +0200 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 AA9CF54A9B for ; Fri, 18 Aug 2023 15:48:01 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=iro.umontreal.ca header.s=mail header.b=bQwkiT54; 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=pass (policy=quarantine) header.from=iro.umontreal.ca ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692366481; a=rsa-sha256; cv=none; b=S3pIe2rk7uTHRZAl72rsHJAijxuDYKTGUpCkPRkuArzrUsZes3JzHeoNzq1Uka3O4zy4Um DUMTXsfcmOGG6Jlsoyb5iD4+ei2z8Rh1rMTuOADeW1kL7FmG/si3gpcmpH0kjSe4JcnlUh PExInQoEPgdjrnCsAxGex+2Xe7iqXe6XjS8Vw+z16Vkob5Rbi2ligbkXUrn0W0GDg1VRPx vbHrQ8IFEfupnd0gsKUOjF/UgITJcwj0kZNsHGEBxpnctSAdtEd0Zpcegp23P0b41PqG6J EKzLl0O08YMgsPWqvQlSO/tVp8wpoxP14VvPEf24jYH83ZGqgp/wmL1NqZQLOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=iro.umontreal.ca header.s=mail header.b=bQwkiT54; 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=pass (policy=quarantine) header.from=iro.umontreal.ca ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692366481; 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:dkim-signature; bh=8iu8jyYuhbUECPg9RSyxr6It+tqEZfj7S4OtYXxd0OA=; b=d2Lmjo6iaghN6pgDEkVm7Kgmw0MOzoWFqwuM2vuTA6W//ZIwSJ554CJoCF8aCMmC/80zNY kieKCwmXhL5k1qevc64pJWZN6sOuG2QciOsSqOdd/AWB9e2pSkLgPoV2lvCMUKHNUj+Cmu 5/NP0/0r3ExSHysuAtR0svN57FSdc27ocVNbkYAPGPhdexkDAwPD5Pi1Big0M7k7QdUDjp bsoYRiR7mQX8y46XZVv40ieSupplzM5A/83mdCQVwcT5SqwQjZekPZe5HG1h35YFLr/uWO wnmP+mB03LtsG0K1bSW/bAoFLEqqxFfoqB151qs6nHidkvOWUslSpVvMDccIoQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWzoo-0000bN-3u; Fri, 18 Aug 2023 09:47:14 -0400 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 1qWznn-0000SI-0h for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 09:46:11 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWznk-0005fn-9E; Fri, 18 Aug 2023 09:46:10 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1B161801CC; Fri, 18 Aug 2023 09:46:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1692366360; bh=1NgyzOUb+C8Q6aByf/cWTtultzelFpHX/AIif8OkTOI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bQwkiT548zpyK8eIE9s4vtyHh72aApzH3mgG1xJ6WlSSW30QxsW8SsSb3BiX3L7wC oz49biKdPoFhJju8OTEIwfWCVOym+oIzSBJv9wpYcjwE062Tqy23llIw5yQPfc/+iM euQ7CYpLz7hNVYSkZp3i6ptOi7UIxfpwtc/ClL14UHjJhi66umRVI02k47h08VHrOH JajlBdx53TOLjviHXZHC4qcP0XXDfq0z7Tj83x6Yvp1Ekyq/0Z4Fvyx6WnWyCMgiZY gsC79iv0YCLcFF9kBiUMomMVIoGxT+FID5HRnBDma/ue8ssfiqpz9YwFKFJLqtEr8k Twl7cgM2D80bA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9F0098027D; Fri, 18 Aug 2023 09:46:00 -0400 (EDT) Received: from pastel (unknown [45.72.228.154]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6AFDB1200D7; Fri, 18 Aug 2023 09:46:00 -0400 (EDT) From: Stefan Monnier To: Ihor Radchenko Cc: Tom Gillespie , "emacs-orgmode@gnu.org" , Bastien Subject: Re: org-assert-version considered harmful In-Reply-To: <87a5uoa30p.fsf@localhost> (Ihor Radchenko's message of "Fri, 18 Aug 2023 13:33:42 +0000") Message-ID: References: <87o7v4dvon.fsf@gnu.org> <87pmfijrvw.fsf@localhost> <87y1u4ec18.fsf@gnu.org> <871qqnjjdw.fsf@localhost> <87zgd85vc9.fsf@localhost> <87359yl2w5.fsf@localhost> <877cz7jucs.fsf@localhost> <87h6oznt28.fsf@localhost> <87r0o3p3bv.fsf@localhost> <87zg2oofmt.fsf@localhost> <87a5uoa30p.fsf@localhost> Date: Fri, 18 Aug 2023 09:45:59 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Spam-Score: -10.63 X-Migadu-Queue-Id: AA9CF54A9B X-Migadu-Spam-Score: -10.63 X-TUID: YBN8EnKU7JBy >>> But then it will not run during byte-compilation. >> Yeah, I was assuming that you had replaced all `require`s with >> `org-require-with-shadowcheck`, but that's probably not what you'd done. > That's exactly what I have done. Ah. The issue comes from the fact that `require` is treated specially by the byte compiler, so if you define `org-require-with-shadowcheck` as a function it indeed won't do quite the same as `require`. The way `require` is treated specially by the byte-compiler only affects top-level uses (making them behave as if they're wrapped inside `eval-and-compile`). So you want to use `eval-and-compile` only for those `require`s that are at top-level. Personally, I'd only change those `require`s that load `org-macs`, which should be enough to cover almost all cases (and I wouldn't just silently reload the file, but I'd also emit a warning explaining that we detected a bad situation and using a workaround since that workaround is not 100% reliable anyway). Stefan