unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* org mode source code block with a prefix on each line
@ 2020-11-21 15:38 Luca Ferrari
  0 siblings, 0 replies; only message in thread
From: Luca Ferrari @ 2020-11-21 15:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
I would like to use org mode source code blocks (and results) in my
presentations, where I have different shell commands and their
respective results.
However, I would like to have every line in the source block to be
prefixed by a shell prompt, so instead of:

#+BEGIN_SRC sh
ls /tmp
#+end_src

something like

#+begin_src sh
% ls /tmp
#+end_src

with the evaluation of the code to skip the shell prompt. Is something possible?
The reason for that is that when exporting the final document appears,
at least to me, much more clear since I can know exactly I'm hitting
the shell or the output.
Now, if that is possible, is there also any chance to get the shell
prompt formatted differently, or at least to have in bold every
command and in normal text the shell prompt in the final output
(mainly LaTeX)?

Thanks,
Luca



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-21 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-21 15:38 org mode source code block with a prefix on each line Luca Ferrari

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).