Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Pandoc?) warning about nonempty title element #156

Closed
lorenzwalthert opened this issue Jan 7, 2018 · 19 comments
Closed

(Pandoc?) warning about nonempty title element #156

lorenzwalthert opened this issue Jan 7, 2018 · 19 comments

Comments

@lorenzwalthert
Copy link
Contributor

I get a strange (probably pandoc related) warning with the dev and CRAN version of reprex.

reprex::reprex({
  1+1
})
Rendering reprex...
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata.
  Falling back to 'file32c3f40d39b_reprex.utf8'
Rendered reprex is on the clipboard.
1+1
#> [1] 2

Created on 2018-01-07 by the reprex package (v0.1.1.9000).

I updated pandoc from 2.0.4 to 2.0.6 but it did not help. There seem to be similar warnings in other contexts (rstudio/rmarkdown#1200 and remotely related ramnathv/htmlwidgets#289). From the former issue, I thought I might be able to resolve the problem by using the development version of rmarkdown, which also did not help. Any ideas what's wrong here?

Session info

devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.3 (2017-11-30)
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  tz       Europe/Zurich               
#>  date     2018-01-07
#> Packages -----------------------------------------------------------------
#>  package   * version date       source        
#>  backports   1.1.2   2017-12-13 CRAN (R 3.4.3)
#>  base      * 3.4.3   2017-12-07 local         
#>  compiler    3.4.3   2017-12-07 local         
#>  datasets  * 3.4.3   2017-12-07 local         
#>  devtools    1.13.4  2017-11-09 CRAN (R 3.4.2)
#>  digest      0.6.13  2017-12-14 CRAN (R 3.4.3)
#>  evaluate    0.10.1  2017-06-24 CRAN (R 3.4.1)
#>  graphics  * 3.4.3   2017-12-07 local         
#>  grDevices * 3.4.3   2017-12-07 local         
#>  htmltools   0.3.6   2017-04-28 CRAN (R 3.4.0)
#>  knitr       1.18    2017-12-27 CRAN (R 3.4.3)
#>  magrittr    1.5     2014-11-22 CRAN (R 3.4.0)
#>  memoise     1.1.0   2017-04-21 CRAN (R 3.4.0)
#>  methods   * 3.4.3   2017-12-07 local         
#>  Rcpp        0.12.14 2017-11-23 CRAN (R 3.4.3)
#>  rmarkdown   1.8     2017-11-17 CRAN (R 3.4.2)
#>  rprojroot   1.3-2   2018-01-03 CRAN (R 3.4.3)
#>  stats     * 3.4.3   2017-12-07 local         
#>  stringi     1.1.6   2017-11-17 CRAN (R 3.4.2)
#>  stringr     1.2.0   2017-02-18 CRAN (R 3.4.0)
#>  tools       3.4.3   2017-12-07 local         
#>  utils     * 3.4.3   2017-12-07 local         
#>  withr       2.1.1   2017-12-19 CRAN (R 3.4.3)
#>  yaml        2.1.16  2017-12-12 CRAN (R 3.4.3)
@jennybc
Copy link
Member

jennybc commented Jan 7, 2018

I do not immediately know what's going on here.

However it looks like the rmarkdown fix happened after the last CRAN release. If you install rmarkdown from GitHub, does that resolve it?

@lorenzwalthert
Copy link
Contributor Author

Ok. Thanks. I also tried the devel version of rmarkdown and it did not help.

@jennybc
Copy link
Member

jennybc commented Jan 7, 2018

Is this specific to reprex or does it happen whenever you render .R or .Rmd to md_document or github_document and allow an html preview to happen?

@lorenzwalthert
Copy link
Contributor Author

It seems specific to reprex.

@lorenzwalthert
Copy link
Contributor Author

No in fact it also happens when I render to html_document, but not if I render to github_document or to md_document.

@lorenzwalthert
Copy link
Contributor Author

Maybe the issue should be moved to knitr, rmarkdown?

@jennybc
Copy link
Member

jennybc commented Jan 7, 2018

So it's the .md to .html step. If you include show = FALSE, it should go away. True?

Can you also test with both venue = "gh" and venue = "so"?

@lorenzwalthert
Copy link
Contributor Author

Yes, for show = FALSE, it goes away.

@lorenzwalthert
Copy link
Contributor Author

For venue = "gh"and show = TRUE, it's still there.

@lorenzwalthert
Copy link
Contributor Author

Same for venue = "so".

@lorenzwalthert
Copy link
Contributor Author

If I set show = FALSE, it's not there for venue = "gh" or venue = "so".

@lorenzwalthert
Copy link
Contributor Author

On a related note, with venue = "so", I don't get the required blank line after <!-- language-all: lang-r -->, which was apparently fixed in #133 in general but does not work on my computer. With the CRAN version of reprex, I don't have this problem.

@jennybc
Copy link
Member

jennybc commented Jan 12, 2018

Yeah I know that fix to the SO venue problem is not really done. #143 is my reminder. Will you tell me more about your system over there? Because I can't replicate the problem but sounds like you can!

@lorenzwalthert
Copy link
Contributor Author

Sure. Maybe this helps? I wonder whether #133 is related to this issue (pandoc warning).

sessioninfo::session_info(c("reprex"))
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.4.3 (2017-11-30)
#>  os       macOS Sierra 10.12.1        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  tz       Europe/Zurich               
#>  date     2018-01-12                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package    * version    date       source                           
#>  assertthat   0.2.0      2017-04-11 CRAN (R 3.4.0)                   
#>  backports    1.1.2      2017-12-13 CRAN (R 3.4.3)                   
#>  base64enc    0.1-3      2015-07-28 CRAN (R 3.4.0)                   
#>  callr        1.0.0.9000 2018-01-12 Github (r-lib/callr@550fa6b)     
#>  clipr        0.4.0      2017-11-03 CRAN (R 3.4.2)                   
#>  crayon       1.3.4      2017-09-16 CRAN (R 3.4.1)                   
#>  debugme      1.1.0      2017-10-22 CRAN (R 3.4.2)                   
#>  digest       0.6.13     2017-12-14 CRAN (R 3.4.3)                   
#>  evaluate     0.10.1     2017-06-24 CRAN (R 3.4.1)                   
#>  highr        0.6        2016-05-09 CRAN (R 3.4.0)                   
#>  htmltools    0.3.6      2017-04-28 CRAN (R 3.4.0)                   
#>  jsonlite     1.5        2017-06-01 CRAN (R 3.4.0)                   
#>  knitr        1.18       2017-12-27 CRAN (R 3.4.3)                   
#>  magrittr     1.5        2014-11-22 CRAN (R 3.4.0)                   
#>  markdown     0.8        2017-04-20 CRAN (R 3.4.0)                   
#>  mime         0.5        2016-07-07 CRAN (R 3.4.0)                   
#>  processx     2.0.0.1    2017-07-30 CRAN (R 3.4.1)                   
#>  R6           2.2.2      2017-06-17 CRAN (R 3.4.0)                   
#>  Rcpp         0.12.14    2017-11-23 CRAN (R 3.4.3)                   
#>  reprex       0.1.1.9000 2018-01-12 Github (tidyverse/reprex@9b07b0e)
#>  rlang        0.1.6      2017-12-21 CRAN (R 3.4.3)                   
#>  rmarkdown    1.8        2017-11-17 CRAN (R 3.4.2)                   
#>  rprojroot    1.3-2      2018-01-03 CRAN (R 3.4.3)                   
#>  stringi      1.1.6      2017-11-17 CRAN (R 3.4.2)                   
#>  stringr      1.2.0      2017-02-18 CRAN (R 3.4.0)                   
#>  whisker      0.3-2      2013-04-28 CRAN (R 3.4.0)                   
#>  withr        2.1.1      2017-12-19 CRAN (R 3.4.3)                   
#>  yaml         2.1.16     2017-12-12 CRAN (R 3.4.3)

Created on 2018-01-12 by the reprex package (v0.1.1.9000).

@alistaire47
Copy link
Contributor

alistaire47 commented Jan 27, 2018

I'm getting a similar effect on 0.1.1.9000 after updating my other packages (not sure which one caused it, sorry). The CRAN version, which is ahead of GitHub at 0.1.2, fails to read from the clipboard at all, which may or may not be related (edit: nm, saw #155).

@jennybc jennybc closed this as completed in dbaa2ef Feb 5, 2018
@jennybc
Copy link
Member

jennybc commented Feb 5, 2018

@lorenzwalthert @alistaire47 Please let me know if, once you update, this is NOT fixed. I was able to reproduce it by upgrading Pandoc myself and this suppresses the warning for me locally and on AppVeyor.

@alistaire47
Copy link
Contributor

Yep, the update (plus an R restart) fixes it!

@lorenzwalthert
Copy link
Contributor Author

Yup, now it works without warnings. Thanks @jennybc 😊

@kmaheshkulkarni

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants