From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [Org-Babel] Export environments for shell results?
Date: Wed, 06 Oct 2010 17:04:23 +0200 [thread overview]
Message-ID: <87y6abicqw.fsf@mundaneum.com> (raw)
#+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 =head -n 3=.
* Questions
1. Why that difference of behavior?
2. What's the determining factor for switching between =verbatim= and
=lstlisting= environments?
3. Why is there a leading space in the =verbatim= environment?
Best regards,
Seb
--
Sébastien 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
next reply other threads:[~2010-10-06 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 15:04 Sébastien Vauban [this message]
2010-10-06 15:26 ` [Org-Babel] Export environments for shell results? Dan Davison
2010-10-07 13:35 ` Sébastien Vauban
2010-10-07 14:37 ` Dan Davison
2010-10-07 15:00 ` [BUG] latex export of verbatim environments Dan Davison
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y6abicqw.fsf@mundaneum.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.