emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jonathan Gregory <jgrg@autistici.org>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-lilypond: allow user configuration of header-args
Date: Tue, 12 Jan 2021 09:40:00 -0300	[thread overview]
Message-ID: <87ft368h27.fsf@autistici.org> (raw)
In-Reply-To: <CANwLyLNCUDEqrtLe9DxB+xZg9T-DWfmfHzrPMuqcUZLZW347Tg@mail.gmail.com>

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


  reply	other threads:[~2021-01-12 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 14:25 Jamie Bayne
2021-01-12 12:40 ` Jonathan Gregory [this message]
2021-04-26  8:27 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ft368h27.fsf@autistici.org \
    --to=jgrg@autistici.org \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH] ob-lilypond: allow user configuration of header-args' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).