From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: Interpreter/shell prompts when exporting code blocks? Date: Fri, 26 Jul 2013 11:33:40 -0400 Message-ID: <81b96e9e97c3a9bf5dcf4c06e6b768b0@mail.rickster.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2k1Y-0003Jl-T3 for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 11:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2k1T-0004FL-Uq for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 11:33:44 -0400 Received: from [204.62.15.78] (port=57849 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2k1T-0004FA-Ru for emacs-orgmode@gnu.org; Fri, 26 Jul 2013 11:33:39 -0400 In-Reply-To: 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: Brett Viren Cc: emacs-orgmode@gnu.org On 2013-07-26 10:14, Brett Viren wrote: > 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? [snip] Not exactly what you asked for, but how about using noweb references: #+begin_src org ,* Prefix export ,#+name: sh-src ,#+BEGIN_SRC sh :results none :exports none echo "foo" echo "bar" ,#+END_SRC ,#+BEGIN_SRC sh :noweb yes :exports code :eval never $ <> ,#+END_SRC ,#+name: python-src ,#+BEGIN_SRC python :exports none import mymod defun myfun(): mymod.foo() ,#+END_SRC ,#+BEGIN_SRC python :noweb yes :exports code :eval never >>>> <> #+END_SRC #+end_src which exports as (text export): =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81 PREFIX EXPORT Rick Frankel =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81 =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 $ echo "foo" =E2=94=82 $ echo "bar" =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 >>>> import mymod =E2=94=82 >>>> defun myfun(): =E2=94=82 >>>> mymod.foo() =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80