emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Moving some lisp/ob-*.el files to org-contrib - your advice?
@ 2021-05-03 15:13 Bastien
  2021-05-03 17:49 ` Timothy
                   ` (7 more replies)
  0 siblings, 8 replies; 77+ messages in thread
From: Bastien @ 2021-05-03 15:13 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

Less code is less bug and less maintainance.  So I'm considering
moving these files to the new (unmaintained) org-contrib repo at
https://git.sr.ht/~bzg/org-contrib:

- ob-abc.el --- Org Babel Functions for ABC
- ob-asymptote.el --- Babel Functions for Asymptote
- ob-coq.el --- Babel Functions for Coq
- ob-ditaa.el --- Babel Functions for ditaa
- ob-ebnf.el --- Babel Functions for EBNF
- ob-hledger.el --- Babel Functions for hledger
- ob-J.el --- Babel Functions for J
- ob-ledger.el --- Babel Functions for Ledger
- ob-lilypond.el --- Babel Functions for Lilypond
- ob-mscgen.el --- Babel Functions for Mscgen
- ob-picolisp.el --- Babel Functions for Picolisp
- ob-vala.el --- Babel functions for Vala evaluation

I suggest a criterium for keeping ob*.el files in Org could be that
the extension is known by Emacs _or_ that the supported language is
well-established.

