Hello, Is it possible to extend the R lexer/parser to include multiline comments like /* acomment */ ? This way I can integrate emacs org-mode with my R code, so that I can have a table of contents, section folding, html-output of source etc. e.g /* * Display Code */ #+BEGIN_SRC R foo <- function(...){ stuff } #+end_src and so on . Thanks Saptarshi
Saptarshi Guha <saptarshi.guha <at> gmail.com> writes:> > Hello, > Is it possible to extend the R lexer/parser to include multiline comments like > /* > acomment > > */ > ? > This way I can integrate emacs org-mode with my R code, so that I can > have a table of contents, > section folding, html-output of source etc. >This comes up from time to time, and the typical answer is "no, it's not that easy, block-commenting and -uncommenting is easy in any code editor (including Emacs). However, there are a number of R/Emacs/ESS gurus on this list, and maybe someone will answer your more general "is there a way to integrate org-mode with my R code" question ... http://finzi.psych.upenn.edu/R/Rhelp02/archive/91555.html> e.g > /* > * Display Code > */ > #+BEGIN_SRC R > > foo <- function(...){ > stuff > } > > #+end_src > > and so on . > > Thanks > Saptarshi > >
Martin Morgan
2010-Feb-15 05:39 UTC
[Rd] org-mode (was Re: Feature Request: Multiline Comments)
On 02/14/2010 08:11 AM, Saptarshi Guha wrote:> Hello, > Is it possible to extend the R lexer/parser to include multiline comments like > /* > acomment > > */ > ? > This way I can integrate emacs org-mode with my R code, so that I can > have a table of contents, > section folding, html-output of source etc.Hi Saptarshi -- Do you know about http://orgmode.org/worg/org-tutorials/org-R/org-R.php ? Martin> > e.g > /* > * Display Code > */ > #+BEGIN_SRC R > > foo <- function(...){ > stuff > } > > #+end_src > > and so on . > > Thanks > Saptarshi > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
Erik Iverson
2010-Feb-15 06:01 UTC
[Rd] org-mode (was Re: Feature Request: Multiline Comments)
Martin Morgan wrote:> On 02/14/2010 08:11 AM, Saptarshi Guha wrote: > >> Hello, >> Is it possible to extend the R lexer/parser to include multiline comments like >> /* >> acomment >> >> */ >> ? >> This way I can integrate emacs org-mode with my R code, so that I can >> have a table of contents, >> section folding, html-output of source etc. >> > > Hi Saptarshi -- > > Do you know about > > http://orgmode.org/worg/org-tutorials/org-R/org-R.php > > ? >And also the very excellent org-babel, which can be used with R! http://orgmode.org/worg/org-contrib/babel/index.php
Saptarshi Guha
2010-Feb-15 18:26 UTC
[Rd] org-mode (was Re: Feature Request: Multiline Comments)
Aah, yes I have read these. But my use is a bit different. I do not want R output to be collected. I wanted a nice IDE for R in emacs. So using multiline comments and org-mode, i can have collapsible sections and bookmarks in the source . I already use narrow-region to restrict views, but its nice to open an R source file with a TOC, click on an entry and start editing the function. Thanks saptarshi On Mon, Feb 15, 2010 at 1:01 AM, Erik Iverson <eriki at ccbr.umn.edu> wrote:> Martin Morgan wrote: >> >> On 02/14/2010 08:11 AM, Saptarshi Guha wrote: >> >>> >>> Hello, >>> Is it possible to extend the R lexer/parser to include multiline comments >>> like >>> /* >>> acomment >>> >>> */ >>> ? >>> This way I can integrate emacs org-mode with my R code, so that I can >>> have a table of contents, >>> section folding, html-output of source etc. >>> >> >> Hi Saptarshi -- >> >> Do you know about >> >> ?http://orgmode.org/worg/org-tutorials/org-R/org-R.php >> >> ? >> > > And also the very excellent org-babel, which can be used with R! > > http://orgmode.org/worg/org-contrib/babel/index.php >