emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [babel]Skip comments on code blocks on export?


From: Eric Schulte
Subject: Re: [O] [babel]Skip comments on code blocks on export?
Date: Fri, 27 Jan 2012 15:46:42 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

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 <address@hidden> 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 via email to

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