Since I can obviously not decide alone about "well-established", would
you mind giving your advice on whether the files above can be moved to
org-contrib?  (Of course we would advertize this carefully.  And also,
there is absolutely nothing personal about perhaps moving *your* file
out of Emacs, it's just that maintainance will be easier outside.)

Are there any other?  

I'll leave this thread open during this week, no need to rush here.

Thanks,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
@ 2021-05-03 17:49 ` Timothy
  2021-05-03 18:05   ` Bastien
  2021-05-04  7:55   ` Eric S Fraga
  2021-05-03 20:52 ` Victor A. Stoichita
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 77+ messages in thread
From: Timothy @ 2021-05-03 17:49 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


This is only tangentally related, but this feels like a relevant place
to mention this and I don't think it deserves its own thread.

I think it's also worth considering deleting ob-julia.el from
org-contrib. Not to put to fine a point on things, but it's currently
dysfunctional. Trying to execute any code in a session causes Emacs to
freeze. Simply put, it was written for pre-1.0 Julia and is no longer
fit for purpose.

For the future, I'd think Julia actually warrants 1st class inclusion in
Org, and I've instigated an effort to write an ob-julia that works well.
More on this once it reaches a usable state.

-----

Regarding your the list of proposed files to move to org-contrib, I
concur that they fall under the bar you're setting.

Just going from the fact I haven't heard of them, perhaps ob-groovy.el,
ob-io.el, and ob-shen.el may be worth adding to the list?

--
Timothy

Bastien <bzg@gnu.org> writes:

> Hi all,
>
> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:
>
> - ob-abc.el --- Org Babel Functions for ABC
> - ob-asymptote.el --- Babel Functions for Asymptote
> - ob-coq.el --- Babel Functions for Coq
> - ob-ditaa.el --- Babel Functions for ditaa
> - ob-ebnf.el --- Babel Functions for EBNF
> - ob-hledger.el --- Babel Functions for hledger
> - ob-J.el --- Babel Functions for J
> - ob-ledger.el --- Babel Functions for Ledger
> - ob-lilypond.el --- Babel Functions for Lilypond
> - ob-mscgen.el --- Babel Functions for Mscgen
> - ob-picolisp.el --- Babel Functions for Picolisp
> - ob-vala.el --- Babel functions for Vala evaluation
>
> I suggest a criterium for keeping ob*.el files in Org could be that
> the extension is known by Emacs _or_ that the supported language is
> well-established.
>
> Since I can obviously not decide alone about "well-established", would
> you mind giving your advice on whether the files above can be moved to
> org-contrib?  (Of course we would advertize this carefully.  And also,
> there is absolutely nothing personal about perhaps moving *your* file
> out of Emacs, it's just that maintainance will be easier outside.)
>
> Are there any other?
>
> I'll leave this thread open during this week, no need to rush here.
>
> Thanks,


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 17:49 ` Timothy
@ 2021-05-03 18:05   ` Bastien
  2021-05-03 19:36     ` Palak Mathur
  2021-05-04  7:55   ` Eric S Fraga
  1 sibling, 1 reply; 77+ messages in thread
From: Bastien @ 2021-05-03 18:05 UTC (permalink / raw)
  To: Timothy; +Cc: emacs-orgmode

Thanks for your reply.

Timothy <tecosaur@gmail.com> writes:

> For the future, I'd think Julia actually warrants 1st class inclusion in
> Org, and I've instigated an effort to write an ob-julia that works well.
> More on this once it reaches a usable state.

Great, I suggest we delete ob-julia.el from org-contrib when we can
point to this new version.

> Just going from the fact I haven't heard of them, perhaps ob-groovy.el,
> ob-io.el, and ob-shen.el may be worth adding to the list?

I agree ob-shen.el should probably move.
For ob-io.el, I was perhaps too impressed by their website.
For ob-groovy.el, I believe Groovy is quite actively used out there.

But I'll add these three to the "maybe" list.

Thanks,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 18:05   ` Bastien
@ 2021-05-03 19:36     ` Palak Mathur
  2021-05-03 19:44       ` Timothy
  2021-05-03 20:33       ` Bastien
  0 siblings, 2 replies; 77+ messages in thread
From: Palak Mathur @ 2021-05-03 19:36 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Timothy



> On May 3, 2021, at 1:07 PM, Bastien <bzg@gnu.org> wrote:
> 
> Thanks for your reply.
> 
> Timothy <tecosaur@gmail.com> writes:
> 
>> For the future, I'd think Julia actually warrants 1st class inclusion in
>> Org, and I've instigated an effort to write an ob-julia that works well.
>> More on this once it reaches a usable state.
> 
> Great, I suggest we delete ob-julia.el from org-contrib when we can
> point to this new version.
> 
>> Just going from the fact I haven't heard of them, perhaps ob-groovy.el,
>> ob-io.el, and ob-shen.el may be worth adding to the list?
> 
> I agree ob-shen.el should probably move.
> For ob-io.el, I was perhaps too impressed by their website.
> For ob-groovy.el, I believe Groovy is quite actively used out there.
> 
> But I'll add these three to the "maybe" list.
> 
> Thanks,

Any reason why we can’t move all ob-* files out into this new repo? 


> -- 
> Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 19:36     ` Palak Mathur
@ 2021-05-03 19:44       ` Timothy
  2021-05-03 19:47         ` Palak Mathur
  2021-05-03 20:34         ` Bastien
  2021-05-03 20:33       ` Bastien
  1 sibling, 2 replies; 77+ messages in thread
From: Timothy @ 2021-05-03 19:44 UTC (permalink / raw)
  To: Palak Mathur; +Cc: Bastien, emacs-orgmode


Palak Mathur <palakmathur@gmail.com> writes:

> Any reason why we can’t move all ob-* files out into this new repo?

I trust Bastien will correct me if I'm wrong, but my understanding is
this isn't a new repo for "miscellaneous Org stuff" more
"community-developed non-core Org stuff that isn't actively maintained".

The idea here being to move ob-* for rarely used languages to this repo
to lessen the maintenance load.

--
Timothy


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 19:44       ` Timothy
@ 2021-05-03 19:47         ` Palak Mathur
  2021-05-03 20:34         ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Palak Mathur @ 2021-05-03 19:47 UTC (permalink / raw)
  To: Timothy; +Cc: Bastien, emacs-orgmode





> On May 3, 2021, at 2:44 PM, Timothy <tecosaur@gmail.com> wrote:
> 
> 
> Palak Mathur <palakmathur@gmail.com> writes:
> 
>> Any reason why we can’t move all ob-* files out into this new repo?
> 
> I trust Bastien will correct me if I'm wrong, but my understanding is
> this isn't a new repo for "miscellaneous Org stuff" more
> "community-developed non-core Org stuff that isn't actively maintained".
> 

Will it not make sense to separate out non-core from the core? 

> The idea here being to move ob-* for rarely used languages to this repo
> to lessen the maintenance load.
> 

In that case ob-groovy.el can be moved out. 

> --
> Timothy


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 19:36     ` Palak Mathur
  2021-05-03 19:44       ` Timothy
@ 2021-05-03 20:33       ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-03 20:33 UTC (permalink / raw)
  To: Palak Mathur; +Cc: emacs-orgmode, Timothy

Hi Palak,

Palak Mathur <palakmathur@gmail.com> writes:

> Any reason why we can’t move all ob-* files out into this new repo? 

Yes, that's because Org Babel is a core documented feature of Org that
is not usable without these ob-*.el files.

We want to move out files that are of less importance and for which we
would like maintainance to happen elsewhere than in Org's core.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 19:44       ` Timothy
  2021-05-03 19:47         ` Palak Mathur
@ 2021-05-03 20:34         ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-03 20:34 UTC (permalink / raw)
  To: Timothy; +Cc: emacs-orgmode, Palak Mathur

Timothy <tecosaur@gmail.com> writes:

> "community-developed non-core Org stuff that isn't actively maintained".

Yes, and: "In search for maintainers."

> The idea here being to move ob-* for rarely used languages to this repo
> to lessen the maintenance load.

Yes, that's it, thanks for stating it more directly than I did.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
  2021-05-03 17:49 ` Timothy
@ 2021-05-03 20:52 ` Victor A. Stoichita
  2021-05-04 10:19   ` Dr. Arne Babenhauserheide
  2021-05-04 11:32   ` Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
  2021-05-03 22:19 ` Tim Cross
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 77+ messages in thread
From: Victor A. Stoichita @ 2021-05-03 20:52 UTC (permalink / raw)
  To: emacs-orgmode


Le 03 May 2021, Bastien <bzg@gnu.org> a écrit :
> I suggest a criterium for keeping ob*.el files in Org could be that
> the extension is known by Emacs _or_ that the supported language is
> well-established.

I happen to be an active user of ob-lilypond. Lilypond is certainly
peripheral to the world of programming languages. It is well established
and active as an equivalent of LaTeX for music though ([1][2][3]).
It comes with built-in support for Emacs [4].

I see no reason to not move ob-lilypond to org-contrib. I understand
that only few of us use it these days. I can’t stand up as a maintainer
since my Lisp skills and my knowledge of org-mode are quite insufficient
for that. I was happy to see that someone submitted a patch for
ob-lilypond in January. I hope that by the time something breaks I’ll be
able to submit a patch myself.

Regards,
Victor

[1] http://lilypond.1069038.n5.nabble.com/

[2]  https://music.stackexchange.com/questions/tagged/lilypond

[3]  https://stackoverflow.com/questions/tagged/lilypond

[4]  http://lilypond.org/doc/v2.21/Documentation/usage/text-editor-support.html#emacs-mode


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
  2021-05-03 17:49 ` Timothy
  2021-05-03 20:52 ` Victor A. Stoichita
@ 2021-05-03 22:19 ` Tim Cross
  2021-05-03 23:15   ` Bastien
  2021-05-04 10:19 ` Dr. Arne Babenhauserheide
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 77+ messages in thread
From: Tim Cross @ 2021-05-03 22:19 UTC (permalink / raw)
  To: emacs-orgmode


Bastien <bzg@gnu.org> writes:

> Hi all,
>
> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:
>
> - ob-abc.el --- Org Babel Functions for ABC
> - ob-asymptote.el --- Babel Functions for Asymptote
> - ob-coq.el --- Babel Functions for Coq
> - ob-ditaa.el --- Babel Functions for ditaa
> - ob-ebnf.el --- Babel Functions for EBNF
> - ob-hledger.el --- Babel Functions for hledger
> - ob-J.el --- Babel Functions for J
> - ob-ledger.el --- Babel Functions for Ledger
> - ob-lilypond.el --- Babel Functions for Lilypond
> - ob-mscgen.el --- Babel Functions for Mscgen
> - ob-picolisp.el --- Babel Functions for Picolisp
> - ob-vala.el --- Babel functions for Vala evaluation
>
> I suggest a criterium for keeping ob*.el files in Org could be that
> the extension is known by Emacs _or_ that the supported language is
> well-established.
>

+1 on this and the list of proposed languages.

Do any of these ob-* files have FSF copyright i.e. author assigned
copyright to FSF. Just wondering, given the contrib package will live in
non-gnu repo, if this is something we need to be concerned about or not?

Strikes me there is nothing written in stone here, so if a language
becomes popular and it has maintainers, we can always review the
decision to move it 'out' and when justified, move back into core.

I think it is good having a clear distinction and the idea that if your
using a contrib package, it is 'best effort only' and not guaranteed to
work with the most recent org version compared to 'core', which has an
expectation it works with most recent org version.

-- 
Tim Cross


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 22:19 ` Tim Cross
@ 2021-05-03 23:15   ` Bastien
  0 siblings, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-03 23:15 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

Tim Cross <theophilusx@gmail.com> writes:

> +1 on this and the list of proposed languages.

Thanks for the feedback.

> Do any of these ob-* files have FSF copyright i.e. author assigned
> copyright to FSF. Just wondering, given the contrib package will live in
> non-gnu repo, if this is something we need to be concerned about or not?

All these ob-*.el files are part of Org core, so they are part of
Emacs and require the authors to sign the FSF papers.

So there is no real problem here.

org-contrib.git contains files with a free software license: most of
them are GPLv3+, a few of them GPVv2(+) and one (or two, from memory)
is using a MIT license.  So there is no blocker for org-contrib.git
to be packaged as a NonGNU package.

> Strikes me there is nothing written in stone here, so if a language
> becomes popular and it has maintainers, we can always review the
> decision to move it 'out' and when justified, move back into core.

Yes - on the other hand, we don't want to move files out of Org's core
too often.

> I think it is good having a clear distinction and the idea that if your
> using a contrib package, it is 'best effort only' and not guaranteed to
> work with the most recent org version compared to 'core', which has an
> expectation it works with most recent org version.

Yes, this is also the idea.  That's why I called for more maintainers
for the ob-*.el files, but we're not there yet, and for now it would
be too drastic IMHO to remove some ob-*.el for which we don't have a
maintainer or we are not 100% sure they are compatible.  But luckily
enough, I don't think backward compatibility problems happen often
with Babel files.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 17:49 ` Timothy
  2021-05-03 18:05   ` Bastien
@ 2021-05-04  7:55   ` Eric S Fraga
  2021-05-19  3:36     ` Jack Kamm
  1 sibling, 1 reply; 77+ messages in thread
From: Eric S Fraga @ 2021-05-04  7:55 UTC (permalink / raw)
  To: Timothy; +Cc: emacs-orgmode

On Tuesday,  4 May 2021 at 01:49, Timothy wrote:
> For the future, I'd think Julia actually warrants 1st class inclusion in
> Org, and I've instigated an effort to write an ob-julia that works well.

+1!  Happy to help test if you wish.  I use Julia as my programming
language these days.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-480-g479a3d


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
                   ` (2 preceding siblings ...)
  2021-05-03 22:19 ` Tim Cross
@ 2021-05-04 10:19 ` Dr. Arne Babenhauserheide
  2021-05-04 11:10   ` Bastien
  2021-09-26  8:17   ` Bastien
  2021-05-06  9:19 ` Jean Louis
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2021-05-04 10:19 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Bastien <bzg@gnu.org> writes:

> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:
>
> - ob-ditaa.el --- Babel Functions for ditaa

This is well-established, and once I have my paperwork in place I would
offer maintenance, because this is a major part of the lectures I write
in org-mode.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 20:52 ` Victor A. Stoichita
@ 2021-05-04 10:19   ` Dr. Arne Babenhauserheide
  2021-05-04 11:28     ` Bastien
  2023-07-12 13:40     ` [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?) Ihor Radchenko
  2021-05-04 11:32   ` Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
  1 sibling, 2 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2021-05-04 10:19 UTC (permalink / raw)
  To: Victor A. Stoichita; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]


Victor A. Stoichita <victor@svictor.net> writes:

> Le 03 May 2021, Bastien <bzg@gnu.org> a écrit :
>> I suggest a criterium for keeping ob*.el files in Org could be that
>> the extension is known by Emacs _or_ that the supported language is
>> well-established.
>
> I happen to be an active user of ob-lilypond. Lilypond is certainly
> peripheral to the world of programming languages. It is well established
> and active as an equivalent of LaTeX for music though ([1][2][3]).
> It comes with built-in support for Emacs [4].

Lilypond is not just well-established, it is the dominant tool for note
engraving. One of the few domains in which no proprietary comes close in
terms of quality.

I typically use it directly, but if the maintenance burden is
manageable, I could offer maintenance here, too (once I have the papers
in place).

Having support in core directly helps a lot when using the tool, because
that enables working zero-setup org-files (with some load-language in an
elisp block).

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-04 10:19 ` Dr. Arne Babenhauserheide
@ 2021-05-04 11:10   ` Bastien
  2021-09-26  8:17   ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-04 11:10 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

Hi,

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> This is well-established, and once I have my paperwork in place I would
> offer maintenance, because this is a major part of the lectures I write
> in org-mode.

Thanks for volunteering here.  Let me know when the paperwork is done
so that I can you as the maintainer.

Best,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-04 10:19   ` Dr. Arne Babenhauserheide
@ 2021-05-04 11:28     ` Bastien
  2021-05-04 18:38       ` Victor A. Stoichita
  2023-07-12 13:40     ` [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?) Ihor Radchenko
  1 sibling, 1 reply; 77+ messages in thread
From: Bastien @ 2021-05-04 11:28 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Victor A. Stoichita, emacs-orgmode

Hi,

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> Lilypond is not just well-established, it is the dominant tool for note
> engraving. One of the few domains in which no proprietary comes close in
> terms of quality.
>
> I typically use it directly, but if the maintenance burden is
> manageable, I could offer maintenance here, too (once I have the papers
> in place).

Thanks also for this then!

> Having support in core directly helps a lot when using the tool, because
> that enables working zero-setup org-files (with some load-language in an
> elisp block).

... which is good if the package is really maintained, and calling for
trouble if it is not.  Anyway, I agree with you about the importance
of ob-lilypond.el.

Best,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 20:52 ` Victor A. Stoichita
  2021-05-04 10:19   ` Dr. Arne Babenhauserheide
@ 2021-05-04 11:32   ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-04 11:32 UTC (permalink / raw)
  To: Victor A. Stoichita; +Cc: emacs-orgmode

Hi Victor,

"Victor A. Stoichita" <victor@svictor.net> writes:

> Le 03 May 2021, Bastien <bzg@gnu.org> a écrit :
>> I suggest a criterium for keeping ob*.el files in Org could be that
>> the extension is known by Emacs _or_ that the supported language is
>> well-established.
>
> I happen to be an active user of ob-lilypond. Lilypond is certainly
> peripheral to the world of programming languages. It is well established
> and active as an equivalent of LaTeX for music though ([1][2][3]).
> It comes with built-in support for Emacs [4].

Agreed, thanks for the references!

> I see no reason to not move ob-lilypond to org-contrib. I understand
> that only few of us use it these days. I can’t stand up as a maintainer
> since my Lisp skills and my knowledge of org-mode are quite insufficient
> for that. I was happy to see that someone submitted a patch for
> ob-lilypond in January. I hope that by the time something breaks I’ll be
> able to submit a patch myself.

I hope too.

PS: Also, in general, we are not talking about shutting down a
feature: ob-*.el packages in org-contrib.git continue to be available.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-04 11:28     ` Bastien
@ 2021-05-04 18:38       ` Victor A. Stoichita
  0 siblings, 0 replies; 77+ messages in thread
From: Victor A. Stoichita @ 2021-05-04 18:38 UTC (permalink / raw)
  To: emacs-orgmode


Le 04 May 2021, Bastien <bzg@gnu.org> a écrit :
>> I typically use it directly, but if the maintenance burden is
>> manageable, I could offer maintenance here, too (once I have the papers
>> in place).
>
> Thanks also for this then!
>

Thanks as well ! It’s good to know that knowledgeable people might care
for this little tool which I find very useful.

Regards,
Victor


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
                   ` (3 preceding siblings ...)
  2021-05-04 10:19 ` Dr. Arne Babenhauserheide
@ 2021-05-06  9:19 ` Jean Louis
  2021-05-06  9:39   ` Bastien
  2021-05-14 18:23 ` Greg Minshall
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 77+ messages in thread
From: Jean Louis @ 2021-05-06  9:19 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

* Bastien <bzg@gnu.org> [2021-05-03 18:14]:
> Hi all,
> 
> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:
> 
> - ob-abc.el --- Org Babel Functions for ABC
> - ob-asymptote.el --- Babel Functions for Asymptote
> - ob-coq.el --- Babel Functions for Coq
> - ob-ditaa.el --- Babel Functions for ditaa
> - ob-ebnf.el --- Babel Functions for EBNF
> - ob-hledger.el --- Babel Functions for hledger
> - ob-J.el --- Babel Functions for J
> - ob-ledger.el --- Babel Functions for Ledger
> - ob-lilypond.el --- Babel Functions for Lilypond
> - ob-mscgen.el --- Babel Functions for Mscgen
> - ob-picolisp.el --- Babel Functions for Picolisp
> - ob-vala.el --- Babel functions for Vala evaluation

Personally I use ditaa


If those files have copyrights submitted, should they not end up in
GNU ELPA?

If there are no copyrights, then I hope maintainers would include it
in NonGNU ELPA.

Is that intention?


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/



^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-06  9:19 ` Jean Louis
@ 2021-05-06  9:39   ` Bastien
  0 siblings, 0 replies; 77+ messages in thread
From: Bastien @ 2021-05-06  9:39 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

Jean Louis <bugs@gnu.support> writes:

> If those files have copyrights submitted, should they not end up in
> GNU ELPA?

Many of the authors for files in org-contrib did not want to assign
their copyright to the FSF.  

That's one of the reasons behind the contrib/ directory in the first
place.

Also, org-contrib in NonGNU ELPA will be a transitory package: once
all the files there find a maintainer and another place where to be
hosted, I'll delete the package and the repository.

> If there are no copyrights, then I hope maintainers would include it
> in NonGNU ELPA.
>
> Is that intention?

Yes, as a transitory stage to help people install it.

Unless someone wants to maintain all the files in org-contrib and the
NonGNU ELPA package.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
                   ` (4 preceding siblings ...)
  2021-05-06  9:19 ` Jean Louis
@ 2021-05-14 18:23 ` Greg Minshall
  2021-05-17 16:39   ` Greg Minshall
  2021-09-26 12:50 ` Bastien Guerry
  2021-10-02 17:11 ` Bastien Guerry
  7 siblings, 1 reply; 77+ messages in thread
From: Greg Minshall @ 2021-05-14 18:23 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

hi, Bastien,

> 2e0375d2 — Bastien Guerry2 days ago
> lisp/ob-julia.el: Add a Homepage header

that Homepage seems to point at
https://git.savannah.gnu.org/cgit/emacs/org-mode.git which appears to be
a (the?) full-on org-mode git repo, and which doesn't appear to have
ob-julia.el.

for whatever reason, i point at https://github.com/gjkerns/ob-julia in
case that's of use.

cheers, Greg

ps -- snooping around, trying to figure out if i understood things,
org-link-edit.el seems to lack a Homepage.



^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-14 18:23 ` Greg Minshall
@ 2021-05-17 16:39   ` Greg Minshall
  0 siblings, 0 replies; 77+ messages in thread
From: Greg Minshall @ 2021-05-17 16:39 UTC (permalink / raw)
  Cc: Bastien, emacs-orgmode

Bastien,

> > lisp/ob-julia.el: Add a Homepage header
> 
> that Homepage seems to point at
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git which appears to be
> a (the?) full-on org-mode git repo, and which doesn't appear to have
> ob-julia.el.

apologies, i hadn't taken the time to look at the full git log message:

----
commit 2e0375d20b3a411ddf32194229c7d93f69aa701c
Author: Bastien Guerry <bzg@gnu.org>
Date:   Wed May 12 06:20:33 2021 +0200

    lisp/ob-julia.el: Add a Homepage header

    The Homepage header of ob-julia.el points to the new org-mode.git
    repository because we will include ob-julia.el in Org's core.
----

cheers, Greg


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-04  7:55   ` Eric S Fraga
@ 2021-05-19  3:36     ` Jack Kamm
  0 siblings, 0 replies; 77+ messages in thread
From: Jack Kamm @ 2021-05-19  3:36 UTC (permalink / raw)
  To: Eric S Fraga, Timothy; +Cc: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Tuesday,  4 May 2021 at 01:49, Timothy wrote:
>> For the future, I'd think Julia actually warrants 1st class inclusion in
>> Org, and I've instigated an effort to write an ob-julia that works well.
>
> +1!  Happy to help test if you wish.  I use Julia as my programming
> language these days.

+1 from me as well, I think Julia passes the "well-established" test and
is an important language for scientific computing.

I like Julia, but only occasionally use it, and it seems to frequently
cause troubles with my Org config whenever I update or move
computers. So I appreciate this effort to support it better -- thank you Timothy.


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-04 10:19 ` Dr. Arne Babenhauserheide
  2021-05-04 11:10   ` Bastien
@ 2021-09-26  8:17   ` Bastien
  1 sibling, 0 replies; 77+ messages in thread
From: Bastien @ 2021-09-26  8:17 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide, copyright-clerk; +Cc: emacs-orgmode

Allo Arne,

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> Bastien <bzg@gnu.org> writes:
>
>> Less code is less bug and less maintainance.  So I'm considering
>> moving these files to the new (unmaintained) org-contrib repo at
>> https://git.sr.ht/~bzg/org-contrib:
>>
>> - ob-ditaa.el --- Babel Functions for ditaa
>
> This is well-established, and once I have my paperwork in place I would
> offer maintenance, because this is a major part of the lectures I write
> in org-mode.

Thanks again for offering your help.

Did you go through the copyright assignment process?  I can't see your
name in the FSF copyright file.

Let me know how it goes, and please CC me if you ping the FSF
copyright clerk at <copyright-clerk@fsf.org>

Thanks,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
                   ` (5 preceding siblings ...)
  2021-05-14 18:23 ` Greg Minshall
@ 2021-09-26 12:50 ` Bastien Guerry
  2021-10-02 17:11 ` Bastien Guerry
  7 siblings, 0 replies; 77+ messages in thread
From: Bastien Guerry @ 2021-09-26 12:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

Bastien <bzg@gnu.org> writes:

> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:
>
> - ob-abc.el --- Org Babel Functions for ABC
> - ob-asymptote.el --- Babel Functions for Asymptote
> - ob-coq.el --- Babel Functions for Coq
> - ob-ditaa.el --- Babel Functions for ditaa
> - ob-ebnf.el --- Babel Functions for EBNF
> - ob-hledger.el --- Babel Functions for hledger
> - ob-J.el --- Babel Functions for J
> - ob-ledger.el --- Babel Functions for Ledger
> - ob-lilypond.el --- Babel Functions for Lilypond
> - ob-mscgen.el --- Babel Functions for Mscgen
> - ob-picolisp.el --- Babel Functions for Picolisp
> - ob-vala.el --- Babel functions for Vala evaluation

I've made this move now, with the exceptions we discussed in this
thread.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=db67c7e9231d35e34341431bb4fc8ba213f1d811

Please report anything weird that might happen here.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: Moving some lisp/ob-*.el files to org-contrib - your advice?
  2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
                   ` (6 preceding siblings ...)
  2021-09-26 12:50 ` Bastien Guerry
@ 2021-10-02 17:11 ` Bastien Guerry
  7 siblings, 0 replies; 77+ messages in thread
From: Bastien Guerry @ 2021-10-02 17:11 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Less code is less bug and less maintainance.  So I'm considering
> moving these files to the new (unmaintained) org-contrib repo at
> https://git.sr.ht/~bzg/org-contrib:

I'm now discarding this call for help on updates.orgmode.org.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 77+ messages in thread

* [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)
  2021-05-04 10:19   ` Dr. Arne Babenhauserheide
  2021-05-04 11:28     ` Bastien
@ 2023-07-12 13:40     ` Ihor Radchenko
  2023-07-12 22:35       ` Jonathan Gregory
  2023-07-13  6:33       ` [BUG] WORG example for ob-lilypond is no longer working as described Dr. Arne Babenhauserheide
  1 sibling, 2 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-12 13:40 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Victor A. Stoichita, emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> I typically use it directly, but if the maintenance burden is
> manageable, I could offer maintenance here, too (once I have the papers
> in place).

I have recently seen https://masto.ai/@rfc1149/110674961710491363 that
revealed a problem with example from
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org29a742f

Instead of lilypond fragments, full pages are inserted when exporting to pdf.

Upon further investigation, it looks like something changed in how
Lilypond defines page layout.

Arne, maybe you can point me in the right direction?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-12 13:40     ` [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?) Ihor Radchenko
@ 2023-07-12 22:35       ` Jonathan Gregory
  2023-07-13  6:52         ` Dr. Arne Babenhauserheide
  2023-07-13 10:08         ` Ihor Radchenko
  2023-07-13  6:33       ` [BUG] WORG example for ob-lilypond is no longer working as described Dr. Arne Babenhauserheide
  1 sibling, 2 replies; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-12 22:35 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Hi Ihor

On 12 Jul 2023, Ihor Radchenko wrote:

[...]

> I have recently seen 
> https://masto.ai/@rfc1149/110674961710491363 that revealed a 
> problem with example from 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org29a742f
>
> Instead of lilypond fragments, full pages are inserted when 
> exporting to pdf.
>
> Upon further investigation, it looks like something changed in 
> how Lilypond defines page layout.

Can you check if adding:

\version "2.24.1"
#(ly:set-option 'use-paper-size-for-page #f)
#(ly:set-option 'tall-page-formats 'pdf)

to the version-and-paper block fixes the issue.

Also, I believe tagline = "" is now the only variable needed.

-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: [BUG] WORG example for ob-lilypond is no longer working as described
  2023-07-12 13:40     ` [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?) Ihor Radchenko
  2023-07-12 22:35       ` Jonathan Gregory
@ 2023-07-13  6:33       ` Dr. Arne Babenhauserheide
  2023-07-13  7:03         ` Dr. Arne Babenhauserheide
  2023-07-13  8:03         ` Jean Abou Samra
  1 sibling, 2 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-07-13  6:33 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Victor A. Stoichita, emacs-orgmode, lilypond-user

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]


