>>>>> Duncan Murdoch writes:> On 22/05/2015 8:49 PM, Imanuel Costigan wrote: >> Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle to go the the package?s Github (or other like) site to read NEWS.> Not as far as I know. There have been discussions about increasing the > support of Markdown, but so far the conclusion has been that it's too > hard to do -- the support is not stable enough on all the platforms > where R runs.There are actually two issues here. For CRAN, we could in principle take inst/NEWS.md files, convert these to HTML using pandoc, and use the HTML for the package web page. (Would need the CRAN incoming checks to be taught about inst/NEWS.md.) However, we cannot use such files for utils::news() because we do not (yet?) know how to reliably parse such files and extract the news items (and hence cannot really compute on the news information). Btw, currently only one package on CRAN has inst/NEWS.md (another one has NEWS.md at top level). Best -k> Markdown is allowed for vignettes (because the package author processes > those), so I'd suggest putting your news into a vignette instead of a > news file. Put in a token news file that points to the vignette so > users can find it.> Duncan Murdoch> ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
On 23/05/2015 4:05 AM, Kurt Hornik wrote:>>>>>> Duncan Murdoch writes: > >> On 22/05/2015 8:49 PM, Imanuel Costigan wrote: >>> Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle to go the the package?s Github (or other like) site to read NEWS. > >> Not as far as I know. There have been discussions about increasing the >> support of Markdown, but so far the conclusion has been that it's too >> hard to do -- the support is not stable enough on all the platforms >> where R runs. > > There are actually two issues here. > > For CRAN, we could in principle take inst/NEWS.md files, convert these > to HTML using pandoc, and use the HTML for the package web page. (Would > need the CRAN incoming checks to be taught about inst/NEWS.md.) > > However, we cannot use such files for utils::news() because we do not > (yet?) know how to reliably parse such files and extract the news items > (and hence cannot really compute on the news information).It would be quite easy to modify the news() parser to parse a suitably described Markdown format. The main change from the current text parser would be to expect a prefix on the line introducing each version or category. I think the harder problem is display. CRAN can run pandoc, but can users who install the package from source? I would expect some obscure platforms (like Windows ;-) would not have it available. I could add it to Rtools on Windows, but I think platforms that normally install tools from source will have more trouble, because it has an unusual prerequisite (Haskell). We could fall back to displaying the NEWS.md file without processing, but that makes lots of code more complicated.> > Btw, currently only one package on CRAN has inst/NEWS.md (another one > has NEWS.md at top level).I'd guess if someone solved the problems mentioned above, it would become more popular. Many people would convert their text NEWS to NEWS.md if it would display better; that's a lot easier than converting to NEWS.Rd. Duncan Murdoch> > Best > -k > >> Markdown is allowed for vignettes (because the package author processes >> those), so I'd suggest putting your news into a vignette instead of a >> news file. Put in a token news file that points to the vignette so >> users can find it. > >> Duncan Murdoch > >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel
On 23 May 2015 at 08:14, Duncan Murdoch wrote: | I think the harder problem is display. CRAN can run pandoc, but can | users who install the package from source? I would expect some obscure | platforms (like Windows ;-) would not have it available. I could add it | to Rtools on Windows, but I think platforms that normally install tools | from source will have more trouble, because it has an unusual | prerequisite (Haskell). We could fall back to displaying the NEWS.md | file without processing, but that makes lots of code more complicated. If you had spare time, you could coordinate with JJ. He somehow managed to get pandoc to build as a standalone binary without any runtime requirements so that it could be included with RStudio. And so it has been for quite some time. Every machine with an RStudio installation has pandoc. Maybe we could consider carrying this over from RStudio into Rtools? Similarly, on OS X and Linux maybe we could add a layer that would R allow to query an RStudio instance, if present, to tell it where its pandoc is, if no suitable pandoc binary is in the path. Just thinking out loud... Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
On 23/05/2015 13:14, Duncan Murdoch wrote:> On 23/05/2015 4:05 AM, Kurt Hornik wrote: >>>>>>> Duncan Murdoch writes: >> >>> On 22/05/2015 8:49 PM, Imanuel Costigan wrote: >>>> Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle to go the the package?s Github (or other like) site to read NEWS. >> >>> Not as far as I know. There have been discussions about increasing the >>> support of Markdown, but so far the conclusion has been that it's too >>> hard to do -- the support is not stable enough on all the platforms >>> where R runs. >> >> There are actually two issues here. >> >> For CRAN, we could in principle take inst/NEWS.md files, convert these >> to HTML using pandoc, and use the HTML for the package web page. (Would >> need the CRAN incoming checks to be taught about inst/NEWS.md.) >> >> However, we cannot use such files for utils::news() because we do not >> (yet?) know how to reliably parse such files and extract the news items >> (and hence cannot really compute on the news information). > > It would be quite easy to modify the news() parser to parse a suitably > described Markdown format. The main change from the current text parser > would be to expect a prefix on the line introducing each version or > category. > > I think the harder problem is display. CRAN can run pandoc, but can > users who install the package from source? I would expect some obscure > platforms (like Windows ;-) would not have it available. I could add it > to Rtools on Windows, but I think platforms that normally install tools > from source will have more trouble, because it has an unusual > prerequisite (Haskell). We could fall back to displaying the NEWS.md > file without processing, but that makes lots of code more complicated.pandoc is only viable on platforms with a pre-compiled binary, which does not even cover all the CRAN check platforms. (It is not easy to compile ab initio from source even on a mainstream Linux, but they mostly have pandoc binaries.) The next problem is that using pandoc as the de facto standard for .md depends on the version of pandoc, and .md seems to have no way to specify the version required. (If it does, people are failing to use it ....) -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK
On Sat, May 23, 2015 at 8:14 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: [...]> I think the harder problem is display. CRAN can run pandoc, but can > users who install the package from source? I would expect some obscure > platforms (like Windows ;-) would not have it available. >[...] I don't think pandoc is the best way to go with NEWS.md (and README.md, actually). I would be surprised if many package maintainer built their NEWS/README files with pandoc. They just look at them at GitHub (or another similar service). GitHub has API for building HTML from MarkDown: https://developer.github.com/v3/markdown/ It can build GitHub-flavored MarkDown, in which case you get links to GitHub issues, etc. or just plain MarkDown, like a GitHub README. If you don't want to rely on their service, then there are a multitude of lightweight MarkDown parsers available, e.g. https://github.com/markdown-it/markdown-it is a good one IMO. Pandoc is great for vignettes, but you don't need its full power for READMEs and especially not for NEWS files. In fact most NEWS.md files look good as text. Gabor [[alternative HTML version deleted]]
So I assume this commit means NEWS.md is now no longer on blacklist? https://github.com/wch/r-source/commit/9ffe87264a1cd59a31a829f72d57af0f1bfa327a Sent from my iPad On 23 May 2015, at 6:05 pm, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote:>>>>>> Duncan Murdoch writes: > >>> On 22/05/2015 8:49 PM, Imanuel Costigan wrote: >>> Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle to go the the package?s Github (or other like) site to read NEWS. > >> Not as far as I know. There have been discussions about increasing the >> support of Markdown, but so far the conclusion has been that it's too >> hard to do -- the support is not stable enough on all the platforms >> where R runs. > > There are actually two issues here. > > For CRAN, we could in principle take inst/NEWS.md files, convert these > to HTML using pandoc, and use the HTML for the package web page. (Would > need the CRAN incoming checks to be taught about inst/NEWS.md.) > > However, we cannot use such files for utils::news() because we do not > (yet?) know how to reliably parse such files and extract the news items > (and hence cannot really compute on the news information). > > Btw, currently only one package on CRAN has inst/NEWS.md (another one > has NEWS.md at top level). > > Best > -k > >> Markdown is allowed for vignettes (because the package author processes >> those), so I'd suggest putting your news into a vignette instead of a >> news file. Put in a token news file that points to the vignette so >> users can find it. > >> Duncan Murdoch > >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel[[alternative HTML version deleted]]
> On 30 May 2015, at 01:20 , Imanuel Costigan <i.costigan at me.com> wrote: > > So I assume this commit means NEWS.md is now no longer on blacklist? >....in the development version. Not true of released versions. -pd> https://github.com/wch/r-source/commit/9ffe87264a1cd59a31a829f72d57af0f1bfa327a > > Sent from my iPad > > On 23 May 2015, at 6:05 pm, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote: > >>>>>>> Duncan Murdoch writes: >> >>>> On 22/05/2015 8:49 PM, Imanuel Costigan wrote: >>>> Are there any plans for CRAN to support NEWS files in markdown? Bit of a hassle to go the the package?s Github (or other like) site to read NEWS. >> >>> Not as far as I know. There have been discussions about increasing the >>> support of Markdown, but so far the conclusion has been that it's too >>> hard to do -- the support is not stable enough on all the platforms >>> where R runs. >> >> There are actually two issues here. >> >> For CRAN, we could in principle take inst/NEWS.md files, convert these >> to HTML using pandoc, and use the HTML for the package web page. (Would >> need the CRAN incoming checks to be taught about inst/NEWS.md.) >> >> However, we cannot use such files for utils::news() because we do not >> (yet?) know how to reliably parse such files and extract the news items >> (and hence cannot really compute on the news information). >> >> Btw, currently only one package on CRAN has inst/NEWS.md (another one >> has NEWS.md at top level). >> >> Best >> -k >> >>> Markdown is allowed for vignettes (because the package author processes >>> those), so I'd suggest putting your news into a vignette instead of a >>> news file. Put in a token news file that points to the vignette so >>> users can find it. >> >>> Duncan Murdoch >> >>> ______________________________________________ >>> R-devel at r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com