yihui/knitr — comment on commit 81ba064ee8ee21b1d2b6bfb342422c38c008f99e
File:  line 0
By ramnathv:

I figure out what the issue is. You can reproduce the result by changing the `\SweaveOpts` line in `knitr-minimal.Rnw`, and running `knit`.
When the global options line is `%\SweaveOpts{fig.path=figure/,align=center,fig.show=hold,cache=FALSE}`, you correctly get a warning message about deprecated options.

```r
Warning messages:
1: In fix_options(params) :
option 'align' deprecated; use fig.align instead
```

Now, change the line to `%\SweaveOpts{fig.path=figure/,fig.align=center,fig.show=hold,cache=FALSE}`, you still get the warning, which is incorrect. This happens because `opts_chunk$get()` still has the option `align = center` persisting from the earlier run.

A potential fix is to reset the deprecated options to NULL, after you run `fix_options()`.