From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id q446L1hTLmBrUgAA0tVLHw (envelope-from ) for ; Thu, 18 Feb 2021 11:45:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YH2iKlhTLmC+fAAAbx9fmQ (envelope-from ) for ; Thu, 18 Feb 2021 11:45:28 +0000 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 4D8901F682 for ; Thu, 18 Feb 2021 12:45:28 +0100 (CET) Received: from localhost ([::1]:51972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lChkN-0002Za-Fb for larch@yhetil.org; Thu, 18 Feb 2021 06:45:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lChjM-0002ZJ-EE for emacs-orgmode@gnu.org; Thu, 18 Feb 2021 06:44:25 -0500 Received: from kidnapper.jabatus.fr ([109.234.163.54]:55321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lChjK-0001Sx-2c for emacs-orgmode@gnu.org; Thu, 18 Feb 2021 06:44:24 -0500 X-MailPropre-MailScanner-From: victor@svictor.net X-MailPropre-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-6.1, required 5, autolearn=disabled, RCVD_IN_DNSWL_HI -5.00, SPF_HELO_PASS -0.10, SPF_PASS -1.00) X-MailPropre-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-MailPropre-MailScanner-ID: E4D53100300.AC504 X-MailPropre-MailScanner-Information: Please contact the ISP for more information From: "Victor A. Stoichita" To: emacs-orgmode Subject: passing variables to lilypond code blocks Date: Thu, 18 Feb 2021 12:42:45 +0100 Message-ID: <87lfbld2kq.fsf@svictor.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - pam.o2switch.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - svictor.net X-Get-Message-Sender-Via: pam.o2switch.net: authenticated_id: victor@svictor.net X-Authenticated-Sender: pam.o2switch.net: victor@svictor.net X-Source: X-Source-Args: X-Source-Dir: Received-SPF: pass client-ip=109.234.163.54; envelope-from=victor@svictor.net; helo=kidnapper.jabatus.fr 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Spam-Score: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4D8901F682 X-Spam-Score: -2.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: /xlhInQvCxPT Hi, I=E2=80=99m trying to understand how ob-lilypond handles variables. I have the following minimal example which compiles correctly: #+begin_src lilypond :file test.png :cache no myVar =3D { e f g} \relative c' { a b c d \myVar } #+end_src Can I move the definition of myVar to a header argument of the=20 source block? When I write this:=20 #+begin_src lilypond :file test.png :cache no :var=20 myVar=3D"{ e f g }" \relative c' { a b c d \myVar } #+end_src The compiler complains: "unknown escaped string: `\myVar'". This makes me think that myVar is not passed at all to the code=20 block. What is the correct way to do this? I know that I can do it with noweb syntax. However, I would prefer=20 to use header args because I need those variables in all lilypond=20 code blocks. Ultimately, I plan to pass them from=20 org-babel-default-header-args:lilypond. Victor