Ihor Radchenko <yantar92@posteo.net> writes:

> "Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
>
>> I typically use it directly, but if the maintenance burden is
>> manageable, I could offer maintenance here, too (once I have the papers
>> in place).
>
> I have recently seen https://masto.ai/@rfc1149/110674961710491363 that
> revealed a problem with example from
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org29a742f
>
> Instead of lilypond fragments, full pages are inserted when exporting to pdf.
>
> Upon further investigation, it looks like something changed in how
> Lilypond defines page layout.
>
> Arne, maybe you can point me in the right direction?

I would love to, because I have the same problem. But the only solution
I found was to crop the images that get inserted from lilypond:

\includegraphics[width=0.96\linewidth, keepaspectratio, trim=0 160cm 0 0]{delfini-tune}% trim, because lilypond creates full-page pngs

This is the lilypond-file in questoin:
https://hg.sr.ht/~arnebab/draketos-songbook/browse/delfini-tune.ly?rev=tip

Converted to PNG in a two step process:
lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --pdf -o "$(basename "$i" .ly)"-lily $i
convert -density 600 "$(basename "$i" .ly)"-lily.pdf "$(basename "$i" .ly)".png

@lilypond-user: I didn’t find solutions, so I’m CC’ing you as those who
                might know. Can the page layout be changed to only the
                content, not the whole page?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-12 22:35       ` Jonathan Gregory
@ 2023-07-13  6:52         ` Dr. Arne Babenhauserheide
  2023-07-13 10:08         ` Ihor Radchenko
  1 sibling, 0 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-07-13  6:52 UTC (permalink / raw)
  To: Jonathan Gregory; +Cc: Ihor Radchenko, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]


Jonathan Gregory <jgrg@autistici.org> writes:

> Hi Ihor
>
> On 12 Jul 2023, Ihor Radchenko wrote:
>
> [...]
>
>> I have recently seen https://masto.ai/@rfc1149/110674961710491363
>> that revealed a problem with example from
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org29a742f
>>
>> Instead of lilypond fragments, full pages are inserted when
>> exporting to pdf.
>>
>> Upon further investigation, it looks like something changed in how
>> Lilypond defines page layout.
>
> Can you check if adding:
>
> \version "2.24.1"
> #(ly:set-option 'use-paper-size-for-page #f)
> #(ly:set-option 'tall-page-formats 'pdf)

For a plain Lilypond file this works! It does not even need the version
(I tried it with \version "2.19.80").

Thank you!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: [BUG] WORG example for ob-lilypond is no longer working as described
  2023-07-13  6:33       ` [BUG] WORG example for ob-lilypond is no longer working as described Dr. Arne Babenhauserheide
@ 2023-07-13  7:03         ` Dr. Arne Babenhauserheide
  2023-07-13  8:03         ` Jean Abou Samra
  1 sibling, 0 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-07-13  7:03 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide
  Cc: Ihor Radchenko, Victor A. Stoichita, emacs-orgmode, lilypond-user

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]


"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> "Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
>>
>>> I typically use it directly, but if the maintenance burden is
>>> manageable, I could offer maintenance here, too (once I have the papers
>>> in place).
>>
>> I have recently seen https://masto.ai/@rfc1149/110674961710491363 that
>> revealed a problem with example from
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#org29a742f
>>
>> Instead of lilypond fragments, full pages are inserted when exporting to pdf.
>>
>> Upon further investigation, it looks like something changed in how
>> Lilypond defines page layout.

> @lilypond-user: I didn’t find solutions, so I’m CC’ing you as those who
>                 might know. Can the page layout be changed to only the
>                 content, not the whole page?

Jonathan suggested

\version "2.24.1"
#(ly:set-option 'use-paper-size-for-page #f)
#(ly:set-option 'tall-page-formats 'pdf)

This works for me.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: [BUG] WORG example for ob-lilypond is no longer working as described
  2023-07-13  6:33       ` [BUG] WORG example for ob-lilypond is no longer working as described Dr. Arne Babenhauserheide
  2023-07-13  7:03         ` Dr. Arne Babenhauserheide
@ 2023-07-13  8:03         ` Jean Abou Samra
  2023-07-16 12:21           ` Graham King
  1 sibling, 1 reply; 77+ messages in thread
From: Jean Abou Samra @ 2023-07-13  8:03 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide, Ihor Radchenko
  Cc: Victor A. Stoichita, emacs-orgmode, lilypond-user


[-- Attachment #1.1: Type: text/plain, Size: 1053 bytes --]

Le jeudi 13 juillet 2023 à 08:33 +0200, Dr. Arne Babenhauserheide a écrit :
> This is the lilypond-file in questoin:
> https://hg.sr.ht/~arnebab/draketos-songbook/browse/delfini-tune.ly?rev=tip
> 
> Converted to PNG in a two step process:
> lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --pdf -o
> "$(basename "$i" .ly)"-lily $i
> convert -density 600 "$(basename "$i" .ly)"-lily.pdf "$(basename "$i"
> .ly)".png
> 
> @lilypond-user: I didn’t find solutions, so I’m CC’ing you as those who
>                 might know. Can the page layout be changed to only the
>                 content, not the whole page?




Yes, but the exact way to do it depends on what exactly you want.

The -dbackend=eps option has been obsoleted in version 2.24 and is now handled
in a way that is partly backwards compatible but not entirely. The up-to-date
documentation on the family of options that replaces it is here:

https://lilypond.org/doc/v2.24/Documentation/usage/other-programs



