emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: hymie! <hymie@lactose.homelinux.net>
To: emacs-orgmode@gnu.org
Subject: export code with backslashes
Date: Mon, 16 Mar 2015 15:47:09 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150316T163136-530@post.gmane.org> (raw)

Greetings.

I'm only asking this question because it seems that Orgmode can do
anything, although I admit that what I'm asking for is probably outside
the normal scope.

I have snips of code in my org files, denoted as ~code~.  I prefer ~code~ to
BEGIN_SRC blocks, because I don't like the big grey text boxes in my
exported documents.  Sometimes my code is very long and includes long lists
of options and arguments and such; for example:

~useradd -U -G wheel -p
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
accountname~

This is all one line.

Then I use C-c C-e t A to "export" this into an ascii buffer, the sole
reason being to remove the tilde characters and provide me an easy
cut-n-paste option.   I end up with this:

useradd -U -G wheel -p <newline>
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
<newline>
accountname <newline>

I would really really really like it if, in addition to the newlines that
are added, a backslash could be added as well.  "Hey, this is a line
enclosed in tildes.  I'm going to add line-breaks.  Each line-break except
for the one at the end needs a backslash"

useradd -U -G wheel -p \<newline>
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \<newline>
accountname <newline>

Is such a thing possible?

--hymie!

             reply	other threads:[~2015-03-16 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 15:47 hymie! [this message]
2015-03-16 22:28 ` export code with backslashes Charles C. Berry
2015-03-16 23:11   ` hymie
2015-03-18 13:09   ` hymie
2015-03-18 17:10     ` Charles C. Berry

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20150316T163136-530@post.gmane.org \
    --to=hymie@lactose.homelinux.net \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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