From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: Org-babel-lilypond always renders full pages Date: Mon, 30 Mar 2020 13:58:37 +0800 Message-ID: <87y2rigz8y.fsf@gmail.com> References: <3891f510-f05e-103b-6deb-a8db8a741a83@posteo.de> <87mu7y7lyb.fsf@autistici.org> <914ed623-88fc-7d93-6df6-408297c3086d@posteo.de> <871rpaievd.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jInRp-0004IY-A8 for emacs-orgmode@gnu.org; Mon, 30 Mar 2020 01:58:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jInRn-0008Ot-Pi for emacs-orgmode@gnu.org; Mon, 30 Mar 2020 01:58:57 -0400 Received: from [183.249.138.7] (port=8709 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jInRn-0008Ea-Cv for emacs-orgmode@gnu.org; Mon, 30 Mar 2020 01:58:55 -0400 In-reply-to: <871rpaievd.fsf@gmail.com> 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: numbchild@gmail.com Cc: Oliver Heck , emacs-orgmode@gnu.org =2D----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=3D0\mm > line-width=3D120\mm > oddFooterMarkup=3D##f > oddHeaderMarkup=3D##f > bookTitleMarkup =3D ##f > scoreTitleMarkup =3D ##f > }"))) > #+end_src > I found this custom setting lilypond header arguments will not work. Becaus= e 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. > Oliver Heck writes: > >> Hi Jonathan, >> >> that works fine. Thank you! >> >> Can I set this as default header somewhere in the org file or will I hav= e to >> include it to every snippet (I will have a lot of them). >> >> Oliver >> >> On 30.03.20 01:58, Jonathan Gregory wrote: >>> Hi >>> On 29 Mar 2020, Oliver Heck wrote: >>>=20 >>>> Hi, >>>> >>>> I am trying to use org-babel-lilypond and basically got it running. >>>> But somehow I always get full lilypond pages back instead of a small >>>> snippet. >>>> This is what I have in my org-file: >>>> >>>> #+NAME: Lilypond >>>> #+BEGIN_SRC lilypond :file test.png >>>> \relative c'' { c d e f } >>>> #+END_SRC >>>> >>>> >>>> I read through the documentation on >>>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.h= tml >>>> but cannot find a clue. >>>> >>>> Any idea what I am doing wrong here? >>>> >>>> Cheers, >>>> Oliver >>> The lilypond manual suggests using \paper variables to reduce the white >>> space around the score. In particular, you should set oddFooterMarkup >>> and oddHeaderMarkup to false. >>> \paper{ >>> indent=3D0\mm >>> line-width=3D120\mm >>> oddFooterMarkup=3D##f >>> oddHeaderMarkup=3D##f >>> bookTitleMarkup =3D ##f >>> scoreTitleMarkup =3D ##f >>> } >>> http://lilypond.org/doc/v2.18/Documentation/usage/lilypond-output-in-ot= her-programs >>> -- >>> Jonathan >>>=20 >> >> --=20 > > > - --=20 > [ stardiviner ] > I try to make every word tell the meaning what I want to express. > > Blog: https://stardiviner.github.io/ > IRC(freenode): stardiviner, Matrix: stardiviner > GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 >=20=20=20=20=20=20=20 > -----BEGIN PGP SIGNATURE----- > > iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6BhTYUHG51bWJjaGls > ZEBnbWFpbC5jb20ACgkQG13xyVromsP5FAf/cxuPIpA7asX7esGCgZo3p+xJEbaj > sblsus9U586m6uwrGDyCAlNFCTsIFNx5cby1HKHQ7pI5EswrQxu7rve4qpqspqbI > ifw615Q5Q6cwCEPC1DTSQp6w7m6qHrDu1TrgL8bhvgPciaf9GH9uHszpuYi259R4 > /66iyCyYEK55JAfFmoYpXhMoY1PsUHt2E8/PCHnbkys8Cbg1b2P9IUCNHq2XoiF2 > 1vFoGtVHGaGx48bmqztg/J4xTkJpj0VgeEMF3d/reT05ToZsYoa4mCFj/TWv+6q7 > /zahVFf1KempQgM1KLbBvfRXzw8J8h9f2N9rCurdtFnr/03T2T5uEx+zqw=3D=3D > =3D9fTG > -----END PGP SIGNATURE----- =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6Bio0UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsOTyAf/ZfHNkxoCvCFYI8RoPF6Wp0Ye26/a 5pTDWBSY3qwVx7r9MH3fHArV6I5fUomkxi+wMrclXxAaPX91xoKwCHJ5ZeOmLXHx pFygrW4odWC3wWA/5vmeM3VC5j16AJfWpqCWeCRa4ylUAJK4YTTAc9BKVqeOjR7S Vt7GW8cLOCUaRfM7ZSgNkhNcryS/a2ImotOdxLCTzZ9j1Y+IlPCjDyAWzBT1sdIL e4qhqr9mYjbGhh07FBweUKT6qQEFev2ZDbq6DJIsA7MK9SigpcGkU3b34J6ake3o HymaRkhiTIRgbdspE5j5LCH0ecwoJGpgv1GpFHlcVZPEtHobATzlUj2pUA=3D=3D =3D0S80 =2D----END PGP SIGNATURE-----