From: John Kitchin <jkitchin@andrew.cmu.edu>
To: emacs-orgmode@gnu.org
Subject: Re: update on missing :parameters in code blocks
Date: Mon, 22 Sep 2014 12:40:41 -0400 [thread overview]
Message-ID: <m2zjdry5fa.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <8738bkqsyj.fsf@gmail.com> (Aaron Ecay's message of "Sun, 21 Sep 2014 22:39:32 -0400")
Aaron Ecay <aaronecay@gmail.com> writes:
Thanks for the confirmation this happens, and the pointer to where it
happens.
I guess there was at one point a good reason to do this, but I cannot
see it directly.
I found a way to do it with filters and preprocessing, which is
illustrated here:
http://kitchingroup.cheme.cmu.edu/blog/2014/09/22/Showing-what-data-went-into-a-code-block-on-export/
It works, but I feel like it is a workaround that should not be
needed. It does look like some effort to change this, and first it would
be good to know why the modification is being done.
Thanks again for the hints.
> Hi John,
>
> Look at the functions ‘org-babel-exp-src-block’ which calls
> ‘org-babel-exp-do-export’, which calls ‘org-babel-exp-code’. The tl;dr
> version is that indeed the babel export machinery does change the code
> block in substantial ways, including the removal of parts of it.
>
> This plays merry hell with the cache mechanism, as you might imagine
> (different header args at different points -> the sha1 hash changes). A
> year or more ago I worked on a patch to overhaul this system. I got
> partway through before giving up, because it turned into a massive
> undertaking and because it became clear that the cache mechanism would
> not be very reliable/useful for my needs anyway. But IMHO it remains an
> imperfection in the interface between babel and the new parser, and it
> might be possible to avoid the necessity of doing this sort of
> destructive modification during export. Along the way simplification of
> the code might also be possible.
>
> Let me know if you’re interested; I may be able to dig the old
> half-patch out of a disused git branch somewhere. It may have bitrotted
> some, but it may also be useful.
--
-----------------------------------
John Kitchin
http://kitchingroup.cheme.cmu.edu
prev parent reply other threads:[~2014-09-22 16:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 22:31 update on missing :parameters in code blocks John Kitchin
2014-09-22 2:38 ` Charles Berry
2014-09-22 16:43 ` John Kitchin
2014-09-22 17:10 ` Nicolas Goaziou
2014-09-22 20:50 ` John Kitchin
2014-09-22 21:24 ` Nicolas Goaziou
2014-09-22 2:39 ` Aaron Ecay
2014-09-22 16:40 ` John Kitchin [this message]
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=m2zjdry5fa.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
/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).