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 kEUFB3vOimPkOAAAbAwnHQ (envelope-from ) for ; Sat, 03 Dec 2022 05:20:11 +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 gFkQB3vOimNDYQAAauVa8A (envelope-from ) for ; Sat, 03 Dec 2022 05:20:11 +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 B3CFDEC99 for ; Sat, 3 Dec 2022 05:20:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1Jzd-0002bk-1H; Fri, 02 Dec 2022 23:19:13 -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 1p1Jzb-0002bU-8F for emacs-orgmode@gnu.org; Fri, 02 Dec 2022 23:19:11 -0500 Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1JzY-0005HX-UT; Fri, 02 Dec 2022 23:19:10 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1670041126; h=from:from: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; bh=ASsOS1uEeImYKPejTWapFb+pklTldusCueISQq80SOs=; b=rwr3/35IV4OqHgYz0frq5fc7Lw142SuEAU4PGhnjevgmGi83eWWjEmWBO8cUUAiJ0Wua+O 2FrE8YeZj4Ja2Co+fLZlgxK2J6OctOZGMTsIKm3plCQtSS3kLIm3MNHeCt9+Y2NdmDx2fJ XsPl39vsScd5Vu+TT2r1kVbHnOE2D7NERi1+AV35nVY+YK1kom+lBz28OE7TJApdmfB4oB iLFOrVmhLmUGXeywtcFT3oJORyGk+GQVlnKQp24wQgAaxPrcMa86QNG6YRZC9NyKrNbwUj jVzF7nkO9CUeglBWed6W678QAet3Fea+4yT7BcW5Pu59dgY1hbsiVWWCcOhsNg== From: Kyle Meyer To: Bastien Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el In-Reply-To: <87r0xi5jx7.fsf@gnu.org> References: <874juewk4k.fsf@kyleam.com> <87r0xi5jx7.fsf@gnu.org> Date: Fri, 02 Dec 2022 23:18:44 -0500 Message-ID: <87k039glwb.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=188.165.223.204; envelope-from=kyle@kyleam.com; helo=out2.migadu.com 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, SPF_HELO_PASS=-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670041211; 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=ASsOS1uEeImYKPejTWapFb+pklTldusCueISQq80SOs=; b=jH6i5XDewCZ7DazaDGuxrQxJ4ragyyLTKN6Ne0GjBdkRNEX1Dhpv/N8sE/Owk2K2MB/yI3 mrl6Mciv9mhOpaleAT8EnAYeEGqIAV01XS3umZfhCpH78ZUjfWr9gPPbLw/bZB5TyPOhnE riOSnWLCcYjYpi3rs5d+bEMKsjkejr87BlL6GZapIsIuBkS9O9X6CPKpWetV/e7CFwXE2w TxffQaDKAzeq/VB8L4DbN103mItCRflVwmuo8iQo+UpCHrCdAly2S2aR+MlAL+XpG4vI3m 71C99KbfJrnaLNMT+8TRfZ66BN3Q2DEfFPFwZY+HTe5fEL9reCZDM3Ls56yFaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670041211; a=rsa-sha256; cv=none; b=cWq1yT38XPXuiefZuj7151VOLenRP72KKMXg70vXB6YOWVnTZJ5vQy0w429wWwoU+ClBqC rVTycwxFfrHZvVAejp87PRaKDPwgyDMlB9Sff9Ln4/VNIwpTOJQTHj7SNuuj3N5u2vECuw K1BLYqIgLg7Ffupghhcj0folME1yjzw12GMCwcsdJZg2NW8INqm2sHI8/fsw2WwF3174OF RWHzF/bx6JpRjK50K4bXl9w/E00Lq+AC0b0srqkMZvsELQ6KcGsKgrIoVFq7z7t8+it2mK 9Re1f0JK+mOYCW84gtbX2cxuYDTNDvNm0OMQRe3EAK8UMVAWUgAEw+GhhhSuZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b="rwr3/35I"; dmarc=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" X-Migadu-Spam-Score: -1.96 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b="rwr3/35I"; dmarc=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" X-Migadu-Queue-Id: B3CFDEC99 X-Spam-Score: -1.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: XE2Pc/RvXtK3 Bastien writes: > Kyle Meyer writes: [...] >> Every spot that calls org-assert-version is preceded by a line that >> requires org-macs, so isn't this error likely due to a mixed >> installation/load-path issue where the wrong/older org-macs is taking >> precedence? > > Yes: I thought `org-assert-version' job was to help catching mixed > installations, so my reasoning was that, even when an old org-macs > version has been loaded, autoloading `org-assert-version' would help > report about mixed installation. I see. So your goal isn't to resolve any errors due to mixed installation but instead to get the more informative error message from org-assert-version? I don't think autoloading will help because it will look in the org-macs file at the front of the load-path, and, in the bad case, that does not have the org-assert-version definition. Here's a minimal example: --8<---------------cut here---------------start------------->8--- #!/bin/sh set -eu tdir=$(mktemp -d "${TMPDIR:-/tmp}"/autoload-shadow-test-XXXXXXX) cd "$tdir" mkdir a cat<<'EOF' >a/foo.el (defun foo-do () (message "foo")) (provide 'foo) EOF mkdir b echo "(provide 'foo)" >b/foo.el cat<<'EOF' >test.el (add-to-list 'load-path (concat default-directory (file-name-as-directory "a"))) (add-to-list 'load-path (concat default-directory (file-name-as-directory "b"))) (autoload 'foo-do "foo") (foo-do) EOF emacs -Q --batch --load=test.el --8<---------------cut here---------------end--------------->8--- If I run that, I see: Debugger entered--Lisp error: (error "Autoloading file /tmp/autoload-shadow-test-gmlO35u...") (foo-do) load-with-code-conversion("/tmp/autoload-shadow-test-gmlO35u/test.el" "/tmp/autoload-shadow-test-gmlO35u/test.el" nil t) command-line-1(("--load=test.el")) command-line() normal-top-level() And commenting out the add-to-list call for b confirms that it works without the shadowing. > That said, do you have any idea how to fix the bug people encounter > when installing Org from ELPA and being bitten by "invalid-function > org-assert-version"? Sorry, I don't. Given a mixed installation where the org-macs at the front of load-path does _not_ have org-assert-version, I don't see a way to catch that. Not helpful at the moment, but I suppose the situation improves with time as Org versions that do not have org-assert-version become less abundant.