From mboxrd@z Thu Jan 1 00:00:00 1970 From: adam Subject: Re: Org-babel-lilypond always renders full pages Date: Wed, 01 Apr 2020 10:36:55 +1300 Message-ID: <1c038b27c9f8a7eab9041e2c573f6c08ea835dee.camel@orcon.net.nz> References: <3891f510-f05e-103b-6deb-a8db8a741a83@posteo.de> <87mu7y7lyb.fsf@autistici.org> <914ed623-88fc-7d93-6df6-408297c3086d@posteo.de> <871rpaievd.fsf@gmail.com> <87y2rigz8y.fsf@gmail.com> <87h7y463eu.fsf@autistici.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49206) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJOZT-0004ey-3j for emacs-orgmode@gnu.org; Tue, 31 Mar 2020 17:37:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJOZR-0007bD-Ec for emacs-orgmode@gnu.org; Tue, 31 Mar 2020 17:37:18 -0400 Received: from smtp-4.orcon.net.nz ([60.234.4.59]:37181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJOZR-0007V6-43 for emacs-orgmode@gnu.org; Tue, 31 Mar 2020 17:37:17 -0400 In-Reply-To: <87h7y463eu.fsf@autistici.org> 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: Jonathan Gregory , numbchild@gmail.com Cc: Oliver Heck , emacs-orgmode@gnu.org On Tue, 2020-03-31 at 10:48 -0300, Jonathan Gregory wrote: > Hi > > On 30 Mar 2020, stardiviner wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > > > stardiviner writes: > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA256 > > > > > > > > > You might want to try this: > > > > > > #+begin_src emacs-lisp > > > (add-to-list 'org-babel-default-header-args:lilypond > > > '((:prologue . "\paper{ > > > indent=0\mm > > > line-width=120\mm > > > oddFooterMarkup=##f > > > oddHeaderMarkup=##f > > > bookTitleMarkup = ##f > > > scoreTitleMarkup = ##f > > > }"))) > > > #+end_src > > > > > > > I found this custom setting lilypond header arguments will not work. Because this code > > function: > > > > #+begin_src emacs-lisp > > (defun org-babel-lilypond-get-header-args (mode) > > "Default arguments to use when evaluating a lilypond source block. > > These depend upon whether we are in Arrange mode i.e. MODE is t." > > (cond (mode > > '((:tangle . "yes") > > (:noweb . "yes") > > (:results . "silent") > > (:cache . "yes") > > (:comments . "yes"))) > > (t > > '((:results . "file") > > (:exports . "results"))))) > > > > (defun org-babel-lilypond-set-header-args (mode) > > "Set org-babel-default-header-args:lilypond > > dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE." > > (setq org-babel-default-header-args:lilypond > > (org-babel-lilypond-get-header-args mode))) > > #+end_src > > > > It always reset and return one result of two conditions. > > > > I think this is a bug. > > So are all org-babel-default-header-args:LANG custom variables? In the > ob-lilypond.el library the headers are hard-coded. > > [...] > > -- > Jonathan > Hi all. This is very interesting. I quickly tried setting the org-babel-default-header-args:LANG using exactly the src emacs-lisp example block above. However that variable remained nil before and after org export lilypond to PDF. Am sure I must have done something wrong. Thank you for drawing my attention to that variable, as it seems the right place for lilypond headers and options too. Off-topic: Oliver is exporting/engraving to a fixed-resolution png. An alternative is to export scalable vector graphics of the score to PDF.