From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qDiEO33raGalMwEAe85BDQ:P1 (envelope-from ) for ; Wed, 12 Jun 2024 00:27:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qDiEO33raGalMwEAe85BDQ (envelope-from ) for ; Wed, 12 Jun 2024 02:27:42 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=miloZSTF; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718152061; a=rsa-sha256; cv=none; b=cE9DckcJ+jDvgvimfCRU/XCNLZ0F8Re0XLNQA8W3Zzc41Wy/pR0G+lyO469uaoXfqP6s9Y Fb53jjJ547x5aVpvNt90Ts6YfiCXhaAzgPTkJsLqN0N+eS33xyZSbLJZk8TuPZ3kpVIzCb 8SU8yvmooW8U2OWE7Nl7+oTzNuAiYFyd/vyidXvu/6fD0FiaIkD/TEeOenbN24c91t6DwB XAdte/hQZF/C9V+dL9UW0XcYb1BIOB1sRDD9RRC82igZy/qH0SiZOd1X/fUQJezcYN3L01 zVbi1jQBpOehL2jTvW24Vo0lpehDIlSWXtER1bTXVqQGcE7EfpzBrPAwNk6+xw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=miloZSTF; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718152061; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=82THZxCPGZndZFUj2ymXH+r7Y7Ujt1C+rOWbhFpOaIQ=; b=FXHdjqq5JgtEA0+vqbi0G9OJ/2eUXYr1rsGl7fTLcZhd6yeRbp4dHi3I+Ia5WndLva0nei zNbNJHReKvcMiUmh9ZONLj6su48cmHdKq/LOgCD+Q7yLsmrPsSC0gtuNL+YYXqf/wFKZBy dRPlN6SM+Er619BjxXi7Jxw4n9Dpb2id+h002fNHE2uu/hQjQi9izL4nHwHES5lboVzPst lTWcHLE2eMUHoBqR76pRNM6j0ftS1XCpFPyapC6/BXIyCeIc9QoVA298sQ7rw9V+jzMOs1 eXlHu6KViL6sz5fT1t4DdC7wWDQcBy5D1Uawir8BjOTQecZ8gRZC7OwJXd87Lg== 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 88BFF12D92 for ; Wed, 12 Jun 2024 02:27:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHBox-0004zF-Ff; Tue, 11 Jun 2024 20:26:35 -0400 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 1sHBov-0004ys-O1 for emacs-orgmode@gnu.org; Tue, 11 Jun 2024 20:26:33 -0400 Received: from mail-yb1-xb43.google.com ([2607:f8b0:4864:20::b43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHBot-0003CI-T1 for emacs-orgmode@gnu.org; Tue, 11 Jun 2024 20:26:33 -0400 Received: by mail-yb1-xb43.google.com with SMTP id 3f1490d57ef6-dfa7f3176d6so510494276.1 for ; Tue, 11 Jun 2024 17:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718151990; x=1718756790; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=82THZxCPGZndZFUj2ymXH+r7Y7Ujt1C+rOWbhFpOaIQ=; b=miloZSTFeCf3NQpnsL+hH+hmvwOjRTEnB9/tR7gvHmB3A4aMb9rN29AlXOZdOWOg4q mL74MMkVeu3xlHE1N0BeogTXE0ZIlJ15xQ8kYRvh5qO1oUS5pvhiKuCuxRK5pGgJWZQ5 Us1LmhEVZOLaZIjPXq3u1aNHw/Ot7NxqB1BCmnTTuwbUKEBw3dRkujzvgQjIVGcRS3WL pbAlgLY4UJHsQPZKUJiH9muM3xkXCLu/eVUCSZsCycWnEI0Ua0xM8IfTIymew45Ngbqw odImfjxlElPoYahWNM7g8ykvSHn8+8KHkA55DZnUhHlmtvHjaJn/jkKIkAA8CnLN8NMo gQTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718151990; x=1718756790; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=82THZxCPGZndZFUj2ymXH+r7Y7Ujt1C+rOWbhFpOaIQ=; b=VgafYEDcXnnPQoUxpiGkg/qfY9nKt5tBmZXhKituJvGWDZdhdnheFTwoTLdBDdxM6l EKXBsWWslRlFTKcOZimUwQE0Yoo3BKtHH6HkpDsW434d9F/Dx61HGC5iJao6CwkxPXIn F8befvmRn17Qss9NT7+2RawVhruTShjpnnaza1G4ercL78tFxFmEldp6z6PlERVFvMS+ EL3L+qTNCo6JPaP/XEYcYvCqr2v+4kvDRvmF2DNtldzhiTDInR3actL4UkRYvUyw4mRh vSHOMoQIB8jrd0Gvvrf9tWerY9Y8mSPbzncPd+BHNaJTNZzWKclrV6FLFUA1x/LYy56d 3etQ== X-Gm-Message-State: AOJu0YzKF7S2PqcwtPtzCSZFTRKkoH5HddDLIRozY9ui3+V+E0Yv2pGV 7fjz3uDkzO1vZ2Su+0T1ugQGv9yMWYgNjFPTcHjYLj0OO47iJWW87nFo5GuZ X-Google-Smtp-Source: AGHT+IGsnDX/92Z8tibQdAdYcc5+nC/n0zg25oZRLbzmzD6CZ7dJJWVpqbf8pnD4It2p1kQCT9kYsw== X-Received: by 2002:a05:690c:610f:b0:61b:e64c:6e43 with SMTP id 00721157ae682-62fb69359e6mr3918037b3.2.1718151990147; Tue, 11 Jun 2024 17:26:30 -0700 (PDT) Received: from gnus (static-198-54-132-177.cust.tzulo.com. [198.54.132.177]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b0782266f4sm30823456d6.121.2024.06.11.17.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 17:26:29 -0700 (PDT) From: "Suhail Singh" To: emacs-orgmode@gnu.org Subject: [BUG] org-export: incorrect assignment of bind keywords [9.7.3 (9.7.3-2f1844 @ /home/user/.emacs.d/elpa/org-9.7.3/)] Date: Tue, 11 Jun 2024 20:26:28 -0400 Message-ID: <87cyonhuq3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::b43; envelope-from=suhailsingh247@gmail.com; helo=mail-yb1-xb43.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 88BFF12D92 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.67 X-Spam-Score: -9.67 X-TUID: KFD2MD9C7G2J --=-=-= Content-Type: text/plain Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ In Org 9.7.3, the variables bound using the =#+BIND= keyword have values that are nested. E.g., when a string value is provided, the value actually gets set to a singleton list containing said string. This can be observed using the snippet: #+name: bugs/org/9.7/bind-vars #+header: :tangle /tmp/ox-bind-variable-mre.el #+begin_src emacs-lisp :lexical t ;; -*- lexical-binding: t; no-byte-compile: nil; -*- (require 'ox) (require 'ox-org) (let ((org-export-allow-bind-keywords t) (org-confirm-babel-evaluate nil)) (princ (format "%s\n" (org-version))) (princ (format "%s" (org-export-string-as "#+BIND: my/bug/ox/foo \"foo\" ,#+BIND: my/bug/ox/bar ,#+begin_src emacs-lisp :exports results :results output (princ (format \"%s = '%s' :: %s\n\" \"my/bug/ox/foo\" my/bug/ox/foo (type-of my/bug/ox/foo))) (princ (format \"%s = '%s' :: %s\n\" \"my/bug/ox/bar\" my/bug/ox/bar (type-of my/bug/ox/bar))) ,#+end_src" 'org t)))) #+end_src #+RESULTS: bugs/org/9.7/bind-vars : #+bind: my/bug/ox/foo "foo" : #+bind: my/bug/ox/bar : : #+results: : : my/bug/ox/foo = '(foo)' :: cons : : my/bug/ox/bar = 'nil' :: symbol The bug is in the definition of ~org-export--set-variables~. By fixing the issue in ~org-export--set-variables~ we get the expected values set: #+begin_src emacs-lisp :lexical t :noweb yes ;; -*- lexical-binding: t; no-byte-compile: nil; -*- (require 'org) (require 'ox) (defun org-export--set-variables (variable-alist) "Set buffer-local variables according to VARIABLE-ALIST in current buffer." (pcase-dolist (`(,var . ,val) variable-alist) (set (make-local-variable var) (car val)))) <> #+end_src #+RESULTS: : #+bind: my/bug/ox/foo "foo" : #+bind: my/bug/ox/bar : : #+results: : : my/bug/ox/foo = 'foo' :: string : : my/bug/ox/bar = 'nil' :: symbol The patch is attached below. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-export-Fix-assignment-of-bind-keywords.patch >From c92105507d97159a7ba7c1af02c4a3a517ccdf6a Mon Sep 17 00:00:00 2001 From: Suhail Date: Tue, 11 Jun 2024 20:05:22 -0400 Subject: [PATCH] org-export: Fix assignment of bind keywords * lisp/ox.el (org-export--set-variables): The value of the variable corresponds to the cadr of the entry and not the cdr. TINYCHANGE --- lisp/ox.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox.el b/lisp/ox.el index 1c52ca290..f8a763bc7 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -2585,7 +2585,7 @@ (defun org-export-install-filters (defun org-export--set-variables (variable-alist) "Set buffer-local variables according to VARIABLE-ALIST in current buffer." (pcase-dolist (`(,var . ,val) variable-alist) - (set (make-local-variable var) val))) + (set (make-local-variable var) (car val)))) (cl-defun org-export-copy-buffer (&key to-buffer drop-visibility drop-narrowing drop-contents base-commit: 3e4c89e55649f95cffbf70fcf64dcbc69760f96f -- 2.45.2 --=-=-= Content-Type: text/plain Emacs : GNU Emacs 29.3 (build 2, x86_64-suse-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) Package: Org mode version 9.7.3 (9.7.3-2f1844 @ /home/user/.emacs.d/elpa/org-9.7.3/) -- Suhail --=-=-=--