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 yC7JK/D03mHZAgAAgWs5BA (envelope-from ) for ; Wed, 12 Jan 2022 16:34:08 +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 4Pp9JPD03mH27gAAG6o9tA (envelope-from ) for ; Wed, 12 Jan 2022 16:34:08 +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 4E8921748E for ; Wed, 12 Jan 2022 16:34:08 +0100 (CET) Received: from localhost ([::1]:36290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7fdX-00054a-8U for larch@yhetil.org; Wed, 12 Jan 2022 10:34:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7ekn-0001XC-Ct for emacs-orgmode@gnu.org; Wed, 12 Jan 2022 09:37:33 -0500 Received: from [2607:f8b0:4864:20::102e] (port=38651 helo=mail-pj1-x102e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7ekl-0001cU-Vy for emacs-orgmode@gnu.org; Wed, 12 Jan 2022 09:37:33 -0500 Received: by mail-pj1-x102e.google.com with SMTP id l10-20020a17090a384a00b001b22190e075so12436392pjf.3 for ; Wed, 12 Jan 2022 06:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=RkZpPTeJHGwQE1s+2cf3Z4qYXXJuVc3zsh1Ci5VBRbU=; b=An+97siS0CSG3laTsd/SO03D8qpf6vQWqUd7OSpbmkYXDDHQO59gUxNX6FgPI5j2Yy 5JVTbfztMZtTLKW9G9Dv2M24RzaWiFEHfUuAJtVn8rSTnLVXje+ZE92gIRWDMBOeMVNp qKw8JiT2FBO43/zgZAPb62mwFVO0le9dJcCQdM6tWRZWcmAX4a7HR0nElK7abuSc+RnM KKOCeG3mvSfu0yryc/zXLbwy34Dyr1scp2jJTZFU0ORhwmyizRBcbnZMG32Ks0O2HFpu x6TKkJgG68GWq5SNp/dJyMArxO84qrbA+ZrZ2ccknFu/vBbY/fm6XBRzw3XJCtLQiVPJ TMTA== 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:in-reply-to:references:date :message-id:mime-version; bh=RkZpPTeJHGwQE1s+2cf3Z4qYXXJuVc3zsh1Ci5VBRbU=; b=fifvbTJoYqAhbo6a/pKhC1jXaanb8u+mA35E7W6pNFFZPnxHKqg26uFHENO6Dj+5xO St9ERP2hJhJRLIoghYDeU6lu4pUBwyj80jlB6Paa/Qh4ZBMy4W5EMU4PFCRA1nZVPWl9 +tB1QgbdPn+AEAUveckJfsL5NVqoGcYK/WGIEF/GcLiE3+8TVIRTuQ+4wbSG4g63u3UC iO5Cx4ltCeju2JFWIy08NctE0NISvvv3zuM6ZMT7+IcWDEKWnI4UBdyomlQoqHptcdnn Ze18s0RBzoDX9cKJyRsnCTMakNOkIGsJ5SCxOxMZfo6G6Bs6oQILm+hooxNEMLl4r/mM KPaw== X-Gm-Message-State: AOAM533Zafxpidx2/b0H4fDnxQbxxWurCa3uyrPMLGVtnOfC3l8l2Guk DbunK/f2W4NBQEdOZf8Ln1I= X-Google-Smtp-Source: ABdhPJzk59xbBiwtiPr+1ghhNOxKb8Kb3WJ8SLLRZOHaoxm7cyDOjpTjzC+qwUxYhEyTUJOIfPfItQ== X-Received: by 2002:a17:90b:1893:: with SMTP id mn19mr9067846pjb.103.1641998248596; Wed, 12 Jan 2022 06:37:28 -0800 (PST) Received: from localhost ([103.125.234.210]) by smtp.gmail.com with ESMTPSA id x2sm756624pjq.40.2022.01.12.06.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 06:37:28 -0800 (PST) From: Ihor Radchenko To: Allen Li 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/)] In-Reply-To: <80v8yqkssa.fsf@felesatra.moe> References: <808rvm4jr3.fsf@felesatra.moe> <87mtk24hxm.fsf@localhost> <80v8yqkssa.fsf@felesatra.moe> Date: Wed, 12 Jan 2022 22:41:53 +0800 Message-ID: <877db5ow26.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102e.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, 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, 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=1642001648; 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=RkZpPTeJHGwQE1s+2cf3Z4qYXXJuVc3zsh1Ci5VBRbU=; b=TMZoFocahp7m5Lu1kxHX0emVRlJMtQi6iNKTdp60g7xs3ggjlebKdDRfDu8XhhzaT/HttD koBFO9LjNtLxDb9BknigTQKjqaxuO2oiiTY8ERaGrqMEOxWsWKNhiQhOX04HPOM4k7aYwD GGwwEghXmFDK+md1gnieNI9fUgNj8nf/P5bgwlsBCZTOC0boEEJrYlTDmeT7hCsco8dWxS aHraN1UoWOBd/HomX6sNUlO8xOJcV0oPAxaFz/jYIGzWIyIrj4qs0cmkNS+jWbPyvjYIxl UgVazlejaaYCwYruF49UynEptzVWBapsLUdQc+tt79f8CRSImwEcS9Di/42/ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642001648; a=rsa-sha256; cv=none; b=fmJcRi4Fb9CF2AxI0f8S42VZelROnzZgaPjXNsgau9WkVMvgIpZpCMTninNq4kparrGPH2 OdyNcwBY0+Pjb8WdUhg1A2LTAWN+QqAkPwFDQ4foiudvs3z5z9IQzzRorqSThUZMOH79s8 Jmqlp3Jv4MsGCsJESgCPyJINZbzVHtkpcbk+ZuiZryyaR+quVYtrNS7PMRWDJRD/GytZ1J inspmJXTdB0/U8iZIN9GoQbDTuXG5l+Qn7dhCGJbI4ygWTC21tq/QKm1L9g1pG1/sNjAB8 7G0NcdS9PqsPGeOwV06lGpf+8Q7CXjMU8FjCdZjE63/q3Ys4DachHG5WHeKpbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=An+97siS; 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: -8.82 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=An+97siS; 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: 4E8921748E X-Spam-Score: -8.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4t/Pydxo3rAh Allen Li writes: >> Allen Li writes: >> >>> In ob-tangle.el, the line >>> >>> (defvar org-id-link-to-org-use-id nil) ; Dynamically scoped >>> >>> appears to override the user's customization of >>> org-id-link-to-org-use-id. >> >> Have you seen this happening? > > Yes, that's why I filed the bug. If you saw this, then the root cause is probably not in defvar. Are you able to provide a reproducer? >> defvar only matters if the variable is not yet defined: >> bar ;; => error void-variable >> (defvar bar 'value) ;; bar = 'value > > Yes, that is so. > > Even if org-id-link-to-org-use-id were always set at this point, there > would be no reason to use > > (defvar org-id-link-to-org-use-id nil) > > instead of > > (defvar org-id-link-to-org-use-id) I agree. The question is whether changing to (defvar org-id-link-to-org-use-id) solves your problem. Best, Ihor