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)))) <<bugs/org/9.7/bind-vars>> #+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.
>From c92105507d97159a7ba7c1af02c4a3a517ccdf6a Mon Sep 17 00:00:00 2001 From: Suhail <suh...@bayesians.ca> 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
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