From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: [Org-Babel] Export environments for shell results? Date: Wed, 06 Oct 2010 17:04:23 +0200 Message-ID: <87y6abicqw.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org #+TITLE: Org-Babel export environments for shell results * Example ** Medium output #+srcname: is-converted-to-listings #+begin_src sh :results output :exports both grep autoload ~/Downloads/emacs/site-lisp/org-mode/lisp/ob.el | cut -d "#" = -f 4 #+end_src #+results: is-converted-to-listings #+begin_example autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload #+end_example gets translated (in LaTeX) to: #+begin_src latex \begin{lstlisting} autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload autoload \end{lstlisting} #+end_src ** Short output ... while #+srcname: is-converted-to-verbatim #+begin_src sh :results output :exports both grep autoload ~/Downloads/emacs/site-lisp/org-mode/lisp/ob.el | cut -d "#" = -f 4 | head -n 3 #+end_src #+results: is-converted-to-verbatim : autoload : autoload : autoload gets translated (in LaTeX) to: #+begin_src latex \begin{verbatim} autoload autoload autoload \end{verbatim} #+end_src with a leading space (that you don't see when running the command in the shell). The only difference is the shell command is adding =3Dhead -n 3=3D. * Questions 1. Why that difference of behavior? 2. What's the determining factor for switching between =3Dverbatim=3D and =3Dlstlisting=3D environments? 3. Why is there a leading space in the =3Dverbatim=3D environment? Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode