help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

org mode source code block with a prefix on each line


From: Luca Ferrari
Subject: org mode source code block with a prefix on each line
Date: Sat, 21 Nov 2020 16:38:05 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]