[-- Attachment #1.2: Type: text/html, Size: 2152 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-12 22:35       ` Jonathan Gregory
  2023-07-13  6:52         ` Dr. Arne Babenhauserheide
@ 2023-07-13 10:08         ` Ihor Radchenko
  2023-07-13 11:04           ` Jonathan Gregory
  2023-07-14 12:38           ` Jonathan Gregory
  1 sibling, 2 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-13 10:08 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> Can you check if adding:
>
> \version "2.24.1"
> #(ly:set-option 'use-paper-size-for-page #f)
> #(ly:set-option 'tall-page-formats 'pdf)
>
> to the version-and-paper block fixes the issue.

Yes, except that I have lilypond 2.24.0, which failed until I changed
the version to fit my lilypond version.

Do you happen to know the minimal required version needed for your
change to work? And do we need that \version line at all?

> Also, I believe tagline = "" is now the only variable needed.

Looks like this on my side as well.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-13 10:08         ` Ihor Radchenko
@ 2023-07-13 11:04           ` Jonathan Gregory
  2023-07-14 12:38           ` Jonathan Gregory
  1 sibling, 0 replies; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-13 11:04 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Hi

On 13 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>> Can you check if adding:
>>
>> \version "2.24.1"
>> #(ly:set-option 'use-paper-size-for-page #f)
>> #(ly:set-option 'tall-page-formats 'pdf)
>>
>> to the version-and-paper block fixes the issue.
>
> Yes, except that I have lilypond 2.24.0, which failed until I 
> changed the version to fit my lilypond version.
>
> Do you happen to know the minimal required version needed for 
> your change to work? And do we need that \version line at all?

I'd keep the version in sync with the stable release, but I guess 
that's up to the maintainer. The documentation says that "Every 
LilyPond file should contain a version statement":

The version statement is important for at least two reasons. 
First, it allows automatic updating of the input file as LilyPond 
syntax changes. Second, it describes the version of LilyPond 
needed to compile the file.

If the version statement is omitted from an input file, LilyPond 
prints a warning during the compilation of the file. 

-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-13 10:08         ` Ihor Radchenko
  2023-07-13 11:04           ` Jonathan Gregory
@ 2023-07-14 12:38           ` Jonathan Gregory
  2023-07-14 13:15             ` Dr. Arne Babenhauserheide
  2023-07-14 18:06             ` Ihor Radchenko
  1 sibling, 2 replies; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-14 12:38 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Hi

On 13 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>> Can you check if adding:
>>
>> \version "2.24.1"
>> #(ly:set-option 'use-paper-size-for-page #f)
>> #(ly:set-option 'tall-page-formats 'pdf)
>>
>> to the version-and-paper block fixes the issue.
>
> Yes, except that I have lilypond 2.24.0, which failed until I 
> changed the version to fit my lilypond version.
>
> Do you happen to know the minimal required version needed for 
> your change to work? And do we need that \version line at all?
>
>> Also, I believe tagline = "" is now the only variable needed.
>
> Looks like this on my side as well.

Given the feedback, I went ahead and changed the lilypond.org 
file:

https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-14 12:38           ` Jonathan Gregory
@ 2023-07-14 13:15             ` Dr. Arne Babenhauserheide
  2023-07-14 13:52               ` Ihor Radchenko
  2023-07-14 18:06             ` Ihor Radchenko
  1 sibling, 1 reply; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-07-14 13:15 UTC (permalink / raw)
  To: Jonathan Gregory; +Cc: Ihor Radchenko, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]


Jonathan Gregory <jgrg@autistici.org> writes:

> Given the feedback, I went ahead and changed the lilypond.org file:
>
> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92

-#+begin_src org :exports none
+#+begin_src lilypond :exports none

That’s strange — what was the reason for using org as source before?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-14 13:15             ` Dr. Arne Babenhauserheide
@ 2023-07-14 13:52               ` Ihor Radchenko
  0 siblings, 0 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-14 13:52 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide
  Cc: Jonathan Gregory, Victor A. Stoichita, emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> -#+begin_src org :exports none
> +#+begin_src lilypond :exports none
>
> That’s strange — what was the reason for using org as source before?

Could be just a typo.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-14 12:38           ` Jonathan Gregory
  2023-07-14 13:15             ` Dr. Arne Babenhauserheide
@ 2023-07-14 18:06             ` Ihor Radchenko
  2023-07-17 17:02               ` Jonathan Gregory
  1 sibling, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-14 18:06 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> Looks like this on my side as well.
>
> Given the feedback, I went ahead and changed the lilypond.org 
> file:
>
> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92

Thanks!
It would be even nicer if we allowed
https://packages.debian.org/buster/lilypond (2.19.81) or at least
https://packages.ubuntu.com/focal/lilypond (2.20.0).

I also checked what will happen with future versions, and it looks like
\version "2.24.1" actually means >=.

Fixed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: [BUG] WORG example for ob-lilypond is no longer working as described
  2023-07-13  8:03         ` Jean Abou Samra
@ 2023-07-16 12:21           ` Graham King
  2023-07-16 12:30             ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Graham King @ 2023-07-16 12:21 UTC (permalink / raw)
  To: Lilypond-User Mailing List
  Cc: Dr. Arne Babenhauserheide, Ihor Radchenko, Victor A. Stoichita,
	emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

I'm late to this thread, and I might be missing some crucial aspect of the problem, but if you just want to integrate lilypond scores and fragments into a LaTeX document, and you're able to choose to use Luatex, the lyluatex and lilyglyphs packages work beautifully with the latest Lilypond versions.


I can supply a shortish example if you wish, but I'd rather do that off-list (i) in case it is not helpful to you, and (ii) to avoid cluttering the lists.

-- Graham


[-- Attachment #2: Type: text/html, Size: 1157 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* Re: [BUG] WORG example for ob-lilypond is no longer working as described
  2023-07-16 12:21           ` Graham King
@ 2023-07-16 12:30             ` Ihor Radchenko
  0 siblings, 0 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-16 12:30 UTC (permalink / raw)
  To: Graham King
  Cc: Lilypond-User Mailing List, Dr. Arne Babenhauserheide,
	Victor A. Stoichita, emacs-orgmode

Graham King <lilypond@tremagi.org.uk> writes:

> I'm late to this thread, and I might be missing some crucial aspect of the problem, but if you just want to integrate lilypond scores and fragments into a LaTeX document, and you're able to choose to use Luatex, the lyluatex and lilyglyphs packages work beautifully with the latest Lilypond versions.

ob-lilypond currently does not support :results latex and :results html.
Of course, it could, and not only via LuaTeX.
https://lilypond.org/doc/v2.21/Documentation/usage/html
https://lilypond.org/doc/v2.21/Documentation/usage/latex

But we currently don't have a maintainer for ob-lilypond to work on this...

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-14 18:06             ` Ihor Radchenko
@ 2023-07-17 17:02               ` Jonathan Gregory
  2023-07-18  9:38                 ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-17 17:02 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Hi Ihor,

On 14 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>>> Looks like this on my side as well.
>>
>> Given the feedback, I went ahead and changed the lilypond.org 
>> file:
>>
>> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92
>
> Thanks! It would be even nicer if we allowed 
> https://packages.debian.org/buster/lilypond (2.19.81) or at 
> least https://packages.ubuntu.com/focal/lilypond (2.20.0).
>
> I also checked what will happen with future versions, and it 
> looks like \version "2.24.1" actually means >=.

That's good to know.

I know version 2.20.0 works without the update, so perhaps we 
could set those variables conditionally, WDYT?

\version "2.20"
#(if (ly:get-option 'use-paper-size-for-page)
     (begin (ly:set-option 'use-paper-size-for-page #f)
            (ly:set-option 'tall-page-formats 'pdf)))


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-17 17:02               ` Jonathan Gregory
@ 2023-07-18  9:38                 ` Ihor Radchenko
  2023-07-19 12:17                   ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-18  9:38 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> I also checked what will happen with future versions, and it 
>> looks like \version "2.24.1" actually means >=.
>
> That's good to know.
>
> I know version 2.20.0 works without the update, so perhaps we 
> could set those variables conditionally, WDYT?
>
> \version "2.20"
> #(if (ly:get-option 'use-paper-size-for-page)
>      (begin (ly:set-option 'use-paper-size-for-page #f)
>             (ly:set-option 'tall-page-formats 'pdf)))

I do not mind.
But remember that we are talking just about an example file.
What you are suggesting appears to be closer to what we might do in
ob-lilypond itself, when calculating default layout.

Side note: ob-lilypond even has `org-babel-lilypond-toggle-midi-play'
that plays sound corresponding to the lilypond source. Pretty cool,
especially in the context of the discussion about non-textual output
types in babel. https://list.orgmode.org/orgmode/87ttu95xst.fsf@localhost/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-18  9:38                 ` Ihor Radchenko
@ 2023-07-19 12:17                   ` Jonathan Gregory
  2023-07-20  7:13                     ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-19 12:17 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]


On 18 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>>> I also checked what will happen with future versions, and it 
>>> looks like \version "2.24.1" actually means >=.
>>
>> That's good to know.
>>
>> I know version 2.20.0 works without the update, so perhaps we 
>> could set those variables conditionally, WDYT?
>>
>> \version "2.20"
>> #(if (ly:get-option 'use-paper-size-for-page)
>>      (begin (ly:set-option 'use-paper-size-for-page #f)
>>             (ly:set-option 'tall-page-formats 'pdf)))
>
> I do not mind. But remember that we are talking just about an 
> example file. What you are suggesting appears to be closer to 
> what we might do in ob-lilypond itself, when calculating default 
> layout.

That would be even better, I agree.

Can you test my patch?

Command-line options are normally added to 
`org-babel-lilypond-ly-command`, but since we're trying to set 
variables conditionally to accommodate different versions, I don't 
see how we can do this without using scheme. WDYT?

> Side note: ob-lilypond even has 
> `org-babel-lilypond-toggle-midi-play' that plays sound 
> corresponding to the lilypond source. Pretty cool, especially in 
> the context of the discussion about non-textual output types in 
> babel. 
> https://list.orgmode.org/orgmode/87ttu95xst.fsf@localhost/

Sure, I'll think about adding a MIDI example as well.


-- 
Jonathan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ob-lilypond.el.diff --]
[-- Type: text/x-diff, Size: 1069 bytes --]

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index 9693b89e2..3cbdd2b27 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -183,6 +183,12 @@ specific arguments to =org-babel-tangle=."
 	 (in-file (org-babel-temp-file "lilypond-")))
 
     (with-temp-file in-file
+      ;; To create music fragments suitable for mixing music and text,
+      ;; newer versions of lilypond require setting at least the
+      ;; following two variables introduced in version 2.22.
+      (insert "#(if (ly:get-option 'use-paper-size-for-page)
+(begin (ly:set-option 'use-paper-size-for-page #f)
+(ly:set-option 'tall-page-formats 'pdf)))\n")
       (insert (org-babel-expand-body:generic body params)))
     (org-babel-eval
      (concat
@@ -199,7 +205,9 @@ specific arguments to =org-babel-tangle=."
       (file-name-sans-extension out-file)
       " "
       cmdline
-      in-file) "")) nil)
+      in-file)
+     ""))
+  nil)
 
 (defun org-babel-prep-session:lilypond (_session _params)
   "Return an error because LilyPond exporter does not support sessions."

^ permalink raw reply related	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-19 12:17                   ` Jonathan Gregory
@ 2023-07-20  7:13                     ` Ihor Radchenko
  2023-07-20 17:53                       ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-20  7:13 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> I do not mind. But remember that we are talking just about an 
>> example file. What you are suggesting appears to be closer to 
>> what we might do in ob-lilypond itself, when calculating default 
>> layout.
>
> That would be even better, I agree.
>
> Can you test my patch?

With your patch, I cannot produce png output. The file is just not
created:

#+begin_src lilypond :file ionian.png
\relative c' {
  c d e f
  g a b c
  b a g f
  e d c d
  e f g a
  b c b a
  g f e d
  c1
}
#+end_src

> Command-line options are normally added to 
> `org-babel-lilypond-ly-command`, but since we're trying to set 
> variables conditionally to accommodate different versions, I don't 
> see how we can do this without using scheme. WDYT?

