emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] WORG example for ob-lilypond is no longer working as described


From: Jonathan Gregory
Subject: Re: [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)
Date: Fri, 28 Jul 2023 11:02:58 -0300
User-agent: mu4e 1.9.0; emacs 28.1


On 28 Jul 2023, Ihor Radchenko wrote:

I am slightly confused because there seems to be a need to define some page settings manually to get "embedded" images. In the examples in https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org2c29903, there is no mention that we need to define page geometry. Yet, the section is claiming that base mode "can embed LilyPond snippets into an Org-mode file".

It is confusing, I agree, and I'm still learning as we move forward. I guess the question is should basic mode *always* generate cropped images? If the answer is yes, and it looks like it is, then maybe we should include paper settings in the ob-lilypond file.

The basic-mode term is not very helpful. Perhaps [inline/cropped/embedded]-mode would have been more descriptive in terms of what it does. Anyway, hard-coding paper settings would simplify things a bit, but I'm not sure that hard-coding the version is a good idea and may produce errors with older installations.

Noweb and babel references are not allowed in header args. And ob-emacs-lisp also does not support :prologue.

I see, so there's no built-in way to auto-insert a boilerplate without using the <<>> reference *inside* source blocks. Anyway, let's not worry about this for now.

There is, but you will have to use direct Elisp to get :prologue string:

#+name: test
#+begin_src emacs-lisp

(message "This is test")
#+end_src

#+begin_src emacs-lisp :prologue (org-sbe test)
(+ 1 2)
#+end_src

Interesting. I didn't know about org-sbe. Looks useful. I'll look into it when I find time. In the meantime, we can use:

#+PROPERTY: header-args:lilypond :noweb yes :exports results :prologue (org-sbe version-and-paper)

if we replace "lilypond" with "org" in the version-and-paper block. Prologue is useful also for those of us who keep their settings in a separate file:

#+PROPERTY: header-args:lilypond :exports results :prologue "\\include \"settings.ly\""

Thanks!

--
Jonathan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]