From: John Kitchin <jkitchin@andrew.cmu.edu>
To: "Cook, Malcolm" <MEC@stowers.org>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
Eric Schulte <schulte.eric@gmail.com>
Subject: Re: example filter for code blocks?
Date: Thu, 26 Sep 2013 15:34:57 -0400 [thread overview]
Message-ID: <CAJ51ETpCMYE-tCz20wrOtEMoXrWA-sKXx7aU_dLhS3n4uBg2kA@mail.gmail.com> (raw)
In-Reply-To: <D4772401B9D976478C0895769BE3E792BF8558@MBSRV02.sgc.loc>
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
I think the approach I sent earlier would potentially work. essentially you
would get the html code and wrap it with whatever text is required for
the folding mode. you would return something like (format "<code to
fold>%s</end code to fold>" text) where text is the html code from the src
block. In latex I had to parse that text a little bit because the first
line was \begin{minted}... and the last line was \end{minted}, which I did
not want.
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
On Thu, Sep 26, 2013 at 2:31 PM, Cook, Malcolm <MEC@stowers.org> wrote:
> >Check out `org-export-filter-src-block-functions'. It shouldn't be too
> >hard to add a custom filter to that list which may be used to process
> >all code block bodies during latex export.
>
> Somewhat off-topic, but, thanks for pointing out this variable Eric....
> I've been wanting an approach that would wrap all exported code in some
> kind of folded mode (maybe a jquery accordion). Initially the html
> document by default would display only exported 'results'. The user could
> choose to display the code behind any result with a single click (keyboard
> interactivity would be even better). Do you think that this is the right
> 'hook' to apply such? Have you seen this already done better somewhere?
>
> ~ Malcolm Cook
>
> >
> >Best,
> >
> >--
> >Eric Schulte
> >https://cs.unm.edu/~eschulte
> >PGP: 0x614CA05D
>
>
[-- Attachment #2: Type: text/html, Size: 2333 bytes --]
next prev parent reply other threads:[~2013-09-26 19:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 0:03 example filter for code blocks? John Kitchin
2013-09-26 8:40 ` Daniele Pizzolli
2013-09-26 9:04 ` Marcin Borkowski
2013-09-26 12:18 ` Eric Schulte
2013-09-26 18:31 ` Cook, Malcolm
2013-09-26 19:34 ` John Kitchin [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-26 17:57 John Kitchin
2013-09-26 19:43 ` Thomas S. Dye
2013-09-26 19:48 ` John Kitchin
2013-09-26 20:58 ` Thomas S. Dye
2013-09-27 7:42 ` Sebastien Vauban
2013-09-30 0:33 ` Thomas S. Dye
2013-09-30 0:45 ` John Kitchin
2013-09-30 2:58 ` Thomas S. Dye
2013-09-30 7:34 ` Achim Gratz
2013-09-30 17:48 ` Thomas S. Dye
2013-09-27 12:59 John Kitchin
2013-09-27 15:24 ` Alan Schmitt
2013-09-27 15:34 ` John Kitchin
2013-09-30 7:49 ` Alan Schmitt
2013-09-27 18:44 John Kitchin
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=CAJ51ETpCMYE-tCz20wrOtEMoXrWA-sKXx7aU_dLhS3n4uBg2kA@mail.gmail.com \
--to=jkitchin@andrew.cmu.edu \
--cc=MEC@stowers.org \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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).