Your approach seems fine.
It is not uncommon for babel backends to add extra code to the src block body.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-20  7:13                     ` Ihor Radchenko
@ 2023-07-20 17:53                       ` Jonathan Gregory
  2023-07-21  7:36                         ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-20 17:53 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]


On 20 Jul 2023, Ihor Radchenko wrote:

> With your patch, I cannot produce png output. The file is just 
> not created: [...]

You're right. Thanks for the feedback.

I've made some changes and was able to produce the correct results 
using pdf, eps, and png (tested with 2.20.0 and 2.24.1). I think 
this gets us closer to the old behaviour, assuming there are no 
other issues, of course.


-- 
Jonathan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ob-lilypond.el.diff --]
[-- Type: text/x-diff, Size: 1887 bytes --]

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index 9693b89e2..8533cd8c7 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -178,28 +178,39 @@ specific arguments to =org-babel-tangle=."
 (defun org-babel-lilypond-process-basic (body params)
   "Execute a lilypond block in basic mode."
   (let* ((out-file (cdr (assq :file params)))
+         (file-type (file-name-extension out-file))
 	 (cmdline (or (cdr (assq :cmdline params))
 		      ""))
 	 (in-file (org-babel-temp-file "lilypond-")))
 
     (with-temp-file in-file
-      (insert (org-babel-expand-body:generic body params)))
+      ;; To create music fragments suitable for mixing music and text,
+      ;; newer versions of lilypond require setting at least the
+      ;; following two variables introduced in version 2.22. See:
+      ;; https://lilypond.org/doc/v2.24/Documentation/usage/other-programs
+      (insert
+       (format "#(if (ly:get-option 'use-paper-size-for-page)
+                     (begin (ly:set-option 'use-paper-size-for-page #f)
+                            (ly:set-option 'tall-page-formats '%s)))\n"
+               file-type)
+       (org-babel-expand-body:generic body params)))
     (org-babel-eval
      (concat
       org-babel-lilypond-ly-command
       " -dbackend=eps "
       "-dno-gs-load-fonts "
       "-dinclude-eps-fonts "
-      (or (cdr (assoc (file-name-extension out-file)
-		      '(("pdf" . "--pdf ")
-			("ps" . "--ps ")
-			("png" . "--png "))))
+      (or (assoc-default file-type
+                         '(("pdf" . "--pdf ")
+			   ("eps" . "--eps ")))
 	  "--png ")
       "--output="
       (file-name-sans-extension out-file)
       " "
       cmdline
-      in-file) "")) nil)
+      in-file)
+     ""))
+  nil)
 
 (defun org-babel-prep-session:lilypond (_session _params)
   "Return an error because LilyPond exporter does not support sessions."

^ permalink raw reply related	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-20 17:53                       ` Jonathan Gregory
@ 2023-07-21  7:36                         ` Ihor Radchenko
  2023-07-21 11:38                           ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-21  7:36 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> On 20 Jul 2023, Ihor Radchenko wrote:
>
>> With your patch, I cannot produce png output. The file is just 
>> not created: [...]
>
> You're right. Thanks for the feedback.
>
> I've made some changes and was able to produce the correct results 
> using pdf, eps, and png (tested with 2.20.0 and 2.24.1). I think 
> this gets us closer to the old behaviour, assuming there are no 
> other issues, of course.

The png is still a full page on my side.
Also, I am getting

Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
Parsing...
/tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version statement found, please add

\version "2.24.0"

for future compatibility
Interpreting music...[8]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `ionian2.eps'...
Converting to PNG...
Success: compilation successfully completed
[ Babel evaluation exited with code 0 ]

which does not look necessary.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-21  7:36                         ` Ihor Radchenko
@ 2023-07-21 11:38                           ` Jonathan Gregory
  2023-07-22  8:12                             ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-21 11:38 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 21 Jul 2023, Ihor Radchenko wrote:

> The png is still a full page on my side.

That's not what I get. You're probably missing the paper settings:

#+begin_src lilypond :exports none
\version "2.20"
\paper {
  indent=0\mm
  tagline=""
  line-width=170\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  bookTitleMarkup=##f
  scoreTitleMarkup=##f
}
#+end_src

> Also, I am getting
>
> Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
> Parsing...
> /tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version 
> statement found, please add
>
> \version "2.24.0"
>
> for future compatibility
> Interpreting music...[8]
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Layout output to `ionian2.eps'...
> Converting to PNG...
> Success: compilation successfully completed
> [ Babel evaluation exited with code 0 ]
>
> which does not look necessary.

What is not necessary? The warning is expected. Other than that 
everything looks fine.


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-21 11:38                           ` Jonathan Gregory
@ 2023-07-22  8:12                             ` Ihor Radchenko
  2023-07-25 16:16                               ` Henrik Frisk
  2023-07-25 17:29                               ` Jonathan Gregory
  0 siblings, 2 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-22  8:12 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> On 21 Jul 2023, Ihor Radchenko wrote:
>
>> The png is still a full page on my side.
>
> That's not what I get. You're probably missing the paper settings:
>
> #+begin_src lilypond :exports none
> \version "2.20"
> \paper {
>   indent=0\mm
>   tagline=""
>   line-width=170\mm
>   oddFooterMarkup=##f
>   oddHeaderMarkup=##f
>   bookTitleMarkup=##f
>   scoreTitleMarkup=##f
> }
> #+end_src

I feel confused. Isn't you patch aiming for auto-sizing the resulting
page to fit the music fragment?

>> Also, I am getting
>>
>> Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
>> Parsing...
>> /tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version 
>> statement found, please add
>>
>> \version "2.24.0"
>>
>> which does not look necessary.
>
> What is not necessary? The warning is expected. Other than that 
> everything looks fine.

I guess I do not fully understand what your patch is trying to achieve.
I thought that the patch would make it not necessary to write some extra
boilerplate code, like \version or specifying the page size.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-22  8:12                             ` Ihor Radchenko
@ 2023-07-25 16:16                               ` Henrik Frisk
  2023-07-25 16:26                                 ` Henrik Frisk
  2023-07-25 17:29                               ` Jonathan Gregory
  1 sibling, 1 reply; 77+ messages in thread
From: Henrik Frisk @ 2023-07-25 16:16 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]

Hi,

I have been struggling with the same issues to but have completely missed
this thread. I haven't tried the patch of ob-lilypond but testing the file
https://git.sr.ht/~bzg/worg/tree/6f69d212f41bc372426dc9b4df286638fe8f2a92/item/org-contrib/babel/examples/lilypond.org
I'm getting cropped output with pdf, but not png (generates full page).
Also, omitting the paper stuff I still get the same cropped output wit pdf:

#+begin_src lilypond :file ionian.png
 \version "2.24.1"
    \relative c' {
      c d e f
      g a b c
      b a g f
      e d c d
      e f g a
      b c b a
      g f e d
      c1
    }
#+end_src

Adding  #(ly:set-option 'crop #t) to the file gives a cropped output in the
file 'ionian.cropped.png' but the ionian.png is still fullpage. I was
looking in ob-lilypond to change the outputfile name but the easy solution
is to just give the cropped name as the :file argument:

:file ionian.cropped.png

Then the file is shown inline in the #+RESULT: block. This works for other
file formats two, like pdf and eps.

Here's a short version:

#+begin_src lilypond :file ionian.cropped.png
  \Version "2.24.1"
    #(ly:set-option 'crop #t)
    \relative c' {
      c d e f
    }
#+end_src

/Henrik


Den lör 22 juli 2023 kl 10:13 skrev Ihor Radchenko <yantar92@posteo.net>:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
> > On 21 Jul 2023, Ihor Radchenko wrote:
> >
> >> The png is still a full page on my side.
> >
> > That's not what I get. You're probably missing the paper settings:
> >
> > #+begin_src lilypond :exports none
> > \version "2.20"
> > \paper {
> >   indent=0\mm
> >   tagline=""
> >   line-width=170\mm
> >   oddFooterMarkup=##f
> >   oddHeaderMarkup=##f
> >   bookTitleMarkup=##f
> >   scoreTitleMarkup=##f
> > }
> > #+end_src
>
> I feel confused. Isn't you patch aiming for auto-sizing the resulting
> page to fit the music fragment?
>
> >> Also, I am getting
> >>
> >> Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
> >> Parsing...
> >> /tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version
> >> statement found, please add
> >>
> >> \version "2.24.0"
> >>
> >> which does not look necessary.
> >
> > What is not necessary? The warning is expected. Other than that
> > everything looks fine.
>
> I guess I do not fully understand what your patch is trying to achieve.
> I thought that the patch would make it not necessary to write some extra
> boilerplate code, like \version or specifying the page size.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
>

