From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 GAosG6t/32RJLQEASxT56A (envelope-from ) for ; Fri, 18 Aug 2023 16:26:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YGHjGat/32RVfQEAG6o9tA (envelope-from ) for ; Fri, 18 Aug 2023 16:26:51 +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 1FA4857491 for ; Fri, 18 Aug 2023 16:26:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="H/y5oDse"; 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=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692368811; a=rsa-sha256; cv=none; b=oHXqjI1Zhr7xFXU54K0aEFSul7N2/jf4FRSeTh64RiniNKO8O+fvnQ3MCTu0kTBLEtF0y6 GcsZ6DrANAl5mDzfY9g/9JpalM5YZ7ZifoOMRCVLOybTP3RC94hJbApcReoS6JqAktGzZ5 hHPtrk8QZ3+O+7wc1rKUwe7qDfzC+GywA3eFUUW0peA2txRa/Asw0eqiVD7jvTDkxZ4tjT b3d93mj015CEvlXBp5kUEDFxA6U+zH58Gx96+V0SBSbX0DiPv+0899QTrKGXoIAEJ30I0g W9XV1IEf1l7TTuckAcM2fCNye/zPVDpbZlFL16LBrb9lmBiPw96q9v+4ltZSIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="H/y5oDse"; 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=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692368811; 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=07gbrqtGiVSsb7ZgStcJOy+ta+K8Y5aspkWsYAZekvE=; b=DxjSEN/WHez+5Pc8oXUmfNgG4f6MXPijKAh3jmrhqUfiZHzz1GxG65EJ649OxWgmjMZVA2 26tdx6Vzfww90hMgjKIrUVAx1GAunGFjrd2c48JR2hRdW3kBBC0YPubutnE2eMlzPpsM2R jlmF+48WXDdk291HquvHXIkAFwUrTeypyJMwb1DdtokUT8I3/r8+GCDz5mxqb6idadRGqR mRyS/hokI6HuTGeimzvVcUAsCd9aQJmIsCEQ3AO9ZOypTxp7rMP2b0i/AkuJbRTIYmphNx YB7gr6J4ctHxt+ORpOPWsykBgEp/Bod+AIhQrOncbxbNQVNqy7lHAaM28We72w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX0QC-0008NI-3P; Fri, 18 Aug 2023 10:25:52 -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 1qX0QA-0008N7-KH for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 10:25:50 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qX0Q7-0001RU-RU for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 10:25:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4DB4C240105 for ; Fri, 18 Aug 2023 16:25:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692368745; bh=NUuIPnl59QCAWNqLXpcihYaqquKLT3tgHCtx3fKAGXw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=H/y5oDseW+EGO9w3Fw+UXXBO5SetP0R94jkN70kDq4cPndI0hinE0jxgNy6cRa36k jWobxy/6Y3MjVxDM47f7WttII5J4/bOkHAcB+KbdoUwavg6YzjezAdgE02aRt1JCWB dnyf5YGMso4rCxQBZ0JBwMl9bolI3QqbaXjA3zs93kKz8c8ZIEBDHHyQNOhhIyVM8o kT3joLSQxxUGKTnbEsND3d9EZwIJ6gtaumda9oZBzaOJ+pX0Lx3BJUK3pk4weJvfWd M6UR3GKFdm/Q7rDaNGDzToJQ0HKx4ugNBXW+fKFDg4tU7zFq2LojTX2D1evQBg4PGs jLLqwLYtL9ANg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RS40m51hLz9rxK; Fri, 18 Aug 2023 16:25:44 +0200 (CEST) From: Ihor Radchenko To: Stefan Monnier Cc: Tom Gillespie , "emacs-orgmode@gnu.org" , Bastien Subject: Re: org-assert-version considered harmful In-Reply-To: References: <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 14:26:10 +0000 Message-ID: <877cpsa0l9.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: -7.53 X-Migadu-Queue-Id: 1FA4857491 X-Migadu-Spam-Score: -7.53 X-TUID: QiW0/xDA4tVE Stefan Monnier writes: >>>> 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. I see. Then, I can resolve the issue simply by (put 'org-require-with-shadowcheck 'byte-hunk-handler 'byte-compile-file-form-require) > 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). I first want to try the most generous way to reveal any potential pitfalls. Like recursive load that is still happening when I do 1. emacs -Q 2. M-x org-version (built-in) 3. M-: (push "/path/to/git/version/of/org/lisp" load-path) 4. M-x org-mode 5. Observe recursive loading error -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at