From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Gregory Subject: Re: Orgmode Latex Export with Babel/LilyPond Date: Mon, 13 Jan 2020 14:56:12 -0300 Message-ID: <87eew344w3.fsf@autistici.org> References: <1578648694.3503.16.camel@orcon.net.nz> <1578736706.11631.38.camel@orcon.net.nz> <87muauj9i0.fsf@autistici.org> <1578773061.21382.13.camel@orcon.net.nz> <1578779037.23448.2.camel@orcon.net.nz> <1578803887.23942.11.camel@orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48132) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ir44N-0000TH-L4 for emacs-orgmode@gnu.org; Mon, 13 Jan 2020 13:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ir44L-0002e4-Fo for emacs-orgmode@gnu.org; Mon, 13 Jan 2020 13:04:06 -0500 Received: from [198.167.222.108] (port=49707 helo=devianza.investici.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ir44K-0002Vs-Rf for emacs-orgmode@gnu.org; Mon, 13 Jan 2020 13:04:05 -0500 Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id C2CC6E076C for ; Mon, 13 Jan 2020 17:56:48 +0000 (UTC) Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: jgregory@autistici.org) by localhost (Postfix) with ESMTPSA id D50DBE076B for ; Mon, 13 Jan 2020 17:56:47 +0000 (UTC) In-reply-to: <1578803887.23942.11.camel@orcon.net.nz> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello On 12 Jan 2020, adam wrote: > On Sun, 2020-01-12 at 10:43 +1300, adam wrote: >> On Sun, 2020-01-12 at 09:04 +1300, adam wrote: >> >=20 >> > On Sat, 2020-01-11 at 12:30 -0300, Jonathan Gregory wrote: >> > >=20 >> > >=20 >> > >=20 >> > > On 11 Jan 2020, adam wrote: >> > >=20 >> > > >=20 >> > > >=20 >> > > >=20 >> > > > Still no success in tangling the examples modal-cycle.org modal-= cycle2.org=20=20 >> > > > shown here,=20 >> > > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypo= nd.html=20 >> > > >=20 >> > > > My current problem is Emacs rejecting the addition of either Lilyp= ond or=20 >> > > > lilypond, in the org-babel-do-load-languages=20=20 >> > > >=20 >> > > > (org-babel-do-load-languages >> > > > 'org-babel-load-languages >> > > > '( >> > > > (emacs-lisp . t) >> > > > (shell . t) >> > > > (org . t) >> > > > (Lilypond . t) >> > > > ))=20 >> > > >=20 >> > > > including either in the last line causes an error at Emacs startup= , reported as,=20 >> > > >=20 >> > > > Warning (initialization): An error occurred while loading =E2= =80=98/home/user/.emacs=E2=80=99: >> > > > Symbol's value as variable is void: > > > >=20 >> > > >=20 >> > > > Earlier in my .emacs init file, I had hopefully defined lilypond, = thus=20 >> > > >=20 >> > > > (setq ly-nix-ly-path "lilypond") >> > > >=20 >> > > > (add-to-list 'load-path "/usr/share/emacs/site-lisp/")=20 >> > > >=20 >> > > > (autoload 'LilyPond-mode "lilypond-mode") >> > > >=20 >> > > > (setq auto-mode-alist >> > > > (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist)) >> > > >=20 >> > > > (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))= =20 >> > > >=20 >> > > >=20 >> > > > In /usr/share/emacs/site-lisp/ many lilypond related .el files= =20 >> > > > are located, >> > > >=20 >> > > > 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 >> > > >=20 >> > > >=20 >> > > > $ which lilypond is unhelpful, >> > > >=20 >> > > > /usr/bin/lilypond=20 >> > > >=20 >> > > >=20 >> > > > The lilypond installation is at,=20 >> > > >=20 >> > > > /usr/share/lilypond/2.18.2/=20 >> > > >=20 >> > > >=20 >> > > > Any advice or suggestions would be most welcome.=20 >> > > Version 9.1.9 comes with ob-lilypond.el. There's no ob-babel-lilypon= d.el AFAIK. >> > > Also, >> > > where is ly-nix-ly-path and other ly-* variables defined? I don't se= e these >> > > variables. >> > >=20 >> > Thank you. I'll look inside ob-lilypond.el for clues, variables to be= defined.=20=20 >> >=20 >> >=20 >> > Org-mode version 9.1.9 (release_9.1.9-65 ...) @ /usr/share/emacs/26.3/= lisp/org=20 >> > on Ubuntu 18.04 >> >=20 >> > $ find / -name "ob*.el" locates only the ob-lilypond.el I downloa= ded from github >> >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 >> >=20=20 >> > Maybe I need a (require 'lilypond) somewhere, I was thinking.=20 >> >=20 >> >=20 >> > Its a new system here. Emacs was installed with Ubuntu's software mana= ger, lilypond=20 >> > was installed with $ sudo apt install lilypond Neither were built = from source.=20 >> >=20 >>=20 >> OK, my bad. When I look inside ob-lilypond.el I find I pulled a page = of markup >> stuff.=20 >> Will grab a proper ob-lilypond.el That will improve matters.=20=20=20 > > > Improvement with correct ob-lilypond.el Now the (org-babel-do-load-lan= guages ..)=20 > doesn't cause Emacs to report error at Emacs start-up.=20 > > Presently, with examples modal-cycle.org modal-cycle-2.org modes-in-ke= y-of-C.org=20 > I can C-c C-e l p export to PDF, but there's no music symbols.=20 > > Also I have no M-x ly-* commands available.=20 > > Org Customize Option, babel, lilypond, for org-babel-lilypond-commands = is set to nil=20=20=20 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 adjustme= nts yourself prior to running the code. In any case, I pushed a few edits w= hich I think makes the tutorial easier to follow. --=20 Jonathan