[-- Attachment #2: Type: text/html, Size: 4138 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-25 16:16                               ` Henrik Frisk
@ 2023-07-25 16:26                                 ` Henrik Frisk
  2023-07-25 17:17                                   ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Henrik Frisk @ 2023-07-25 16:26 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

Den tis 25 juli 2023 kl 18:16 skrev Henrik Frisk <frisk.h@gmail.com>:

> Hi,
>
> I have been struggling with the same issues to but have completely missed
> this thread. I haven't tried the patch of ob-lilypond but testing the file
> https://git.sr.ht/~bzg/worg/tree/6f69d212f41bc372426dc9b4df286638fe8f2a92/item/org-contrib/babel/examples/lilypond.org
> I'm getting cropped output with pdf, but not png (generates full page).
> Also, omitting the paper stuff I still get the same cropped output wit pdf:
>
> #+begin_src lilypond :file ionian.png
>  \version "2.24.1"
>     \relative c' {
>       c d e f
>       g a b c
>       b a g f
>       e d c d
>       e f g a
>       b c b a
>       g f e d
>       c1
>     }
> #+end_src
>
> Adding  #(ly:set-option 'crop #t) to the file gives a cropped output in
> the file 'ionian.cropped.png' but the ionian.png is still fullpage. I was
> looking in ob-lilypond to change the outputfile name but the easy solution
> is to just give the cropped name as the :file argument:
>
> :file ionian.cropped.png
>
> Then the file is shown inline in the #+RESULT: block. This works for other
> file formats two, like pdf and eps.
>
> Here's a short version:
>
> #+begin_src lilypond :file ionian.cropped.png
>   \Version "2.24.1"
>     #(ly:set-option 'crop #t)
>     \relative c' {
>       c d e f
>     }
> #+end_src
>
> My bad, putting :file ionian.cropped.png only results in
ionian.cropped.cropped.png (as expected). Unclear why it worked the first
couple of times.

/Henrik

[-- Attachment #2: Type: text/html, Size: 2306 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-25 16:26                                 ` Henrik Frisk
@ 2023-07-25 17:17                                   ` Jonathan Gregory
  2023-07-25 21:40                                     ` Henrik Frisk
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-25 17:17 UTC (permalink / raw)
  To: Henrik Frisk
  Cc: Ihor Radchenko, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

Hi Henrik,

On 25 Jul 2023, Henrik Frisk wrote:

> Den tis 25 juli 2023 kl 18:16 skrev Henrik Frisk 
> <frisk.h@gmail.com>:

> My bad, putting :file ionian.cropped.png only results in 
> ionian.cropped.cropped.png (as expected). Unclear why it worked 
> the first couple of times.
>
> /Henrik

No need to crop the output. If you need png, you should use:

#(ly:set-option 'tall-page-formats 'png)


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-22  8:12                             ` Ihor Radchenko
  2023-07-25 16:16                               ` Henrik Frisk
@ 2023-07-25 17:29                               ` Jonathan Gregory
  2023-07-26  8:15                                 ` Ihor Radchenko
  1 sibling, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-25 17:29 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 22 Jul 2023, Ihor Radchenko wrote:

> I guess I do not fully understand what your patch is trying to 
> achieve. I thought that the patch would make it not necessary to 
> write some extra boilerplate code, like \version or specifying 
> the page size.

The purpose of the patch was to fix the problem described in 
https://masto.ai/@rfc1149/110674961710491363. I wasn't trying to 
introduce anything new.

Anyway, I can add version and paper settings as well, but those 
are user settings and I'm not sure that hard-coding them is a good 
idea. What I don't like is having to repeat <<version-and-paper>> 
everywhere. Is there a way of telling org-mode to insert a noweb 
reference from the header? Something like:

#+PROPERTY: header-args:lilypond :prepend <<version-and-paper>>


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-25 17:17                                   ` Jonathan Gregory
@ 2023-07-25 21:40                                     ` Henrik Frisk
  0 siblings, 0 replies; 77+ messages in thread
From: Henrik Frisk @ 2023-07-25 21:40 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Ihor Radchenko, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

Den tis 25 juli 2023 kl 19:26 skrev Jonathan Gregory <jgrg@autistici.org>:

> Hi Henrik,
>
> On 25 Jul 2023, Henrik Frisk wrote:
>
> > Den tis 25 juli 2023 kl 18:16 skrev Henrik Frisk
> > <frisk.h@gmail.com>:
>
> > My bad, putting :file ionian.cropped.png only results in
> > ionian.cropped.cropped.png (as expected). Unclear why it worked
> > the first couple of times.
> >
> > /Henrik
>
> No need to crop the output. If you need png, you should use:
>
> #(ly:set-option 'tall-page-formats 'png)
>
> Makes sense, but I have to admit that I find this a bit confusing. I was
under the impression that the 'crop' option was the preferred way to
accomplish this.

Thanks for resolving this anyway!

/Henrik

[-- Attachment #2: Type: text/html, Size: 1225 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-25 17:29                               ` Jonathan Gregory
@ 2023-07-26  8:15                                 ` Ihor Radchenko
  2023-07-26 12:35                                   ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-26  8:15 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> On 22 Jul 2023, Ihor Radchenko wrote:
>
>> I guess I do not fully understand what your patch is trying to 
>> achieve. I thought that the patch would make it not necessary to 
>> write some extra boilerplate code, like \version or specifying 
>> the page size.
>
> The purpose of the patch was to fix the problem described in 
> https://masto.ai/@rfc1149/110674961710491363. I wasn't trying to 
> introduce anything new.

Ok. That fix has been already installed.
https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92

The other patch for ob-lilypond itself does not appear to be necessary.
I though that you are trying to extend ob-lilypond in that patch. If
not, I still do not understand its purpose. I assume that it should be
ignored.

> Anyway, I can add version and paper settings as well, but those 
> are user settings and I'm not sure that hard-coding them is a good 
> idea. What I don't like is having to repeat <<version-and-paper>> 
> everywhere. Is there a way of telling org-mode to insert a noweb 
> reference from the header? Something like:
>
> #+PROPERTY: header-args:lilypond :prepend <<version-and-paper>>

There is :prologue standard header argument. However, it is currently
not supported by ob-lilypond. (which is a bug)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-26  8:15                                 ` Ihor Radchenko
@ 2023-07-26 12:35                                   ` Jonathan Gregory
  2023-07-27  7:21                                     ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-26 12:35 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode



On 26 Jul 2023, Ihor Radchenko wrote:

> Ok. That fix has been already installed. 
> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92

To the extent of the lilypond.org file, yes, but only if the 
output is a PDF. My suggestion is to revert that commit and 
incorporate the changes into ob-lilypond.

> The other patch for ob-lilypond itself does not appear to be 
> necessary. I though that you are trying to extend ob-lilypond in 
> that patch. If not, I still do not understand its purpose. I 
> assume that it should be ignored.

No, the ob-lilypond patch is needed. It allows users to generate 
music fragments (as opposed to a full page) in basic mode using 
pdf, eps, and png.

>> Anyway, I can add version and paper settings as well, but those 
>> are user settings and I'm not sure that hard-coding them is a 
>> good idea. What I don't like is having to repeat 
>> <<version-and-paper>> everywhere. Is there a way of telling 
>> org-mode to insert a noweb reference from the header? Something 
>> like:
>>
>> #+PROPERTY: header-args:lilypond :prepend <<version-and-paper>>
>
> There is :prologue standard header argument. However, it is 
> currently not supported by ob-lilypond. (which is a bug)

Can you show me how that's done in elisp? I would expect the last 
block to output "foobar".

#+begin_src elisp :noweb-ref test
(setq x "foo" y "bar")
#+end_src

#+begin_src elisp :prologue <<test>> :noweb yes
(concat x y)
#+end_src


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-26 12:35                                   ` Jonathan Gregory
@ 2023-07-27  7:21                                     ` Ihor Radchenko
  2023-07-27 12:42                                       ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-27  7:21 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> Ok. That fix has been already installed. 
>> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92
>
> To the extent of the lilypond.org file, yes, but only if the 
> output is a PDF. My suggestion is to revert that commit and 
> incorporate the changes into ob-lilypond.

Then, may you elaborate what purpose the changes are going to serve?
Automatic page sizing? Automatic page settings?

> The purpose of the patch was to fix the problem described in 
> https://masto.ai/@rfc1149/110674961710491363. I wasn't trying to 
> introduce anything new.

If we want to add boilerplate code to ob-lilypond, it does sound like
introducing something new. Again, I feel confused. Please, explain in
more details what you want to archive in terms of functionality.

> No, the ob-lilypond patch is needed. It allows users to generate 
> music fragments (as opposed to a full page) in basic mode using 
> pdf, eps, and png.

May your please explain what is "basic mode".
And what about users who do want a full page?

>> There is :prologue standard header argument. However, it is 
>> currently not supported by ob-lilypond. (which is a bug)
>
> Can you show me how that's done in elisp? I would expect the last 
> block to output "foobar".
>
> #+begin_src elisp :noweb-ref test
> (setq x "foo" y "bar")
> #+end_src
>
> #+begin_src elisp :prologue <<test>> :noweb yes
> (concat x y)
> #+end_src

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

You can try

#+begin_src gnuplot :prologue set xrange [0:1]
plot x
#+end_src

or

#+begin_src gnuplot :prologue (format "set xrange [0:%d]" 11)
plot x
#+end_src

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-27  7:21                                     ` Ihor Radchenko
@ 2023-07-27 12:42                                       ` Jonathan Gregory
  2023-07-28  7:37                                         ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-27 12:42 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode



On 27 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>>> Ok. That fix has been already installed. 
>>> https://git.sr.ht/~bzg/worg/commit/6f69d212f41bc372426dc9b4df286638fe8f2a92
>>
>> To the extent of the lilypond.org file, yes, but only if the 
>> output is a PDF. My suggestion is to revert that commit and 
>> incorporate the changes into ob-lilypond.
>
> Then, may you elaborate what purpose the changes are going to 
> serve? Automatic page sizing? Automatic page settings?

Bug fix.

>> The purpose of the patch was to fix the problem described in 
>> https://masto.ai/@rfc1149/110674961710491363. I wasn't trying 
>> to introduce anything new.
>
> If we want to add boilerplate code to ob-lilypond, it does sound 
> like introducing something new. Again, I feel confused. Please, 
> explain in more details what you want to archive in terms of 
> functionality.

No, the patch is a bug fix. There are no changes for the user. 
Prior to the bug, we were able generate a "cropped" image when 
running:

#+begin_src lilypond :file myfile.pdf
\version "2.20"
\paper { tagline="" }
{
  c' e' g' e'
}
#+end_src

This is no longer the case, hence the patch.

>> No, the ob-lilypond patch is needed. It allows users to 
>> generate music fragments (as opposed to a full page) in basic 
>> mode using pdf, eps, and png.
>
> May your please explain what is "basic mode".

Basic mode is explained in 
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html. 
In summary:

With basic-mode you can embed LilyPond snippets into an Org-mode 
file, compile and export them using typical Org-mode commands 
(such as C-c C-e l p for PDF export). This is useful if you want 
to mix blocks of LilyPond-generated score with text, and perhaps 
other images to export to LaTeX, Docbook, PDF, or HTML.

> And what about users who do want a full page?

In that case the user would use "arrange mode", which is also 
explained in the ob-doc-lilypond.html page. Try running the source 
block example above with arrange-mode enabled using M-x 
org-babel-lilypond-toggle-arrange-mode. To quote from that page:

With arrange-mode you can develop complete pieces of score whilst 
organizing sections of the piece using typical literate 
programming techniques. This allows you to assemble scores 
programatically by using tables to store information among other 
methods.

> 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.


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-27 12:42                                       ` Jonathan Gregory
@ 2023-07-28  7:37                                         ` Ihor Radchenko
  2023-07-28 14:02                                           ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-28  7:37 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> May your please explain what is "basic mode".
>
> Basic mode is explained in 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html. 
> In summary:
>
> With basic-mode you can embed LilyPond snippets into an Org-mode 
> file, compile and export them using typical Org-mode commands 
> (such as C-c C-e l p for PDF export). This is useful if you want 
> to mix blocks of LilyPond-generated score with text, and perhaps 
> other images to export to LaTeX, Docbook, PDF, or HTML.

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".

What am I missing?

>> And what about users who do want a full page?
>
> In that case the user would use "arrange mode", which is also 
> explained in the ob-doc-lilypond.html page.

Thanks for the clarification!

>> 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

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-28  7:37                                         ` Ihor Radchenko
@ 2023-07-28 14:02                                           ` Jonathan Gregory
  2023-07-29  7:16                                             ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-28 14:02 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


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


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-28 14:02                                           ` Jonathan Gregory
@ 2023-07-29  7:16                                             ` Ihor Radchenko
  2023-07-31 11:14                                               ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-29  7:16 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> The basic-mode term is not very helpful. Perhaps 
> [inline/cropped/embedded]-mode would have been more descriptive in 
> terms of what it does.

Sounds reasonable. I like "inline-mode", although no strong opinion.

> ... 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.

Do people have reasons to use older versions even when they could use
the newest?

For example, python2/3 or MathJax4,4- were breaking and some people were
relying on legacy code. So, we had to provide some extra versions checks
and toggles on Org side as well.

>> #+name: test
>> #+begin_src emacs-lisp
>> (message "This is test")
>> #+end_src
>>
>> #+begin_src emacs-lisp :prologue (org-sbe test)
>> (+ 1 2)
>> #+end_src

Correction: `org-sbe' will execute src block. So, my example is not
completely accurate. Getting src block body is still doable, but a tiny
bit more tricky:

#+begin_src emacs-lisp :prologue (org-babel-ref-resolve "test[]")
(+ 1 2)
#+end_src

It think that it will be logical to add reference resolution to
:prologue/:epilogue. I will see what I can do.
(I may need to look through which header args are resolved and which are
not - there seems to be no consistency)

> 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)

(This will work because ob-org, by accident, produces body as result of
evaluation, with default header args)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-29  7:16                                             ` Ihor Radchenko
@ 2023-07-31 11:14                                               ` Jonathan Gregory
  2023-07-31 11:58                                                 ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-31 11:14 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 29 Jul 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>> The basic-mode term is not very helpful. Perhaps 
>> [inline/cropped/embedded]-mode would have been more descriptive 
>> in terms of what it does.
>
> Sounds reasonable. I like "inline-mode", although no strong 
> opinion.

I like it too.

>> ... 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.
>
> Do people have reasons to use older versions even when they 
> could use the newest?

Probably not.

> For example, python2/3 or MathJax4,4- were breaking and some 
> people were relying on legacy code. So, we had to provide some 
> extra versions checks and toggles on Org side as well.

We're talking about different things here. Lilypond needs the 
\version to upgrade the syntax. IIUC this makes it possible for a 
future version to compile input code correctly, even if it was 
written in a previous version (which may have used some different 
syntax), as long as the \version is included in the main file. 
There's even a `convert-ly` command to make upgrades based on the 
\version, so I'd suggest moving only \paper settings to the 
ob-lilypond file and keeping the \version in the source file.

>>> #+name: test
>>> #+begin_src emacs-lisp
>>> (message "This is test")
>>> #+end_src
>>>
>>> #+begin_src emacs-lisp :prologue (org-sbe test)
>>> (+ 1 2)
>>> #+end_src
>
> Correction: `org-sbe' will execute src block. So, my example is 
> not completely accurate. Getting src block body is still doable, 
> but a tiny bit more tricky:
>
> #+begin_src emacs-lisp :prologue (org-babel-ref-resolve 
> "test[]")
> (+ 1 2)
> #+end_src
>
> It think that it will be logical to add reference resolution to 
> :prologue/:epilogue. I will see what I can do. (I may need to 
> look through which header args are resolved and which are not - 
> there seems to be no consistency)

What do you mean by reference resolution? FWIW :prologue 
(org-babel-ref-resolve "test[]") works even if "test" is a 
lilypond source block. This is good. Again, no need to add 
<<test>> to all lilypond blocks.

>> 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)
>
> (This will work because ob-org, by accident, produces body as 
> result of evaluation, with default header args)

-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-31 11:14                                               ` Jonathan Gregory
@ 2023-07-31 11:58                                                 ` Ihor Radchenko
  2023-07-31 12:42                                                   ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-07-31 11:58 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> For example, python2/3 or MathJax4,4- were breaking and some 
>> people were relying on legacy code. So, we had to provide some 
>> extra versions checks and toggles on Org side as well.
>
> We're talking about different things here. Lilypond needs the 
> \version to upgrade the syntax. IIUC this makes it possible for a 
> future version to compile input code correctly, even if it was 
> written in a previous version (which may have used some different 
> syntax), as long as the \version is included in the main file. 
> There's even a `convert-ly` command to make upgrades based on the 
> \version, so I'd suggest moving only \paper settings to the 
> ob-lilypond file and keeping the \version in the source file.

May it be possible to mix multiple \version commands?
So that we declare \version for \paper and user can declare other
\version for the code block body.

>> #+begin_src emacs-lisp :prologue (org-babel-ref-resolve 
>> "test[]")
>> (+ 1 2)
>> #+end_src
>>
>> It think that it will be logical to add reference resolution to 
>> :prologue/:epilogue. I will see what I can do. (I may need to 
>> look through which header args are resolved and which are not - 
>> there seems to be no consistency)
>
> What do you mean by reference resolution?

#+begin_src emacs-lisp :prologue test[]

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-31 11:58                                                 ` Ihor Radchenko
@ 2023-07-31 12:42                                                   ` Jonathan Gregory
  2023-08-08 13:01                                                     ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-07-31 12:42 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 31 Jul 2023, Ihor Radchenko wrote:

> May it be possible to mix multiple \version commands? So that we 
> declare \version for \paper and user can declare other \version 
> for the code block body.

Probably not. Wouldn't that confuse the compiler? In any case, the 
\version number is relative to the lilypond version for which the 
input file was written, so it's up to the user to provide that 
information.


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-07-31 12:42                                                   ` Jonathan Gregory
@ 2023-08-08 13:01                                                     ` Ihor Radchenko
  2023-08-10 11:05                                                       ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-08 13:01 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> On 31 Jul 2023, Ihor Radchenko wrote:
>
>> May it be possible to mix multiple \version commands? So that we 
>> declare \version for \paper and user can declare other \version 
>> for the code block body.
>
> Probably not. Wouldn't that confuse the compiler? In any case, the 
> \version number is relative to the lilypond version for which the 
> input file was written, so it's up to the user to provide that 
> information.

Jonathan, do you think that your original patch is still what you want
to get merged? Or do you want to update it?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-08 13:01                                                     ` Ihor Radchenko
@ 2023-08-10 11:05                                                       ` Jonathan Gregory
  2023-08-11  7:04                                                         ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-08-10 11:05 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Hi Ihor,

On 08 Aug 2023, Ihor Radchenko wrote:

> Jonathan, do you think that your original patch is still what 
> you want to get merged?

Yes, the one I sent on 20 Jul 2023. I haven't had any issues with 
it so far.


-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-10 11:05                                                       ` Jonathan Gregory
@ 2023-08-11  7:04                                                         ` Ihor Radchenko
  2023-08-15  7:33                                                           ` Henrik Frisk
                                                                             ` (2 more replies)
  0 siblings, 3 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-11  7:04 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> Jonathan, do you think that your original patch is still what 
>> you want to get merged?
>
> Yes, the one I sent on 20 Jul 2023. I haven't had any issues with 
> it so far.

Ok. Would you mind adding a commit message, as described in
https://orgmode.org/worg/org-contribute.html#first-patch?

And do I understand correctly that no changes in
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
are needed?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-11  7:04                                                         ` Ihor Radchenko
@ 2023-08-15  7:33                                                           ` Henrik Frisk
  2023-08-15 10:41                                                             ` Ihor Radchenko
  2023-08-16 12:54                                                           ` Jonathan Gregory
  2023-08-19 12:56                                                           ` Jonathan Gregory
  2 siblings, 1 reply; 77+ messages in thread
From: Henrik Frisk @ 2023-08-15  7:33 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

Den fre 11 aug. 2023 kl 09:04 skrev Ihor Radchenko <yantar92@posteo.net>:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
> >> Jonathan, do you think that your original patch is still what
> >> you want to get merged?
> >
> > Yes, the one I sent on 20 Jul 2023. I haven't had any issues with
> > it so far.
>
> Ok. Would you mind adding a commit message, as described in
> https://orgmode.org/worg/org-contribute.html#first-patch?
>
> And do I understand correctly that no changes in
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
> are needed?
>
> Sorry for being late in this discussion. As a user of ob-lilypond I'm very
happy about these changes. On my last install, as well as my current I have
had to change the following:

(org-babel-get-header params :var) which appears to be outdated, to:

(org-babel--get-vars params)

in the version of ob-lilypond.el from here:
https://github.com/mjago/ob-lilypond/blob/master/lisp/ob-lilypond.el. Which
version of the file are you patching now?

Another request would be to have the variables ly-XXX-pdf-path and
ly-XXX-midi-path settable, or, perhaps, read from the lilypond settings of
corresponding variables. I'm not an elisp programmer but I could look into
that if it's of interest.

/Henrik

[-- Attachment #2: Type: text/html, Size: 2180 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-15  7:33                                                           ` Henrik Frisk
@ 2023-08-15 10:41                                                             ` Ihor Radchenko
  2023-08-15 15:57                                                               ` Henrik Frisk
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-15 10:41 UTC (permalink / raw)
  To: Henrik Frisk
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	emacs-orgmode

Henrik Frisk <frisk.h@gmail.com> writes:

> Sorry for being late in this discussion. As a user of ob-lilypond I'm very
> happy about these changes. On my last install, as well as my current I have
> had to change the following:
>
> (org-babel-get-header params :var) which appears to be outdated, to:
>
> (org-babel--get-vars params)

There is no such function `org-babel-get-header'.

> in the version of ob-lilypond.el from here:
> https://github.com/mjago/ob-lilypond/blob/master/lisp/ob-lilypond.el. Which
> version of the file are you patching now?

ob-lilypond is distributed together with Org mode
(https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/ob-lilypond.el).
And you are looking at 12 years old early version of the library.

> Another request would be to have the variables ly-XXX-pdf-path and
> ly-XXX-midi-path settable, or, perhaps, read from the lilypond settings of
> corresponding variables. I'm not an elisp programmer but I could look into
> that if it's of interest.

Sorry, but I am not sure what you are talking about. May you elaborate?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-15 10:41                                                             ` Ihor Radchenko
@ 2023-08-15 15:57                                                               ` Henrik Frisk
  2023-08-15 16:04                                                                 ` Ihor Radchenko
  0 siblings, 1 reply; 77+ messages in thread
From: Henrik Frisk @ 2023-08-15 15:57 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

On Tue, Aug 15, 2023, 12:41 PM Ihor Radchenko <yantar92@posteo.net> wrote:

> Henrik Frisk <frisk.h@gmail.com> writes:
>
> > Sorry for being late in this discussion. As a user of ob-lilypond I'm
> very
> > happy about these changes. On my last install, as well as my current I
> have
> > had to change the following:
> >
> > (org-babel-get-header params :var) which appears to be outdated, to:
> >
> > (org-babel--get-vars params)
>
> There is no such function `org-babel-get-header'.
>
> > in the version of ob-lilypond.el from here:
> > https://github.com/mjago/ob-lilypond/blob/master/lisp/ob-lilypond.el.
> Which
> > version of the file are you patching now?
>
> ob-lilypond is distributed together with Org mode
> (
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/ob-lilypond.el
> ).
> And you are looking at 12 years old early version of the library.
>

I know it is and I didn't know it was maintained so I've kept using this
old version updating it myself. In that case you can probably safely ignore
what I wrote below. Great to know it's part of org...

[-- Attachment #2: Type: text/html, Size: 1840 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-15 15:57                                                               ` Henrik Frisk
@ 2023-08-15 16:04                                                                 ` Ihor Radchenko
  0 siblings, 0 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-15 16:04 UTC (permalink / raw)
  To: Henrik Frisk
  Cc: Jonathan Gregory, Dr. Arne Babenhauserheide, Victor A. Stoichita,
	org-mode-email

Henrik Frisk <frisk.h@gmail.com> writes:

>> ob-lilypond is distributed together with Org mode
> ...
> I know it is and I didn't know it was maintained so I've kept using this
> old version updating it myself. In that case you can probably safely ignore
> what I wrote below. Great to know it's part of org...

It is a bit of exaggeration to say that it is maintained, unfortunately.
The file does not currently have a dedicated maintainer and regular Org
contributors are not very familiar with lilypond...
So, we mostly fix the Elisp side bugs, keeping things in working state
(hopefully).

Luckily, we do not have many bug reports related to ob-lilypond.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-11  7:04                                                         ` Ihor Radchenko
  2023-08-15  7:33                                                           ` Henrik Frisk
@ 2023-08-16 12:54                                                           ` Jonathan Gregory
  2023-08-17 10:26                                                             ` Ihor Radchenko
  2023-08-19 12:56                                                           ` Jonathan Gregory
  2 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-08-16 12:54 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

Hi Ihor,

On 11 Aug 2023, Ihor Radchenko wrote:

> Ok. Would you mind adding a commit message, as described in 
> https://orgmode.org/worg/org-contribute.html#first-patch?

Patch attached. I also attached a test file.

> And do I understand correctly that no changes in 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
> are needed?

Probably not, but I'll check.

-- 
Jonathan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bugfix-ob-lilypond.patch --]
[-- Type: text/x-diff, Size: 2444 bytes --]

commit 8916c9ebbefb1b1d448e0e39998f9b9a3b054680
Author: Jonathan Gregory <jgrg@autistici.org>
Date:   Wed Aug 16 09:47:09 2023 -0300

    lisp/ob-lilypond.el: Prevent full page results in basic-mode
    
    * ob-lilypond.el (org-babel-lilypond-paper-settings): New variable.
    Link: https://list.orgmode.org/87a5w15jur.fsf@localhost/
    
    TINYCHANGE

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index 9693b89e2..ad8371c5f 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -175,31 +175,51 @@ specific arguments to =org-babel-tangle=."
   (if (org-babel-tangle nil "yes" "lilypond")
       (org-babel-lilypond-execute-tangled-ly) nil))
 
