emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: R.M.Krug@gmail.com
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [babel]Skip comments on code blocks on export?
Date: Fri, 27 Jan 2012 15:46:42 -0700	[thread overview]
Message-ID: <87liosaeyu.fsf@gmx.com> (raw)
In-Reply-To: <4F1FC7DF.7000805@gmail.com>

Hi Rainer,

You could add a function to the `org-babel-post-tangle-hook' to remove
comments from the resulting code file.  Functions on this hook are
called from within the tangled code file.

Best,

Rainer M Krug <r.m.krug@gmail.com> writes:

> Hi
>
> is there a way of skipping comments when exporting R code?
>
> The reason is, that I have roxygen tags in my code, which I do not
> want to bi included when I export the document to a pdf, as they are
> only irritate readers not familiar with roxygen.
> On the other hand, I would like to keep them in the code when
> tangling, as basic documentation and a base for when / if I convert
> the code to a package.
>
> So my question: is there a way of suppressing comments in code on export?
> I am aware that might be difficult, but possibly a parameter
>
> #+PROPERTY: supressLines "##"
>
> which supresses all code lines in code blocks starting with ## would
> be great for this purpose.
>
> Or is there another way of handling this issue?
>
> Rainer

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

      reply	other threads:[~2012-01-27 23:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25  9:14 Rainer M Krug
2012-01-27 22:46 ` Eric Schulte [this message]

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=87liosaeyu.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=R.M.Krug@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [babel]Skip comments on code blocks on export?' \
    /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

Code repositories for project(s) associated with this 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).