From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4DXEL0c1I2N/VQEAbAwnHQ (envelope-from ) for ; Thu, 15 Sep 2022 16:23:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KHHTLkc1I2MsmwAAG6o9tA (envelope-from ) for ; Thu, 15 Sep 2022 16:23:03 +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 540D659C for ; Thu, 15 Sep 2022 16:23:03 +0200 (CEST) Received: from localhost ([::1]:36530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYpld-0000n9-Hl for larch@yhetil.org; Thu, 15 Sep 2022 10:23:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYpkG-0000mJ-SY for emacs-orgmode@gnu.org; Thu, 15 Sep 2022 10:21:37 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:41963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYpkF-0008V9-9h for emacs-orgmode@gnu.org; Thu, 15 Sep 2022 10:21:36 -0400 Received: by mail-pf1-x432.google.com with SMTP id l65so18201215pfl.8 for ; Thu, 15 Sep 2022 07:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=N68JEzbUNqXOhHf+mvshITdgqAUVqVdy7eZFtDQd00M=; b=iuZ1tLxx6RrZL6mWOer33OE2SIemUdjhzeznlj9z3fvH/KSZbMBUx8p+RJ78gGWpGh cYHREOiY0JKwmk3hF7VE/myG7fYy/yDaAbD98U/CQu/aRtqZ7gTkw4T9yU23O2Rzx03i nUK6DECgGd/AUjyPv8ygSVm0SzCYeWGvbFLT7oGVfvSRHI/kfrB93zrl4wLHxeG1cLxZ ETfmeWCn/huUp+CTljjZJLypzNX+C+FFXeqIPj4J54MEDJALXf0uujqFKjSdwXxcQdPe 9JDUPWJcE9LSTS1YJhw8eaShefmCMAQ0t3hz9/Zy2ZfExU1x3chDHdEviQoyLSccAC6d bJgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=N68JEzbUNqXOhHf+mvshITdgqAUVqVdy7eZFtDQd00M=; b=38gCERRLeDLMU9eDpD1Cu5lAfh2b2Ehum8Lw+2UzANomf+Riz/XEXhFzSSn7OeIIPX yVfR9kI1FXTLZEcnN4gPomQ8Y9cUBsTk0lEk171GHWHaEKbuLpdMzej4/oVLBBmgv5R2 8QVcSmRazdmaGPkq7M2sPgMLyAsntQCoW3NFrrnW4WJxd4HJ1k1vWTPKxQ6/dGRBTxtm aJenRbxSteINsAxtT83Y6Ihr0pYazMQATdlNGXwjxSPn8/WosKjSQKaW7V3u5oj9ryS4 hf+6a/gw+GleclzjmUFdNVMEUhqLL/AgAfe/nV+KZ9URloHExZanm5awvaYZCROoJZup Hh3g== X-Gm-Message-State: ACrzQf1r1yMSDFMtv1GxWbCnn8zwHXXsNS1sLeP9bm8/oQ3OtTTNBr6l 0e8i3j/vlvivdsUWZZWzp/+n/iVif30= X-Google-Smtp-Source: AMsMyM6oB6JThil5v7AIp/s8P7yfnIvXZLHcpcoQOTaZONhlyNM4pQpdfHvWY7Ib8/KcBt1qlL59Hw== X-Received: by 2002:a63:fa44:0:b0:439:2fa1:d9b3 with SMTP id g4-20020a63fa44000000b004392fa1d9b3mr133305pgk.110.1663251693905; Thu, 15 Sep 2022 07:21:33 -0700 (PDT) Received: from localhost ([2409:8a70:2bc:c850:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id g186-20020a6252c3000000b00541e7922fa0sm11378275pfb.191.2022.09.15.07.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 07:21:32 -0700 (PDT) From: Ihor Radchenko To: Stefan Monnier Cc: emacs-orgmode@gnu.org Subject: Re: Use lexical-scoping in tests In-Reply-To: References: <87illqxhje.fsf@localhost> Date: Thu, 15 Sep 2022 22:22:22 +0800 Message-ID: <87mtb0vhsx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=yantar92@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663251783; 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=N68JEzbUNqXOhHf+mvshITdgqAUVqVdy7eZFtDQd00M=; b=Jr6/yW1iPZN4AR5n0o+LSQ4mkGTMebWJHeiMvK6eHuiXvCbgFFsklu/oTyFY4/1sBNpGD1 bCq3V8BSR0ZzupArtnzIYaG6DSD9hDswCBtPU9WknK+jSLQIxhBJOUQaPYvNMBCeskbud2 OxjCEL0u2GTfP27ZGA8JVa3GN6uYtMhk1GFjUnMDt+ZRya04SvJsRgeQ9x8mZWAWbcX9gj nCvqoNKdJmkt3uZiNUTalHpQjw0EflTystvtUH5+Jl78J2CFWjXJ7GYiuok6IGAYpi4Y7S OWGIn4Usd1SjLToDKoZelXSK9wjDDgm54RNWu5eNuVQISz0Pst+AMHtO4SAJlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663251783; a=rsa-sha256; cv=none; b=M2wbMGhm10TXfgPOrpHJygONmdvCAMWEqEgdVamO6sBB3U5Y0SvMVTb45YzFcVZYr2r4Wh 1umBxN5FRpGWaO2ysuH8RM5RN6/E0tyI1XbY5Nk3Hr18kxWvkM58pjnNqh1Noiwg329XuI 9jPAq9yCX7h9ronbU+FzUL0rgxwI0CAwCAnzPrHfLfzSEcbgAlEOhCTtTZxgyqb1tRbOS9 m9zpUUfT0SPDvbiVeKlhe0KYFCULOHbwz42cQHZAFMZjaujb+qGu0hY5Byv57g7doSbpNn KKXVrGUllQVjXznlpA3lCML5LE2nfRYhPZMZAf9Yc3uDlfw7cm5vf7oS7PNfPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iuZ1tLxx; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iuZ1tLxx; dmarc=pass (policy=none) header.from=gmail.com; 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: 540D659C X-Spam-Score: -3.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: Y/k9Sp/MkQRA Stefan Monnier writes: >> The fix is in preparation, but obviously I had tested my patch >> incorrectly (i.e. I probably compiled and tested another code than the >> one I had patched). > > OK, here's a better version. As you can see, it's not nearly as simple. Thanks! This new version passes all the tests on my side. However, I have a few questions about FIXME items. > + ;; FIXME: `s' is a symbol, so (car-safe s) is always nil. > + ;;(when (eq 'autoload (car-safe s)) > + ;; (unintern s obarray)) > + )))) If I understand correctly, the intended version of this code is supposed to be (when (autoloadp (symbol-function s)) (unintern s obarray)) the idea being "unloading" all the built-in org-related staff. However, make test will be failing then with byte-compiler error. I feel that the idea of the code is reasonable, but some detail of how autoloads work in Emacs is missed. > + ;; FIXME: For the rare cases where we do need to mess with windows, > + ;; we should let `body' take care of displaying this buffer! > (setq buffer (find-file file)) Could you please elaborate about this fixme? -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92