emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Jonathan Gregory <jgrg@autistici.org>
Cc: Oliver Heck <oliver.heck@posteo.de>, emacs-orgmode@gnu.org
Subject: Re: Org-babel-lilypond always renders full pages
Date: Sun, 05 Apr 2020 11:10:29 +0800	[thread overview]
Message-ID: <87blo68w62.fsf@gmail.com> (raw)
In-Reply-To: <87zhbt4hux.fsf@autistici.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Jonathan Gregory <jgrg@autistici.org> writes:

> Hi
>
> On 02 Apr 2020, stardiviner <numbchild@gmail.com> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>>
>> Jonathan Gregory <jgrg@autistici.org> writes:
>>
>>> Hi
>>>
>>> On 30 Mar 2020, stardiviner <numbchild@gmail.com> wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA256
>>>>
>>>>
>>>> stardiviner <numbchild@gmail.com> 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.
>>>
>>> [...]
>>
>> Yes, it's hard-coded in that function definition. So setting that header
>> arguments variable will not work at all.
>
> OK, I had a closer look and none of the other libraries set
> org-babel-default-header-args:LANG in the file itself. IOW ob-lilypond
> is the only one that does this, and it does this to allow toggling
> between two modes (basic and arrange) and setting the header args
> relative to the mode used. But there's a cost to resetting
> org-babel-default-header-args:lilypond which is it prevents users from
> making modifications to it.
>
> I'm not sure how to deal with this. Maybe others can chime in.

Can report this bug to ob-lilypond.el maintainer. I have not found any contact
info like email in source code file. Does anyone can get in touch with the
maintainer?

- -- 
[ 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
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6JTCUUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPRbAf6Al3017uS7rUl7qNyOJ1PBxVGvzlL
vxtM5yaa3N+zuDgiHpQHKtXGyTqPrkWLQDrg1ncogPr/P+AV2oGu0uoE797Fn3lI
mCKj6dJXRnnX3g88ag7A0zKb/8LWoZxHh1aKKdMJ88jkS0Kqw2pnAKbYBQkOnAWq
Ymd2/i2G/ZN5dR+DRmotbed8eUt5uMRGdwZR7EPFtlWcB7/i6d/thJLmNbGqyYTI
gB16b9gxr8D+h27Wb7tX+7NhSLzkRsaQuGORm0f6aRzBWEydZK3QUSLwDqQ3wYjX
hMT7aIuzFeZs8fTyX1/QFE69I7iGIRpvFdygm/+smAxxvkbURSQZyvQnew==
=Jx8T
-----END PGP SIGNATURE-----


  reply	other threads:[~2020-04-05  3:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 21:11 Oliver Heck
2020-03-29 23:58 ` Jonathan Gregory
2020-03-30  4:34   ` Oliver Heck
2020-03-30  5:35     ` stardiviner
2020-03-30  5:54       ` Oliver Heck
2020-03-30  5:58       ` stardiviner
2020-03-31 13:48         ` Jonathan Gregory
2020-03-31 21:36           ` adam
2020-04-01  9:02             ` Oliver Heck
2020-04-01 23:23               ` adam
2020-04-02  8:35           ` stardiviner
2020-04-02 22:56             ` Jonathan Gregory
2020-04-05  3:10               ` stardiviner [this message]
2020-04-06 21:39                 ` Nick Dokos
2020-03-31 13:43     ` Jonathan Gregory
2020-03-31 14:54       ` Oliver Heck
2020-03-30  6:55   ` Oliver Heck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blo68w62.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jgrg@autistici.org \
    --cc=oliver.heck@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).