title: knitr 1.5 / patchDVI 1.9 doesn't seem to generate a concordance acceptable to evince + emacs
body: <p>Setup : here is sessionInfo() :</p>
  
  <pre><code>R version 3.0.2 (2013-09-25)
  Platform: x86_64-pc-linux-gnu (64-bit)
  
  locale:
   [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
   [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
   [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
   [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
   [9] LC_ADDRESS=C               LC_TELEPHONE=C            
  [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] patchDVI_1.9 knitr_1.5   
  
  loaded via a namespace (and not attached):
  [1] compiler_3.0.2 evaluate_0.5.1 formatR_0.9    highr_0.2.1    stringr_0.6.2 
  [6] tcltk_3.0.2    tools_3.0.2   
  </code></pre>
  
  <p>I am trying to get emacs and AucTeX to synchronize my .Rnw source file with evince to go to comiled text from source and back.</p>
  
  <p>I have already checked that the synchronization works fine between a .tex source and a PDF.</p>
  
  <p>My .Rnw file starts with :</p>
  
  <pre><code>\documentclass[a4paper,twoside,12pt]{article}
  \synctex=1 %% Should force concordance generation
  \pdfcompresslevel=0 %% Should force avoidance of PDF compression, which patchDVI does
  \pdfobjcompresslevel=0 %% not handle
  &lt;&lt;include=FALSE&gt;&gt;= %% Modificaton of what Sweave2kinitr does
  ## opts_chunk$set(concordance=TRUE, self.contained=TRUE) ## No possible effect
  opts_knit$set(concordance=TRUE, self.contained=TRUE) ## Seems reasonable
  @
  %% \SweaveOpts{concordance=TRUE} %% That's where inspiration came from
  </code></pre>
  
  <p>Consider the following log (unrelevant parts edited) :</p>
  
  <pre><code>&gt; options("knitr.concordance")
  $knitr.concordance
  [1] TRUE
  
  &gt; opts_knit$get("concordance")
  [1] TRUE
  &gt; knit("IntroStat.Rnw")
  
  
  processing file: IntroStat.Rnw
    |......................                                           |  33%
    ordinary text without R code
  
    |...........................................                      |  67%
  label: unnamed-chunk-1 (with options) 
  List of 1
   $ include: logi FALSE
  
    |.................................................................| 100%
    ordinary text without R code
  
  
  output file: IntroStat.tex
  
  [1] "IntroStat.tex"
  &gt; system("pdflatex -synctex=1 IntroStat.tex")
  </code></pre>
  
  <p>[ Edited irrelevancies ]</p>
  
  <pre><code>SyncTeX written on IntroStat.synctex.gz.
  </code></pre>
  
  <p><em><strong></em> Note : a concordance <em>has</em> *been* <em>generated</em> !!! **</strong></p>
  
  <pre><code>Transcript written on IntroStat.log.
  </code></pre>
  
  <p>Let's do that again to fix references :</p>
  
  <pre><code>&gt; system("pdflatex -synctex=1 IntroStat.tex")
  </code></pre>
  
  <p>[ Edited irrelevancies ]</p>
  
  <pre><code>Output written on IntroStat.pdf (1 page, 136907 bytes).
  SyncTeX written on IntroStat.synctex.gz.
  </code></pre>
  
  <p><em><strong></em> Note : a concordance <em>has</em> *been* <em>generated</em> *again* !!! **</strong></p>
  
  <pre><code>Transcript written on IntroStat.log.
  &gt; patchDVI("IntroStat.pdf")
  [1] "0 patches made. Did you set \\SweaveOpts{concordance=TRUE}?"
  </code></pre>
  
  <p><strong>* This I do not understand *</strong></p>
  
  <pre><code>&gt; patchSynctex("IntroStat.synctex.gz")
  [1] "0 patches made. Did you set \\SweaveOpts{concordance=TRUE}?"
  </code></pre>
  
  <p><strong>* Ditto *</strong></p>
  
  <p>It appears that something in the set of tools does not work as advertized : either dviPatch does not recognize legal concordance \specials or pdflatex dfoes not generate them. It <em>does</em> generate something, however...</p>
  
  <p>I checked that the resulting PDF enables evince to synchronize with the .tex file, but not in the .Rnw file. Furthermore, when the .Rnw file is open in emacs, starting the viewer with 'C-c C-v View" in AucTeX indeed starts the viewer (after requesting to open a server, which I authorize), but the viewers is empty, and i get this :
  "TeX-evince-sync-view: Couldn't find the Evince instance for file:///home/charpent/Boulot/Cours/ODF/Chapitres/Ch3-StatMath/IntroStat.Rnw.pdf"
  in the "<em>Messages</em>" buffer.</p>
  
  <p>So we have a <em>second</em> problem here.</p>
  
  <p>A third one would be to integrate all of this transparently in the AucTeX production chain, but this is another story...</p>
  
  <p>I'd really like to keep emacs as my main tool for R/\LaTeX/Sage work, rather tha switch to RStudio, which probably won't like much SageTeX and othe various tools I need on a daily/weekly basis...</p>
  
  <p>Any thoughts ?</p>