From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 KAw8CL+ZpGJlxgAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 15:33:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8KQrCL+ZpGKe6QAA9RJhRA (envelope-from ) for ; Sat, 11 Jun 2022 15:33: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 BB50316750 for ; Sat, 11 Jun 2022 15:33:50 +0200 (CEST) Received: from localhost ([::1]:56780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o01FN-0005PS-RC for larch@yhetil.org; Sat, 11 Jun 2022 09:33:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o01DL-00046V-PT for emacs-orgmode@gnu.org; Sat, 11 Jun 2022 09:31:44 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:35813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o01DJ-0007fR-If for emacs-orgmode@gnu.org; Sat, 11 Jun 2022 09:31:42 -0400 Received: by mail-pl1-x634.google.com with SMTP id o6so1476194plg.2 for ; Sat, 11 Jun 2022 06:31:37 -0700 (PDT) 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=zX/3Z1ct7e/6zzPEt0J0VqSWknRxTbB5/8dwY9l3kVs=; b=nLt111ZlSf196tJxm+ZQ0SUyzedORW8YXno+KU3ZtgPK4z4HIkkAPmQ2ngKd9sxvaS uQ4vk+KotTM01Mab25yCHNSXMCIvePafonUJy4sNq/U2xg2omazjjmjYlivr9AbOYYTv E+yHBmz8smLcjvEphodexz7TQcGC/QC37zKzqH0r8Tcue7NUkvyy1jrBY6kIXuNo+szV uM71jN1uHDhAzXgXTPXzb1G9v/Qe6CYAv2xlx/LKIIeq2Mkha3gh5bmm4MKK/8R59P/J ouo60xUstg5he+dD4BNx2PxerXuwJgTXFgLqUOTkAxmzWv39xCb4L4bfDLjS+4vAY/6R x0Jw== 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=zX/3Z1ct7e/6zzPEt0J0VqSWknRxTbB5/8dwY9l3kVs=; b=nLvYzPZj9zNYlCPcf1ZBJf5ygVOzAh2FpQybGnokIG/abECmbcHBN0cB8sYuA2TE0M 7rT0et8ffOkBgmCylaws36hMOqWC1TJGwtl3zZZ6cuQ893F7EhUdmUEuT4DZC1dsbZgA WoPOwdVHEMtgSFTKoG7ClFOeOIQjK4GG45ol7PcXi4k0Au6i3WJGxStY9K4y6q+pt+KH FFUptjp2C7stY0JHc4ClLJXAutbf7u5Afq4d9JWK3KSZNGWyq8BT1E+2L+Rr6bX/G694 oJynz1XRo55V7vsimdGxxfVK88MUTDtuMy4+Dq176z2XzBKMtsa5vF9Vd70lt9eKf3Q/ IwmQ== X-Gm-Message-State: AOAM532tYTEn4rZNEWsfgUF8Y28VhPSjSPDwj7Y4fhH1iyj4rIiLKKbd IgZp9KI9yAKHg1S+vBcyzUI= X-Google-Smtp-Source: ABdhPJzF/nRLREpitVs3qxZpuSwEy/QSkHXFJ9524gvv8xaYV39YCFPprastaneu2PBGAzxwrjoeFA== X-Received: by 2002:a17:90b:2247:b0:1e8:9f24:269a with SMTP id hk7-20020a17090b224700b001e89f24269amr5247357pjb.14.1654954296427; Sat, 11 Jun 2022 06:31:36 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id ix22-20020a170902f81600b001677fa34a07sm1527179plb.43.2022.06.11.06.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 06:31:35 -0700 (PDT) From: Ihor Radchenko To: Ignacio Casso Cc: emacs-orgmode@gnu.org, Max Nikulin , Tim Cross Subject: Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)] In-Reply-To: References: Date: Sat, 11 Jun 2022 21:32:15 +0800 Message-ID: <877d5nba1s.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=yantar92@gmail.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, T_SCC_BODY_TEXT_LINE=-0.01 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=1654954430; 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=zX/3Z1ct7e/6zzPEt0J0VqSWknRxTbB5/8dwY9l3kVs=; b=a3PZOj+mc5ZLiqjEMrwSPn+Dwmmxj6Gx5g97xX8IAtMNFObOSLY72azOhpoyBd9cXkS7Av /GNpCxH93eZbFR3aCxR8yrm1ddfG2FkDxHaWv1/XeBGzEwws0JFCMapjyU1ErAaKUKeISm MZpRbd1eYTh5Sr0BRcPvvTojC3L/fhWSFws5pyoJokF2+gYs5UPxxJIxyx/yIOPmXNat8e pVy74KWCfQTA6jBuZXVsS9XNoAKZwqeYQqeWvwsYe9OUH2iOtN4K/7uSsWpENa2deNBAV5 a7c7ix+Lt1IUkRUNGkOitwzYdF+tIJkyDhP014fetgsiQbKmmCHqd4alYZJfYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654954430; a=rsa-sha256; cv=none; b=dNtSFGlJSj1kvvW63T1/0vXwKjTaP7TqsGvEAxjXL/3wPLJ/MJImsDLsRDdRPBpKMbLnEl zcy7zxjoO16g79C9VoLjyl0wC1My4Cxs654XOVvCmhD0kAcVir4ZReLSHPaj0XYFI52kMa omxPuEbletSJW7rQXgZiABip7Z10krpCY1uKdzYpdZ1sbE2zYax8aJG+FTqBT+H8zUTfb7 jPz1CHGnu0WC9ltVpusn6eDLjingOpYYs3I88354DH6Fyfm5CADUfhjkK7LdZRcdSby5GU zPMoTcNUVdXeAIj7HJ+u2/y4Agz159Y/T0x23wSi2FTGpHavkNaRBaO6ZQC3Qg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nLt111Zl; 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.48 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nLt111Zl; 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: BB50316750 X-Spam-Score: -3.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ge/h8Iy4X9Zm Ignacio Casso writes: > Then we should decide if we want to use autoload cookies for custom > variables to make this work also with lexical binding. Otherwise, code > like the snippet above would produce an error in Emacs 29, and in Emacs > 27 the let binding would be ignored (although at least the custom setter > would work). I have no opinion regarding this last point since I don't > remember what were the disadvantages of using autoload cookies for > custom variables. AFAIK, autoloading defcustoms is not discussed in the manual. I have no idea about possible pitfalls as well. > I've prepared a patch for the first point, which I attach at the end of > this email. All changes fall in one of the following cases: > > - `set-default' -> `set-default-toplevel-value' (as explained) > > - `set' -> `set-default-toplevel-value' > > The same, but in this cases there was another bug: If a buffer set the > custom variable locally before the feature was autoloaded, the setter > of the variable would not set the standard value as the default for > other buffers, and would overwrite the buffer-local value. > > - :set 'set-default -> nothing, since it would be already the default > > I don't really know what most of the variables whose setter I have > changed do or whether it makes any sense to use them inside a let > binding, but I have made the change for all of them nevertheless, since > it can not harm and could potentially fix a bug. Feel free to restrict > those changes only to those variables where it makes sense, such as > `org-capture-templates', if you want to keep the patch small and simple. LGTM! Unless others have objections, I am inclined to merge the patch fully. But please add changlog entries to the commit message. Best, Ihor