all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luca Ferrari <fluca1978@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: org mode source code block with a prefix on each line
Date: Sat, 21 Nov 2020 16:38:05 +0100	[thread overview]
Message-ID: <CAKoxK+4ME3fY8VLNjUnrvNU03Rv+B5z6RE-PrGq+H=FTLEzotQ@mail.gmail.com> (raw)

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	other threads:[~2020-11-21 15:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAKoxK+4ME3fY8VLNjUnrvNU03Rv+B5z6RE-PrGq+H=FTLEzotQ@mail.gmail.com' \
    --to=fluca1978@gmail.com \
    --cc=help-gnu-emacs@gnu.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.