emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Orgmode Latex Export with Babel/LilyPond
@ 2019-04-20 12:04 Jakob Schöttl
  2020-01-10  9:31 ` adam
  2020-01-11 15:29 ` Jonathan Gregory
  0 siblings, 2 replies; 9+ messages in thread
From: Jakob Schöttl @ 2019-04-20 12:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'm trying (second attempt), to setup orgmode to export PDFs with images 
generated by Babel/LilyPond.

I followed the setup instructions here:

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html

I have

a recent emacs (Arch Linux),

~/.emacs file with

(org-babel-do-load-languages
   'org-babel-load-languages
   '((lilypond t)))

(although I saw many other snippets where there is a "." between the 
(lilypond t)). I tried both variants.

I tried also tried (require 'lilypond) instead 
org-babel-do-load-languages which caused an error.

I pressed C-c C-e l p -> "PDF file produced."

But no images are generated and no images appear in the PDF. Only plain 
source code.

Any ideas?
Thank you!

- Jakob

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2019-04-20 12:04 Orgmode Latex Export with Babel/LilyPond Jakob Schöttl
@ 2020-01-10  9:31 ` adam
  2020-01-11  9:58   ` adam
  2020-01-11 15:29 ` Jonathan Gregory
  1 sibling, 1 reply; 9+ messages in thread
From: adam @ 2020-01-10  9:31 UTC (permalink / raw)
  To: Jakob Schöttl, emacs-orgmode

On Sat, 2019-04-20 at 14:04 +0200, Jakob Schöttl wrote:
> Hi,
> 
> I'm trying (second attempt), to setup orgmode to export PDFs with images 
> generated by Babel/LilyPond.
> 
> I followed the setup instructions here:
> 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
> 
> I have
> 
> a recent emacs (Arch Linux),
> 
> ~/.emacs file with
> 
> (org-babel-do-load-languages
>    'org-babel-load-languages
>    '((lilypond t)))
> 
> (although I saw many other snippets where there is a "." between the 
> (lilypond t)). I tried both variants.
> 
> I tried also tried (require 'lilypond) instead 
> org-babel-do-load-languages which caused an error.
> 
> I pressed C-c C-e l p -> "PDF file produced."
> 
> But no images are generated and no images appear in the PDF. Only plain 
> source code.
> 
> Any ideas?
> Thank you!
> 
> - Jakob
> 
> 

I too, find the Setup instructions at 
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
difficult to interpret. 

This page says under Setup; 
- must be on a very recent version of org-mode 
- ob-lilypond is also included in the latest Org-mode by default (it seems its not)
- add lilypond to your list of babel languages 


My Org-mode version 9.1.9  Emacs version 26.3 

lilypond has been added to my list of babel languages 

I found lilypond-mode.el  and syntax is colored, that seems to work 

I have grabbed recent  ob-babel-lilypond.el  from github, and put 
that into /usr/share/emacs/site-lisp/  


How or where do I load  ob-babel-lilypond.el   ? 

Presently, I cannot tangle the org lilypond examples, and have no M-x ly-*  commands. 

Raw text Lilypond will compile and output OK. And org LaTeX export is working. 

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-10  9:31 ` adam
@ 2020-01-11  9:58   ` adam
  2020-01-11 15:30     ` Jonathan Gregory
  0 siblings, 1 reply; 9+ messages in thread
From: adam @ 2020-01-11  9:58 UTC (permalink / raw)
  To: emacs-orgmode

Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
shown here, 
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 

My current problem is Emacs rejecting the addition of either Lilypond or 
lilypond, in the  org-babel-do-load-languages  

   (org-babel-do-load-languages
     'org-babel-load-languages
     '(
       (emacs-lisp . t)
       (shell . t)
       (org . t)
       (Lilypond . t)
       )) 

including either in the last line causes an error at Emacs startup, reported as, 

   Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
   Symbol's value as variable is void: <!DOCTYPE


Earlier in my .emacs init file, I had hopefully defined lilypond, thus 

   (setq ly-nix-ly-path "lilypond")

   (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 

   (autoload 'LilyPond-mode "lilypond-mode")

   (setq auto-mode-alist
         (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))

   (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 


In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
are located,

   lilypond-font-lock.el
   lilypond-indent.el
   lilypond-init.el
   lilypond-mode.el
   lilypond-song.el
   lilypond-what-beat.el
   lilypond-words.el
   ltx-help.el
   ob-lilypond.el
   ob-Lilypond.el
   ob-lisp.el
   org-tests.el


$ which lilypond     is unhelpful,

   /usr/bin/lilypond 


The lilypond installation is at, 

   /usr/share/lilypond/2.18.2/ 


Any advice or suggestions would be most welcome. 

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2019-04-20 12:04 Orgmode Latex Export with Babel/LilyPond Jakob Schöttl
  2020-01-10  9:31 ` adam
@ 2020-01-11 15:29 ` Jonathan Gregory
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Gregory @ 2020-01-11 15:29 UTC (permalink / raw)
  To: emacs-orgmode



On 20 Apr 2019, Jakob Schöttl <jschoett@gmail.com> wrote:

> Hi,
>
> I'm trying (second attempt), to setup orgmode to export PDFs with
> images generated by Babel/LilyPond.
>
> I followed the setup instructions here:
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
>
> I have
>
> a recent emacs (Arch Linux),
>
> ~/.emacs file with
>
> (org-babel-do-load-languages
>   'org-babel-load-languages
>   '((lilypond t)))
>
> (although I saw many other snippets where there is a "." between the
> (lilypond t)). I tried both variants.
>
> I tried also tried (require 'lilypond) instead
> org-babel-do-load-languages which caused an error.
>
> I pressed C-c C-e l p -> "PDF file produced."
>
> But no images are generated and no images appear in the PDF. Only
> plain source code.
>
> Any ideas?
> Thank you!
>
> - Jakob

I tried the first example with emacs -Q using Org versions 9.1.9 and 9.3.1, and there were a few things I had to change to generate the image correctly after C-c C-e l p:

- Add `:results file :exports results` to the header,
- change \relative c’ to \relative c', and
- add the missing the #+end_src part.

The configuration I used:

(add-to-list 'load-path "/usr/share/emacs/site-lisp")
(require 'lilypond-mode)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((lilypond . t)))

-- 
Jonathan

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-11  9:58   ` adam
@ 2020-01-11 15:30     ` Jonathan Gregory
  2020-01-11 20:04       ` adam
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Gregory @ 2020-01-11 15:30 UTC (permalink / raw)
  To: emacs-orgmode



On 11 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:

> Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
> shown here, 
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
>
> My current problem is Emacs rejecting the addition of either Lilypond or 
> lilypond, in the  org-babel-do-load-languages  
>
>    (org-babel-do-load-languages
>      'org-babel-load-languages
>      '(
>        (emacs-lisp . t)
>        (shell . t)
>        (org . t)
>        (Lilypond . t)
>        )) 
>
> including either in the last line causes an error at Emacs startup, reported as, 
>
>    Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
>    Symbol's value as variable is void: <!DOCTYPE
>
>
> Earlier in my .emacs init file, I had hopefully defined lilypond, thus 
>
>    (setq ly-nix-ly-path "lilypond")
>
>    (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 
>
>    (autoload 'LilyPond-mode "lilypond-mode")
>
>    (setq auto-mode-alist
>          (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
>
>    (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 
>
>
> In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
> are located,
>
>    lilypond-font-lock.el
>    lilypond-indent.el
>    lilypond-init.el
>    lilypond-mode.el
>    lilypond-song.el
>    lilypond-what-beat.el
>    lilypond-words.el
>    ltx-help.el
>    ob-lilypond.el
>    ob-Lilypond.el
>    ob-lisp.el
>    org-tests.el
>
>
> $ which lilypond     is unhelpful,
>
>    /usr/bin/lilypond 
>
>
> The lilypond installation is at, 
>
>    /usr/share/lilypond/2.18.2/ 
>
>
> Any advice or suggestions would be most welcome. 

Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypond.el AFAIK. Also, where is ly-nix-ly-path and other ly-* variables defined? I don't see these variables.

-- 
Jonathan

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-11 15:30     ` Jonathan Gregory
@ 2020-01-11 20:04       ` adam
  2020-01-11 21:43         ` adam
  0 siblings, 1 reply; 9+ messages in thread
From: adam @ 2020-01-11 20:04 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, 2020-01-11 at 12:30 -0300, Jonathan Gregory wrote:
> 
> On 11 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:
> 
> > 
> > Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
> > shown here, 
> > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
> > 
> > My current problem is Emacs rejecting the addition of either Lilypond or 
> > lilypond, in the  org-babel-do-load-languages  
> > 
> >    (org-babel-do-load-languages
> >      'org-babel-load-languages
> >      '(
> >        (emacs-lisp . t)
> >        (shell . t)
> >        (org . t)
> >        (Lilypond . t)
> >        )) 
> > 
> > including either in the last line causes an error at Emacs startup, reported as, 
> > 
> >    Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
> >    Symbol's value as variable is void: <!DOCTYPE
> > 
> > 
> > Earlier in my .emacs init file, I had hopefully defined lilypond, thus 
> > 
> >    (setq ly-nix-ly-path "lilypond")
> > 
> >    (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 
> > 
> >    (autoload 'LilyPond-mode "lilypond-mode")
> > 
> >    (setq auto-mode-alist
> >          (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
> > 
> >    (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 
> > 
> > 
> > In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
> > are located,
> > 
> >    lilypond-font-lock.el
> >    lilypond-indent.el
> >    lilypond-init.el
> >    lilypond-mode.el
> >    lilypond-song.el
> >    lilypond-what-beat.el
> >    lilypond-words.el
> >    ltx-help.el
> >    ob-lilypond.el
> >    ob-Lilypond.el
> >    ob-lisp.el
> >    org-tests.el
> > 
> > 
> > $ which lilypond     is unhelpful,
> > 
> >    /usr/bin/lilypond 
> > 
> > 
> > The lilypond installation is at, 
> > 
> >    /usr/share/lilypond/2.18.2/ 
> > 
> > 
> > Any advice or suggestions would be most welcome. 
> Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypond.el AFAIK. Also,
> where is ly-nix-ly-path and other ly-* variables defined? I don't see these variables.
> 

Thank you. I'll look inside ob-lilypond.el  for clues, variables to be defined.  


Org-mode version 9.1.9 (release_9.1.9-65 ...) @ /usr/share/emacs/26.3/lisp/org 
on Ubuntu 18.04

$ find / -name "ob*.el"     locates only the ob-lilypond.el  I downloaded from github
                         
 
Maybe I need a (require 'lilypond) somewhere, I was thinking. 


Its a new system here. Emacs was installed with Ubuntu's software manager, lilypond 
was installed with $ sudo apt install lilypond     Neither were built from source. 

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-11 20:04       ` adam
@ 2020-01-11 21:43         ` adam
  2020-01-12  4:38           ` adam
  0 siblings, 1 reply; 9+ messages in thread
From: adam @ 2020-01-11 21:43 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, 2020-01-12 at 09:04 +1300, adam wrote:
> On Sat, 2020-01-11 at 12:30 -0300, Jonathan Gregory wrote:
> > 
> > 
> > On 11 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:
> > 
> > > 
> > > 
> > > Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
> > > shown here, 
> > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
> > > 
> > > My current problem is Emacs rejecting the addition of either Lilypond or 
> > > lilypond, in the  org-babel-do-load-languages  
> > > 
> > >    (org-babel-do-load-languages
> > >      'org-babel-load-languages
> > >      '(
> > >        (emacs-lisp . t)
> > >        (shell . t)
> > >        (org . t)
> > >        (Lilypond . t)
> > >        )) 
> > > 
> > > including either in the last line causes an error at Emacs startup, reported as, 
> > > 
> > >    Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
> > >    Symbol's value as variable is void: <!DOCTYPE
> > > 
> > > 
> > > Earlier in my .emacs init file, I had hopefully defined lilypond, thus 
> > > 
> > >    (setq ly-nix-ly-path "lilypond")
> > > 
> > >    (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 
> > > 
> > >    (autoload 'LilyPond-mode "lilypond-mode")
> > > 
> > >    (setq auto-mode-alist
> > >          (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
> > > 
> > >    (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 
> > > 
> > > 
> > > In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
> > > are located,
> > > 
> > >    lilypond-font-lock.el
> > >    lilypond-indent.el
> > >    lilypond-init.el
> > >    lilypond-mode.el
> > >    lilypond-song.el
> > >    lilypond-what-beat.el
> > >    lilypond-words.el
> > >    ltx-help.el
> > >    ob-lilypond.el
> > >    ob-Lilypond.el
> > >    ob-lisp.el
> > >    org-tests.el
> > > 
> > > 
> > > $ which lilypond     is unhelpful,
> > > 
> > >    /usr/bin/lilypond 
> > > 
> > > 
> > > The lilypond installation is at, 
> > > 
> > >    /usr/share/lilypond/2.18.2/ 
> > > 
> > > 
> > > Any advice or suggestions would be most welcome. 
> > Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypond.el AFAIK. Also,
> > where is ly-nix-ly-path and other ly-* variables defined? I don't see these variables.
> > 
> Thank you. I'll look inside ob-lilypond.el  for clues, variables to be defined.  
> 
> 
> Org-mode version 9.1.9 (release_9.1.9-65 ...) @ /usr/share/emacs/26.3/lisp/org 
> on Ubuntu 18.04
> 
> $ find / -name "ob*.el"     locates only the ob-lilypond.el  I downloaded from github
>                          
>  
> Maybe I need a (require 'lilypond) somewhere, I was thinking. 
> 
> 
> Its a new system here. Emacs was installed with Ubuntu's software manager, lilypond 
> was installed with $ sudo apt install lilypond     Neither were built from source. 
> 


OK, my bad.  When I look inside  ob-lilypond.el  I find I pulled a page of markup stuff. 
Will grab a proper  ob-lilypond.el    That will improve matters.   

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-11 21:43         ` adam
@ 2020-01-12  4:38           ` adam
  2020-01-13 17:56             ` Jonathan Gregory
  0 siblings, 1 reply; 9+ messages in thread
From: adam @ 2020-01-12  4:38 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, 2020-01-12 at 10:43 +1300, adam wrote:
> On Sun, 2020-01-12 at 09:04 +1300, adam wrote:
> > 
> > On Sat, 2020-01-11 at 12:30 -0300, Jonathan Gregory wrote:
> > > 
> > > 
> > > 
> > > On 11 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:
> > > 
> > > > 
> > > > 
> > > > 
> > > > Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
> > > > shown here, 
> > > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
> > > > 
> > > > My current problem is Emacs rejecting the addition of either Lilypond or 
> > > > lilypond, in the  org-babel-do-load-languages  
> > > > 
> > > >    (org-babel-do-load-languages
> > > >      'org-babel-load-languages
> > > >      '(
> > > >        (emacs-lisp . t)
> > > >        (shell . t)
> > > >        (org . t)
> > > >        (Lilypond . t)
> > > >        )) 
> > > > 
> > > > including either in the last line causes an error at Emacs startup, reported as, 
> > > > 
> > > >    Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
> > > >    Symbol's value as variable is void: <!DOCTYPE
> > > > 
> > > > 
> > > > Earlier in my .emacs init file, I had hopefully defined lilypond, thus 
> > > > 
> > > >    (setq ly-nix-ly-path "lilypond")
> > > > 
> > > >    (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 
> > > > 
> > > >    (autoload 'LilyPond-mode "lilypond-mode")
> > > > 
> > > >    (setq auto-mode-alist
> > > >          (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
> > > > 
> > > >    (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 
> > > > 
> > > > 
> > > > In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
> > > > are located,
> > > > 
> > > >    lilypond-font-lock.el
> > > >    lilypond-indent.el
> > > >    lilypond-init.el
> > > >    lilypond-mode.el
> > > >    lilypond-song.el
> > > >    lilypond-what-beat.el
> > > >    lilypond-words.el
> > > >    ltx-help.el
> > > >    ob-lilypond.el
> > > >    ob-Lilypond.el
> > > >    ob-lisp.el
> > > >    org-tests.el
> > > > 
> > > > 
> > > > $ which lilypond     is unhelpful,
> > > > 
> > > >    /usr/bin/lilypond 
> > > > 
> > > > 
> > > > The lilypond installation is at, 
> > > > 
> > > >    /usr/share/lilypond/2.18.2/ 
> > > > 
> > > > 
> > > > Any advice or suggestions would be most welcome. 
> > > Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypond.el AFAIK.
> > > Also,
> > > where is ly-nix-ly-path and other ly-* variables defined? I don't see these
> > > variables.
> > > 
> > Thank you. I'll look inside ob-lilypond.el  for clues, variables to be defined.  
> > 
> > 
> > Org-mode version 9.1.9 (release_9.1.9-65 ...) @ /usr/share/emacs/26.3/lisp/org 
> > on Ubuntu 18.04
> > 
> > $ find / -name "ob*.el"     locates only the ob-lilypond.el  I downloaded from github
> >                          
> >  
> > Maybe I need a (require 'lilypond) somewhere, I was thinking. 
> > 
> > 
> > Its a new system here. Emacs was installed with Ubuntu's software manager, lilypond 
> > was installed with $ sudo apt install lilypond     Neither were built from source. 
> > 
> 
> OK, my bad.  When I look inside  ob-lilypond.el  I find I pulled a page of markup
> stuff. 
> Will grab a proper  ob-lilypond.el    That will improve matters.   


Improvement with correct  ob-lilypond.el   Now the (org-babel-do-load-languages ..) 
doesn't cause Emacs to report error at Emacs start-up. 

Presently, with examples  modal-cycle.org  modal-cycle-2.org  modes-in-key-of-C.org 
I can  C-c C-e l p  export to PDF, but there's no music symbols. 

Also I have no M-x ly-*  commands available. 

Org Customize Option, babel, lilypond, for  org-babel-lilypond-commands  is set to  nil   

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

* Re: Orgmode Latex Export with Babel/LilyPond
  2020-01-12  4:38           ` adam
@ 2020-01-13 17:56             ` Jonathan Gregory
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Gregory @ 2020-01-13 17:56 UTC (permalink / raw)
  To: emacs-orgmode

Hello

On 12 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:

> On Sun, 2020-01-12 at 10:43 +1300, adam wrote:
>> On Sun, 2020-01-12 at 09:04 +1300, adam wrote:
>> > 
>> > On Sat, 2020-01-11 at 12:30 -0300, Jonathan Gregory wrote:
>> > > 
>> > > 
>> > > 
>> > > On 11 Jan 2020, adam <ahcnz@orcon.net.nz> wrote:
>> > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > Still no success in tangling the examples  modal-cycle.org  modal-cycle2.org  
>> > > > shown here, 
>> > > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html 
>> > > > 
>> > > > My current problem is Emacs rejecting the addition of either Lilypond or 
>> > > > lilypond, in the  org-babel-do-load-languages  
>> > > > 
>> > > >    (org-babel-do-load-languages
>> > > >      'org-babel-load-languages
>> > > >      '(
>> > > >        (emacs-lisp . t)
>> > > >        (shell . t)
>> > > >        (org . t)
>> > > >        (Lilypond . t)
>> > > >        )) 
>> > > > 
>> > > > including either in the last line causes an error at Emacs startup, reported as, 
>> > > > 
>> > > >    Warning (initialization): An error occurred while loading ‘/home/user/.emacs’:
>> > > >    Symbol's value as variable is void: <!DOCTYPE
>> > > > 
>> > > > 
>> > > > Earlier in my .emacs init file, I had hopefully defined lilypond, thus 
>> > > > 
>> > > >    (setq ly-nix-ly-path "lilypond")
>> > > > 
>> > > >    (add-to-list 'load-path "/usr/share/emacs/site-lisp/") 
>> > > > 
>> > > >    (autoload 'LilyPond-mode "lilypond-mode")
>> > > > 
>> > > >    (setq auto-mode-alist
>> > > >          (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
>> > > > 
>> > > >    (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) 
>> > > > 
>> > > > 
>> > > > In  /usr/share/emacs/site-lisp/   many lilypond related .el files 
>> > > > are located,
>> > > > 
>> > > >    lilypond-font-lock.el
>> > > >    lilypond-indent.el
>> > > >    lilypond-init.el
>> > > >    lilypond-mode.el
>> > > >    lilypond-song.el
>> > > >    lilypond-what-beat.el
>> > > >    lilypond-words.el
>> > > >    ltx-help.el
>> > > >    ob-lilypond.el
>> > > >    ob-Lilypond.el
>> > > >    ob-lisp.el
>> > > >    org-tests.el
>> > > > 
>> > > > 
>> > > > $ which lilypond     is unhelpful,
>> > > > 
>> > > >    /usr/bin/lilypond 
>> > > > 
>> > > > 
>> > > > The lilypond installation is at, 
>> > > > 
>> > > >    /usr/share/lilypond/2.18.2/ 
>> > > > 
>> > > > 
>> > > > Any advice or suggestions would be most welcome. 
>> > > Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypond.el AFAIK.
>> > > Also,
>> > > where is ly-nix-ly-path and other ly-* variables defined? I don't see these
>> > > variables.
>> > > 
>> > Thank you. I'll look inside ob-lilypond.el  for clues, variables to be defined.  
>> > 
>> > 
>> > Org-mode version 9.1.9 (release_9.1.9-65 ...) @ /usr/share/emacs/26.3/lisp/org 
>> > on Ubuntu 18.04
>> > 
>> > $ find / -name "ob*.el"     locates only the ob-lilypond.el  I downloaded from github
>> >                          
>> >  
>> > Maybe I need a (require 'lilypond) somewhere, I was thinking. 
>> > 
>> > 
>> > Its a new system here. Emacs was installed with Ubuntu's software manager, lilypond 
>> > was installed with $ sudo apt install lilypond     Neither were built from source. 
>> > 
>> 
>> OK, my bad.  When I look inside  ob-lilypond.el  I find I pulled a page of markup
>> stuff. 
>> Will grab a proper  ob-lilypond.el    That will improve matters.   
>
>
> Improvement with correct  ob-lilypond.el   Now the (org-babel-do-load-languages ..) 
> doesn't cause Emacs to report error at Emacs start-up. 
>
> Presently, with examples  modal-cycle.org  modal-cycle-2.org  modes-in-key-of-C.org 
> I can  C-c C-e l p  export to PDF, but there's no music symbols. 
>
> Also I have no M-x ly-*  commands available. 
>
> Org Customize Option, babel, lilypond, for  org-babel-lilypond-commands  is set to  nil   

That page was published 9 years ago by Martyn Jago. Some of the code in it no longer works with recent versions of Org and LilyPond. Also, the source files used in the examples reside in the author's github page (not editable in worg), so if you want to try them out you may have to make the adjustments yourself prior to running the code. In any case, I pushed a few edits which I think makes the tutorial easier to follow.

-- 
Jonathan

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

end of thread, other threads:[~2020-01-13 18:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-20 12:04 Orgmode Latex Export with Babel/LilyPond Jakob Schöttl
2020-01-10  9:31 ` adam
2020-01-11  9:58   ` adam
2020-01-11 15:30     ` Jonathan Gregory
2020-01-11 20:04       ` adam
2020-01-11 21:43         ` adam
2020-01-12  4:38           ` adam
2020-01-13 17:56             ` Jonathan Gregory
2020-01-11 15:29 ` Jonathan Gregory

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