+;; https://lilypond.org/doc/v2.24/Documentation/usage/other-programs
+(defvar org-babel-lilypond-paper-settings
+  "#(if (ly:get-option 'use-paper-size-for-page)
+            (begin (ly:set-option 'use-paper-size-for-page #f)
+                   (ly:set-option 'tall-page-formats '%s)))
+\\paper {
+  indent=0\\mm
+  tagline=\"\"
+  oddFooterMarkup=##f
+  oddHeaderMarkup=##f
+  bookTitleMarkup=##f
+  scoreTitleMarkup=##f
+}\n"
+  "The paper settings required to generate music fragments.
+They are needed for mixing music and text in basic-mode.")
+
 (defun org-babel-lilypond-process-basic (body params)
   "Execute a lilypond block in basic mode."
   (let* ((out-file (cdr (assq :file params)))
+         (file-type (file-name-extension out-file))
 	 (cmdline (or (cdr (assq :cmdline params))
 		      ""))
 	 (in-file (org-babel-temp-file "lilypond-")))
 
     (with-temp-file in-file
-      (insert (org-babel-expand-body:generic body params)))
+      (insert
+       (format org-babel-lilypond-paper-settings file-type)
+       (org-babel-expand-body:generic body params)))
     (org-babel-eval
      (concat
       org-babel-lilypond-ly-command
       " -dbackend=eps "
       "-dno-gs-load-fonts "
       "-dinclude-eps-fonts "
-      (or (cdr (assoc (file-name-extension out-file)
-		      '(("pdf" . "--pdf ")
-			("ps" . "--ps ")
-			("png" . "--png "))))
+      (or (assoc-default file-type
+                         '(("pdf" . "--pdf ")
+			   ("eps" . "--eps ")))
 	  "--png ")
       "--output="
       (file-name-sans-extension out-file)
       " "
       cmdline
-      in-file) "")) nil)
+      in-file)
+     ""))
+  nil)
 
 (defun org-babel-prep-session:lilypond (_session _params)
   "Return an error because LilyPond exporter does not support sessions."

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: test.org --]
[-- Type: text/x-org, Size: 591 bytes --]

#+title: Test
#+PROPERTY: header-args:lilypond :noweb yes :exports results
#+PROPERTY: header-args:lilypond :prologue (org-babel-ref-resolve "settings[]")

Some text.

#+begin_src lilypond :file myfile.pdf
\score {
  \new Staff \relative c' {
    \tempo 4 = 160
    c4 e g b
    c4 b d c
    \tempo 4 = 96
    d,4 fis a cis
    d4 cis e d
  }
  \layout { }
  \midi { }
}
#+end_src

#+results:
[[file:myfile.pdf]]

Click [[file:myfile.midi][here]] to listen to the MIDI output.

#+name: settings
#+begin_src lilypond :exports none
\version "2.24.1"
% More lilypond settings here...
#+end_src

^ permalink raw reply related	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-16 12:54                                                           ` Jonathan Gregory
@ 2023-08-17 10:26                                                             ` Ihor Radchenko
  0 siblings, 0 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-17 10:26 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>> Ok. Would you mind adding a commit message, as described in 
>> https://orgmode.org/worg/org-contribute.html#first-patch?
>
> Patch attached. I also attached a test file.

Thanks!
Applied, onto main.
Fixed.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f78a3c2bd

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-11  7:04                                                         ` Ihor Radchenko
  2023-08-15  7:33                                                           ` Henrik Frisk
  2023-08-16 12:54                                                           ` Jonathan Gregory
@ 2023-08-19 12:56                                                           ` Jonathan Gregory
  2023-08-20  7:20                                                             ` Ihor Radchenko
  2 siblings, 1 reply; 77+ messages in thread
From: Jonathan Gregory @ 2023-08-19 12:56 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 11 Aug 2023, Ihor Radchenko wrote:

> And do I understand correctly that no changes in 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
> are needed?

ob-doc-lilypond.html looks good, but I changed lilypond.org in:

https://git.sr.ht/~bzg/worg/commit/6b9da77c8078be183971575fdc79d402bf6184c2

-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-19 12:56                                                           ` Jonathan Gregory
@ 2023-08-20  7:20                                                             ` Ihor Radchenko
  2023-08-20 12:47                                                               ` Jonathan Gregory
  0 siblings, 1 reply; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-20  7:20 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

> ob-doc-lilypond.html looks good, but I changed lilypond.org in:
>
> https://git.sr.ht/~bzg/worg/commit/6b9da77c8078be183971575fdc79d402bf6184c2

> -  b c d e
> +  b4 c d e

Is there any specific reason for this change?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-20  7:20                                                             ` Ihor Radchenko
@ 2023-08-20 12:47                                                               ` Jonathan Gregory
  2023-08-20 13:46                                                                 ` Dr. Arne Babenhauserheide
  2023-08-21  7:48                                                                 ` Ihor Radchenko
  0 siblings, 2 replies; 77+ messages in thread
From: Jonathan Gregory @ 2023-08-20 12:47 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode


On 20 Aug 2023, Ihor Radchenko wrote:

> Jonathan Gregory <jgrg@autistici.org> writes:
>
>> ob-doc-lilypond.html looks good, but I changed lilypond.org in:
>>
>> https://git.sr.ht/~bzg/worg/commit/6b9da77c8078be183971575fdc79d402bf6184c2
>
>> -  b c d e
>> +  b4 c d e
>
> Is there any specific reason for this change?

This is to ensure that the notes use the correct duration in 
arrange-mode. 4 is the default duration and is carried over until 
a new value is added, in this case c1. 1 is then carried over 
making all subsequent "e"s have a value of 1, which is incorrect.

#+begin_src lilypond
{
  b c c c c1
}
#+end_src

#+begin_src lilypond
{
  e e e e f1
}
#+end_src

In basic-mode it makes no difference, but that's assuming the 
default value never changes. BTW I prefer inline-mode over 
basic-mode, but I'll leave that for a future time.

-- 
Jonathan


^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-20 12:47                                                               ` Jonathan Gregory
@ 2023-08-20 13:46                                                                 ` Dr. Arne Babenhauserheide
  2023-08-21  7:48                                                                 ` Ihor Radchenko
  1 sibling, 0 replies; 77+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-08-20 13:46 UTC (permalink / raw)
  To: Jonathan Gregory; +Cc: Ihor Radchenko, Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]


Jonathan Gregory <jgrg@autistici.org> writes:

> On 20 Aug 2023, Ihor Radchenko wrote:
>
>> Jonathan Gregory <jgrg@autistici.org> writes:
>>
>>> ob-doc-lilypond.html looks good, but I changed lilypond.org in:
>>>
>>> https://git.sr.ht/~bzg/worg/commit/6b9da77c8078be183971575fdc79d402bf6184c2
>>
>>> -  b c d e
>>> +  b4 c d e
>>
>> Is there any specific reason for this change?
>
> This is to ensure that the notes use the correct duration in 
> arrange-mode. 4 is the default duration and is carried over until 
> a new value is added, in this case c1. 1 is then carried over 
> making all subsequent "e"s have a value of 1, which is incorrect.

This looks safe to me. Omitting the duration in the next line is a
mistake I made a few times, so I think it’s a good change to have.

Could you add a comment before the prologue-line
#+PROPERTY: header-args:lilypond :prologue (org-babel-ref-resolve "settings[]")
that this uses the source-block named settings?

Calling org-babel-ref-resolve directly there is something I have not
seen before so I think it won’t be obvious from the documentation.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 77+ messages in thread

* 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?)
  2023-08-20 12:47                                                               ` Jonathan Gregory
  2023-08-20 13:46                                                                 ` Dr. Arne Babenhauserheide
@ 2023-08-21  7:48                                                                 ` Ihor Radchenko
  1 sibling, 0 replies; 77+ messages in thread
From: Ihor Radchenko @ 2023-08-21  7:48 UTC (permalink / raw)
  To: Jonathan Gregory
  Cc: Dr. Arne Babenhauserheide, Victor A. Stoichita, emacs-orgmode

Jonathan Gregory <jgrg@autistici.org> writes:

>>> -  b c d e
>>> +  b4 c d e
>>
>> Is there any specific reason for this change?
>
> This is to ensure that the notes use the correct duration in 
> arrange-mode. 4 is the default duration and is carried over until 
> a new value is added, in this case c1. 1 is then carried over 
> making all subsequent "e"s have a value of 1, which is incorrect.

I see.
For future, please make sure to document every change in the commit
message. Or future readers might be confused about the purpose.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 77+ messages in thread

end of thread, other threads:[~2023-08-21  7:48 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 15:13 Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
2021-05-03 17:49 ` Timothy
2021-05-03 18:05   ` Bastien
2021-05-03 19:36     ` Palak Mathur
2021-05-03 19:44       ` Timothy
2021-05-03 19:47         ` Palak Mathur
2021-05-03 20:34         ` Bastien
2021-05-03 20:33       ` Bastien
2021-05-04  7:55   ` Eric S Fraga
2021-05-19  3:36     ` Jack Kamm
2021-05-03 20:52 ` Victor A. Stoichita
2021-05-04 10:19   ` Dr. Arne Babenhauserheide
2021-05-04 11:28     ` Bastien
2021-05-04 18:38       ` Victor A. Stoichita
2023-07-12 13:40     ` [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?) Ihor Radchenko
2023-07-12 22:35       ` Jonathan Gregory
2023-07-13  6:52         ` Dr. Arne Babenhauserheide
2023-07-13 10:08         ` Ihor Radchenko
2023-07-13 11:04           ` Jonathan Gregory
2023-07-14 12:38           ` Jonathan Gregory
2023-07-14 13:15             ` Dr. Arne Babenhauserheide
2023-07-14 13:52               ` Ihor Radchenko
2023-07-14 18:06             ` Ihor Radchenko
2023-07-17 17:02               ` Jonathan Gregory
2023-07-18  9:38                 ` Ihor Radchenko
2023-07-19 12:17                   ` Jonathan Gregory
2023-07-20  7:13                     ` Ihor Radchenko
2023-07-20 17:53                       ` Jonathan Gregory
2023-07-21  7:36                         ` Ihor Radchenko
2023-07-21 11:38                           ` Jonathan Gregory
2023-07-22  8:12                             ` Ihor Radchenko
2023-07-25 16:16                               ` Henrik Frisk
2023-07-25 16:26                                 ` Henrik Frisk
2023-07-25 17:17                                   ` Jonathan Gregory
2023-07-25 21:40                                     ` Henrik Frisk
2023-07-25 17:29                               ` Jonathan Gregory
2023-07-26  8:15                                 ` Ihor Radchenko
2023-07-26 12:35                                   ` Jonathan Gregory
2023-07-27  7:21                                     ` Ihor Radchenko
2023-07-27 12:42                                       ` Jonathan Gregory
2023-07-28  7:37                                         ` Ihor Radchenko
2023-07-28 14:02                                           ` Jonathan Gregory
2023-07-29  7:16                                             ` Ihor Radchenko
2023-07-31 11:14                                               ` Jonathan Gregory
2023-07-31 11:58                                                 ` Ihor Radchenko
2023-07-31 12:42                                                   ` Jonathan Gregory
2023-08-08 13:01                                                     ` Ihor Radchenko
2023-08-10 11:05                                                       ` Jonathan Gregory
2023-08-11  7:04                                                         ` Ihor Radchenko
2023-08-15  7:33                                                           ` Henrik Frisk
2023-08-15 10:41                                                             ` Ihor Radchenko
2023-08-15 15:57                                                               ` Henrik Frisk
2023-08-15 16:04                                                                 ` Ihor Radchenko
2023-08-16 12:54                                                           ` Jonathan Gregory
2023-08-17 10:26                                                             ` Ihor Radchenko
2023-08-19 12:56                                                           ` Jonathan Gregory
2023-08-20  7:20                                                             ` Ihor Radchenko
2023-08-20 12:47                                                               ` Jonathan Gregory
2023-08-20 13:46                                                                 ` Dr. Arne Babenhauserheide
2023-08-21  7:48                                                                 ` Ihor Radchenko
2023-07-13  6:33       ` [BUG] WORG example for ob-lilypond is no longer working as described Dr. Arne Babenhauserheide
2023-07-13  7:03         ` Dr. Arne Babenhauserheide
2023-07-13  8:03         ` Jean Abou Samra
2023-07-16 12:21           ` Graham King
2023-07-16 12:30             ` Ihor Radchenko
2021-05-04 11:32   ` Moving some lisp/ob-*.el files to org-contrib - your advice? Bastien
2021-05-03 22:19 ` Tim Cross
2021-05-03 23:15   ` Bastien
2021-05-04 10:19 ` Dr. Arne Babenhauserheide
2021-05-04 11:10   ` Bastien
2021-09-26  8:17   ` Bastien
2021-05-06  9:19 ` Jean Louis
2021-05-06  9:39   ` Bastien
2021-05-14 18:23 ` Greg Minshall
2021-05-17 16:39   ` Greg Minshall
2021-09-26 12:50 ` Bastien Guerry
2021-10-02 17:11 ` Bastien Guerry

Code repositories for project(s) associated with this public 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).