From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IPUQEbFH4WGzEwAAgWs5BA (envelope-from ) for ; Fri, 14 Jan 2022 10:51:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WIDICbFH4WEy6QAAG6o9tA (envelope-from ) for ; Fri, 14 Jan 2022 10:51:45 +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 6120D3E553 for ; Fri, 14 Jan 2022 10:51:44 +0100 (CET) Received: from localhost ([::1]:38156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8JFH-0000rg-H4 for larch@yhetil.org; Fri, 14 Jan 2022 04:51:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8JE2-0000PK-66 for emacs-orgmode@gnu.org; Fri, 14 Jan 2022 04:50:26 -0500 Received: from [2607:f8b0:4864:20::1031] (port=42570 helo=mail-pj1-x1031.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8JDy-0000Yy-Up for emacs-orgmode@gnu.org; Fri, 14 Jan 2022 04:50:24 -0500 Received: by mail-pj1-x1031.google.com with SMTP id a1-20020a17090a688100b001b3fd52338eso12532163pjd.1 for ; Fri, 14 Jan 2022 01:50:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+zsMa5TGp3VBc7ugzgfxVKZRLCXZGMW8rllpFkPQ0kg=; b=HUsbEASuOQYWaz1LLhth3ntC719XvI27ryIQ76DMrfc6mX+F0w844DyD9wn4x9/HEF hB8N/Qp5/Z7MdA3ov/H/NHngZ5N3/fXjqK6pMR/UDUvY7x79EspB46eJr0M5NYjkrvWR zMSO62Yg7PC0ea81itEjB5A66zNd+OtTKW+I3aMY4cAd35kIME5loi/IdjEFwHYkVK6s 7pZJfez3fvvdSRXti6ddpoDJqIY3bahEG67wca/sNnAsEDT6nAIY4UYtLg5BWwHpR0HO MOn5faE0IXg+QjvnyWiYqy9AmFEOZAx8yabp23aoOsgsTpLXRwBjWOo9jd3O9jd0cpIS +FDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+zsMa5TGp3VBc7ugzgfxVKZRLCXZGMW8rllpFkPQ0kg=; b=ZtBLks92dDyf4AKfnS0/3ENHHC/t7tP+bJqMKXDIRV2EnpMpp7XTf+8ZfARUvyGQxU 5DCzVNrvfOfIMgdLJQdGoVRrmspHn/tB+prf9UiYiJQHP7CiOkflT5LX76XAtBe2WAzb wftV7NYPSCtfzwMS9gGQkgv6mUvnX8ptzWOghbKQYR3JFDnrwA4bC7yhrEZqMKP0xVOp J5zUCJT/9YVfFqL7h2IWcTeexZQ91JcoQ42h6DS/zZG9uWOiyeqln4mgW4ZVNsL9OUAc XR8j7HUqM6KOpNl7FRV8ivvUZgnxdfOqfbCbc0n99pOKLqSY9ItvSrfB8drHKCPXl0Zq D4BQ== X-Gm-Message-State: AOAM530Q8e6lCKzHUanogQQCd5HWM/m1HWDBXXTIOqOpY8bblitZ7KM4 BmS+2JlRnyAZAEB1Di40eyPoPw== X-Google-Smtp-Source: ABdhPJxeePEi1nZ2/MT8c3JQUPgIgGf+q59zMcL+BR7hFn4cBjSQGgEO1quQdy06p+9rLZfEHZqfFA== X-Received: by 2002:a17:90a:db0b:: with SMTP id g11mr19233657pjv.46.1642153807204; Fri, 14 Jan 2022 01:50:07 -0800 (PST) Received: from localhost ([2600:1700:7270:7d1f:fa59:71ff:fe00:10cc]) by smtp.gmail.com with ESMTPSA id s21sm5282165pfk.55.2022.01.14.01.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 01:50:06 -0800 (PST) From: Allen Li To: Ihor Radchenko Subject: Re: [BUG] ob-tangle overrides user customization of org-id-link-to-org-use-id [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)] References: <808rvm4jr3.fsf@felesatra.moe> <87mtk24hxm.fsf@localhost> <80v8yqkssa.fsf@felesatra.moe> <877db5ow26.fsf@localhost> <80a6g09j29.fsf@felesatra.moe> <878rvj5aa2.fsf@localhost> Date: Fri, 14 Jan 2022 01:50:06 -0800 In-Reply-To: <878rvj5aa2.fsf@localhost> (Ihor Radchenko's message of "Fri, 14 Jan 2022 10:19:33 +0800") Message-ID: <80ilumeje9.fsf@felesatra.moe> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1031 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=darkfeline@felesatra.moe; helo=mail-pj1-x1031.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1642153904; 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=+zsMa5TGp3VBc7ugzgfxVKZRLCXZGMW8rllpFkPQ0kg=; b=cifmoYzSE3zHSCvc67rakeytYtOHXsakA6nwCa8SZcty/ZBpcxl+ItItGznSNqWIZo+2XV 4QSH44BHcC8C7edIa4GHACAseD1x58WAejO8DSVFF/gu1L9enl5sm5AWoG3po//6Xwm8Xk hvyRu1dTZVORoj2laB4oxLKo/1tY/IZXgnHj3R0+VbwkdcoCkzFPLhhpvjEzWkwzamu4uY 1EUx/2ImsfVdwDGSfT772/eHqA9OkIU31juyVKLTfFON/ijUYRCStaSJZJiftTu5l8xeHW 4VbYsizOolI4t0DLPj05NS+ImYC6GGv8QJZeXFUnYDN+aS8hbJwyFy40eaKxXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642153904; a=rsa-sha256; cv=none; b=H9iaFSk9hIg78mfktTbWOWR/45xgt86BOdpX+H/93zGId+Y5ZWyPoJlmwSeb+2m4DB/yVy We559nDDmgn/7WS4+dIGtARkcrjUZEsD2JxqWTOzFDridxUp1G1uLrTBL+TUu5W1UOpzm5 tM14YV9uh4V4uYwCI7DAlDTRCYCRl5B747oxvR9OFIgGKnUKR+II4EAXaufXWz1hypooPB 8yJshwwPLZHMeqfKWEOEX7n2dFADvG2WFad9AJ+u+l2evht05Hd46g9uXRJoeG/apDdmZR U++48FmVP55RdvBUNfnm9/cZwdvxYfFucGD2qYxuuyA3GnmTEDEXFhVYSvxWHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=felesatra-moe.20210112.gappssmtp.com header.s=20210112 header.b=HUsbEASu; 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: -3.82 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=felesatra-moe.20210112.gappssmtp.com header.s=20210112 header.b=HUsbEASu; 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: 6120D3E553 X-Spam-Score: -3.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: mtDuZKzrB3aN Ihor Radchenko writes: > Allen Li writes: > >>> I agree. The question is whether changing to >>> (defvar org-id-link-to-org-use-id) >>> solves your problem. >> >> Thanks for your concern. By editing ob-tangle.el, I can confirm that >> changing this does solve my problem. >> >> If I must, I could provide a reproducible example, but I feel like >> that costs unnecessary effort on the part of everyone involved if we >> agree on the above point. > > Let me clarify what I am worrying about. > We have 132 occurrences of (defvar foo nil) in the code. > I am genuinely surprised that changing defvar fixed the problem for you > and at the same time nobody reported similar issues with the other 131 > defvars. That's why I really want to get a reproducer and understand > what is going on there. So far, I don't understand how defvar can break > anything except in case of some strange compilation/mixed installation > problems. I see. In my opinion those occurrences should be fixed even if no one is reporting issues because it is bad/improper code, and it is not especially surprising that no one has reported it yet; there is always a first person who reports a bug, and there are always more old bugs to be found in a big project like Emacs/Org mode. This is annoying to reproduce because it relies on the normal Emacs startup process, which loads packages. Anyway, I have found a reproduction. This is using the Emacs install on Arch Linux. GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) of 2021-03-26 Have the packages org-9.5.2 and org-contrib-0.3 installed in ~/.emacs.d/elpa. I have these installed from https://elpa.gnu.org/packages/ and https://elpa.nongnu.org/nongnu/ respectively. Start emacs by loading a tmp.el file with the contents provided below. 1. emacs -Q --load tmp.el 2. C-h v org-id-link-to-org-use-id Note that the value is nil instead of the expected 'create-if-interactive 3. Press RET on the customize link. Note that the Customize UI says "CHANGED outside Customize." Expected behavior: User sees org-id-link-to-org-use-id set to the value they saved in Customize. Personal aside: It is easy to get subtle bugs in between autoloading, package activation and Customize when some bit of code is not following all of the right conventions. I suspect most Emacs users are adding setqs to their init file until things work. Meanwhile I foolishly read and follow all of the conventions and thus I make the above claim ("It is easy to get subtle bugs...") from my experience running into other bugs like this one. Hence my stance on fixing the aforementioned 132 occurrences, lest they cause yet another subtle bug later on. ;; tmp.el starts here. ;; This is usually called by Emacs before loading init.el. ;; It is skipped when using -Q so we call it manually. ;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html (package-activate-all) ;; This is added to init.el and is the standard way user ;; customizations are saved/loaded. (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(org-id-link-to-org-use-id 'create-if-interactive) '(org-babel-load-languages '((emacs-lisp . t) (python . t) (shell . t)))) ;; tmp.el ends here.