Re: [Rd] running examples with enhanced help engine also requires mime package

2022-03-26 Thread Deepayan Sarkar
On Fri, Mar 25, 2022 at 9:48 PM Duncan Murdoch  wrote:
>
> On 25/03/2022 12:07 p.m., Kevin Ushey wrote:
> > Hi,
> >
> > The new enhanced help system is fantastic! I've been playing around
> > with the enhanced help system introduced recently in R 4.2.0, and I
> > noticed one minor issue. When attempting to run examples from within a
> > Help page (in HTML help), if the knitr package is not installed, one
> > sees:
> >
> >  To view output in the browser, the knitr package must be installed.
> >
> > I think this is expected. However, after installing the 'knitr'
> > package and attempting to run examples again, I see:
> >
> >  Error in loadNamespace(x) : there is no package called 'mime'
> >
> > as it looks like 'knitr' (or a dependency?) is trying to use 'mime'
> > behind the scenes in the Help server. Because 'mime' is not an
> > explicit dependency of 'knitr', running install.packages("knitr")
> > isn't sufficient to ensure 'mime' is also installed (which a user
> > might have expected).
> >
> > I'm not sure if this should be resolved in 'knitr' (e.g. via just
> > depending on the 'mime' package) or if this should be tweaked in R
> > itself.

Thanks for the report and diagnosis.

I guess the R-level workaround would be to write a replacement for
knitr::image_uri(). That would probably have been fine if we forced
png to be the only output format, but I see no reason to restrict to
specific formats, so the flexibility is useful.

So I'll just add mime to the message.

Best,
-Deepayan

> This is related:
>
> https://github.com/yihui/xfun/issues/63
>
> Duncan Murdoch
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] running examples with enhanced help engine also requires mime package

2022-03-25 Thread Duncan Murdoch

On 25/03/2022 12:07 p.m., Kevin Ushey wrote:

Hi,

The new enhanced help system is fantastic! I've been playing around
with the enhanced help system introduced recently in R 4.2.0, and I
noticed one minor issue. When attempting to run examples from within a
Help page (in HTML help), if the knitr package is not installed, one
sees:

 To view output in the browser, the knitr package must be installed.

I think this is expected. However, after installing the 'knitr'
package and attempting to run examples again, I see:

 Error in loadNamespace(x) : there is no package called 'mime'

as it looks like 'knitr' (or a dependency?) is trying to use 'mime'
behind the scenes in the Help server. Because 'mime' is not an
explicit dependency of 'knitr', running install.packages("knitr")
isn't sufficient to ensure 'mime' is also installed (which a user
might have expected).

I'm not sure if this should be resolved in 'knitr' (e.g. via just
depending on the 'mime' package) or if this should be tweaked in R
itself.


This is related:

   https://github.com/yihui/xfun/issues/63

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel