{"id":233,"date":"2023-12-13T00:06:00","date_gmt":"2023-12-13T05:06:00","guid":{"rendered":"https:\/\/radio.teledyn.com\/blog\/?p=233"},"modified":"2023-12-19T19:53:37","modified_gmt":"2023-12-20T00:53:37","slug":"hello-lilypond-2","status":"publish","type":"post","link":"https:\/\/radio.teledyn.com\/blog\/2023\/12\/13\/hello-lilypond-2\/","title":{"rendered":"Hello? LilyPond?"},"content":{"rendered":"<div id=\"outline-container-org420245d\" class=\"outline-2\">\n<h2 id=\"org420245d\">Further Adventures in LilyPond<\/h2>\n<div id=\"text-org420245d\" class=\"outline-text-2\">\n<p>Ok, this is a very <em>naive<\/em> exploration of <em>what needs to be done<\/em> in the hands of someone who, sure, <em>knows how to code in elisp<\/em> but hasn&#8217;t since long before the whole <em>Doom Emacs<\/em> renaissance and <code>use-package<\/code> and countless other things, plus, being lazy, I won&#8217;t read the code unless it&#8217;s the last option. So \u2026<\/p>\n<p><!--more--><\/p>\n<div id=\"footnotes\">\n<h2 class=\"footnotes\"><span style=\"font-size: 16px; font-weight: 400;\">On a tip from Ihor Radchenko (<\/span><code style=\"font-size: 16px; font-weight: 400;\">@yantar92@emacs.ch<\/code><span style=\"font-size: 16px; font-weight: 400;\">):<\/span><\/h2>\n<\/div>\n<blockquote><p>The problem with full page might be related to new versions of LilyPond that changed the defaults of how the page is rendered. You may try the latest development Org branch &#8211; we have adjusted things to work with the latest LilyPond release.<\/p><\/blockquote>\n<p>I cloned the <a href=\"https:\/\/git.savannah.gnu.org\/git\/emacs\/org-mode.git\">org-mode git repo<\/a> into <code>~\/.emacs\/src\/<\/code>, added the requisite <code>texinfo<\/code> and <code>texi2html<\/code> packages, then ran <code>sudo make install<\/code> naively hoping that&#8217;s enough to replace the system version because I haven&#8217;t read what the process <em>actually<\/em> does. I could, of course, whereas you, if you are using Big Tech tools, almost certainly can&#8217;t, but I digress. Restarting Emacs was uneventful, so I inserted that <code>org-bable-do-load-languages<\/code> lisp code block (here hidden) and then the example notation snippet.<\/p>\n<p>&nbsp;<\/p>\n<pre id=\"nil\" class=\"example\">\\version \"2.24.1\"\r\n\\layout {\r\n  #(layout-set-staff-size 25)\r\n  \\context {\r\n    \\Score\r\n    \\override SystemStartBracket.after-line-breaking =\r\n    #(lambda (grob)\r\n     (if (defined? 'default-toplevel-book-handler)\r\n       (let ((Y-off (ly:grob-property grob 'Y-extent)))\r\n         (ly:grob-set-property! grob 'Y-extent\r\n           (cons (- (car Y-off) 1.7) (+ (cdr Y-off) 1.7))))))\r\n  }\r\n}\r\n\\new StaffGroup &lt;&lt; \r\n\\new Staff = \"up\" {\r\n  \\voiceOne\r\n\\relative c' {\r\n    d'  e fis g a b   c d e fis g a\r\n}\r\n} \r\n\\new Staff = \"up\" {\r\n  \\voiceTwo\r\n\\relative c' {\r\n    a' b cis d e fis g a b cis d e\r\n}\r\n}\r\n\\new Staff = \"down\" {\r\n  \\voiceThree\r\n\\relative c' {\r\n    d  e fis g a b   c d e fis g a\r\n}\r\n}\r\n&gt;&gt;\r\n<\/pre>\n<p>On my first attempts, the block would only show as <em>source<\/em>, colourized and formatted, and using <code>C-c C-c<\/code> on the block itself complained that org-babel had no command for LilyPond, although checking on <code>customize-group<\/code> I see that it does, so I close that, not saving, and try again, and now I get the proper thing although, as seen above, I can no longer use plain <code>#+begin_src lilypond<\/code> to show my source, but I do get my beautifully engraved music, sort of:<\/p>\n<div id=\"org1ba90c3\" class=\"figure\">\n<p><img decoding=\"async\" src=\"https:\/\/radio.teledyn.com\/blog\/wp-content\/uploads\/2023\/12\/dulcimertones.png\" alt=\"dulcimertones.png\" \/><\/p>\n<\/div>\n<p>Which is now properly cropped, but clearly something is still not quite right as those two initial clefs have appeared out of nowhere<sup><a id=\"fnr.1\" class=\"footref\" role=\"doc-backlink\" href=\"#fn.1\">1<\/a><\/sup> and neither <code>#+CAPTION<\/code> nor <code>#+DESCRIPTION<\/code> will show! To be honest, I had cobbled a naive example not completely understanding the language; it seemed correct with the old org-mode, so perhaps an artifact of the new LilyPond? Nonetheless, far closer to what I needed it to be, although I really have no idea how I got there.<\/p>\n<\/div>\n<div id=\"outline-container-orgb396291\" class=\"outline-3\">\n<h3 id=\"orgb396291\">There was another problem\u2026<\/h3>\n<div id=\"text-orgb396291\" class=\"outline-text-3\">\n<p>On an early try, I ran into this:<\/p>\n<p>&nbsp;<\/p>\n<pre id=\"nil\" class=\"example\">font-lock-default-fontify-region: Symbol\u2019s value as variable is void: font-lock-reference-face\r\n<\/pre>\n<p>Apparently that variable has been deprecated forever and, well, now it is gone, but this is fixed by adding<\/p>\n<div class=\"org-src-container\">\n<p>&nbsp;<\/p>\n<pre id=\"nil\" class=\"src src-list\">(setq font-lock-reference-face 'font-local-constant-face)\r\n<\/pre>\n<\/div>\n<p>to my <code>init.el<\/code>, although now I get warnings saying <code>font-local-constant-face<\/code> is not found. But I still do get a page (plus some noise) and that&#8217;s progress!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"footnotes\">\n<h2 class=\"footnotes\">Footnotes:<\/h2>\n<div id=\"text-footnotes\">\n<div class=\"footdef\">\n<p><sup><a id=\"fn.1\" class=\"footnum\" role=\"doc-backlink\" href=\"#fnr.1\">1 <\/a><\/sup>Pointers to good LilyPond troubleshooting references are most welcome! As are pointers on how to troubleshoot this extra-empty-P-tag footnote issue.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2,&quot;href&quot;:&quot;https:\\\/\\\/git.savannah.gnu.org\\\/git\\\/emacs\\\/org-mode.git&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250503041355\\\/https:\\\/\\\/git.savannah.gnu.org\\\/git\\\/emacs\\\/org-mode.git\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-11-01 05:21:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-03 04:28:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-09 23:50:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-17 07:13:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 10:18:21&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-10 10:06:35&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-17 13:49:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-23 18:25:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-31 12:11:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-18 18:28:17&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-18 18:28:17&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Further Adventures in LilyPond Ok, this is a very naive exploration of what needs to be done in the hands of someone who, sure, knows how to code in elisp but hasn&#8217;t since long before the whole Doom Emacs renaissance and use-package and countless other things, plus, being lazy, I won&#8217;t read the code unless &hellip; <a href=\"https:\/\/radio.teledyn.com\/blog\/2023\/12\/13\/hello-lilypond-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hello? LilyPond?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[15],"tags":[24],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-org2blog","tag-emacs-org-mode-lilypond"],"_links":{"self":[{"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":46,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/radio.teledyn.com\/blog\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}