From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Interpreter/shell prompts when exporting code blocks? Date: Fri, 26 Jul 2013 10:14:42 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2ink-00029G-SE for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 10:16:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2inR-0000Gv-14 for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 10:15:24 -0400 Received: from smtpgw.bnl.gov ([2620:10a:0:3::30]:17840 helo=iron3.sec.bnl.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2inQ-00085M-Py for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 10:15:04 -0400 Received: from bviren by lycastus.phy.bnl.gov with local (Exim 4.80) (envelope-from ) id 1V2in4-0004V6-SK for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 10:14:42 -0400 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi organistas. I'd like to have my executable code blocks get exported to HTML/LaTeX with some prompt prefixed to each line of code but still let the blocks themselves remain executable in their given language. Is there already a nice way to do this? For example, if there was something like a "prompt" header to specify what should get prefixed on export then something like... #+prompt: $=20 #+BEGIN_SRC sh :results none :exports code mkdir mymod touch mymod/__init__.py #+END_SRC #+prompt: >>> :indent ... #+BEGIN_SRC python :results none :exports code import mymod def myfun(): mymod.something() #+END_SRC ...would export something resembling: $ mkdir mymod $ touch mymod/__init__.py >>> import mymod >>> def myfun(): ... mymod.something() For HTML export, some stylesheet magic which allows any cut-and-paste to ignore the prefixed prompt would be icing on an already tasty cake. =2DBrett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlHyhFIACgkQEixH2Z0dKCx3PwCgmcADcnPfes3MBvrJolTA8P00 KmAAoIEIoW0hxdNXf0K7nHDxflthK/8L =ZiFe -----END PGP SIGNATURE----- --=-=-=--