From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6F79ODKa/V+DeAAA0tVLHw (envelope-from ) for ; Tue, 12 Jan 2021 12:46:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +CS9NDKa/V93GQAAbx9fmQ (envelope-from ) for ; Tue, 12 Jan 2021 12:46:42 +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 43A8F9402A8 for ; Tue, 12 Jan 2021 12:46:42 +0000 (UTC) Received: from localhost ([::1]:60900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzJ4K-0008Ij-ST for larch@yhetil.org; Tue, 12 Jan 2021 07:46:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzIyC-0007JA-PX for emacs-orgmode@gnu.org; Tue, 12 Jan 2021 07:40:21 -0500 Received: from latitanza.investici.org ([2001:888:2000:56::19]:41423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzIy8-0000QB-A8 for emacs-orgmode@gnu.org; Tue, 12 Jan 2021 07:40:18 -0500 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4DFVXQ2tJTz8sfg for ; Tue, 12 Jan 2021 12:40:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1610455206; bh=L6fks7xrJBgPy4hYf2eFNgkqDViuj/bfkBt7jmBd6sg=; h=References:From:To:Subject:In-reply-to:Date:From; b=lPS7dypgf0Euxvap/kkylNoCGoiujz0rSKtnXaN+U7RlTg8Qx5eFfkkYnV5OEGWPL Y/+LlzSH2Oy1G0XA8/5Q6Uf0t0nK3GCzOTyTeoA12/5LukCF53vsYew2dZfvaqVQc4 TZBcwYfvEhiyFN4OZsyvGew24rycicB6zJLGJNG4= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: jgregory@autistici.org) by localhost (Postfix) with ESMTPSA id 4DFVXP3WNqz8sfH for ; Tue, 12 Jan 2021 12:40:05 +0000 (UTC) References: User-agent: mu4e 1.5.5; emacs 27.1 From: Jonathan Gregory To: emacs-orgmode@gnu.org Subject: Re: [PATCH] ob-lilypond: allow user configuration of header-args In-reply-to: Date: Tue, 12 Jan 2021 09:40:00 -0300 Message-ID: <87ft368h27.fsf@autistici.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=jgrg@autistici.org; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, SPF_HELO_PASS=-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.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=autistici.org header.s=stigmate header.b=lPS7dypg; 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: 43A8F9402A8 X-Spam-Score: -2.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: Cu9h/Ua/bVH7 Hi Jamie On 10 Jan 2021, Jamie Bayne wrote: > Hi all, > > I hit the problem described in > https://www.mail-archive.com/emacs-orgmode@gnu.org/msg127317.html > - I couldn't see that anyone else had fixed it so I had a go. > > The problem is that, unusually, ob-lilypond has some conditional > logic on its header-args. Its solution is to set the header-args > internally when required, which overrides any user-specified > value. > > The quickest way I could see to preserve the conditional logic > was to add a new variable to hold the user configuration, which > I called ob-lilypond-header-args. Now the conditional logic sets > org-babel-header-args:lilypond to the new variable's value when > appropriate. > > Another way would be to create a context which sets the variable > when needed and then resets it. I opted against this as I'm not > sure it would have the same behaviour in all cases. Happy to > have a go if it would be preferable, though. > > Cheers, Jamie I'm not sure I understand the second proposal. Either way, the solution looks reasonable. Thanks for your help -- Jonathan