rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

"?" name collision with devtools/pkgload

Open gaborcsardi opened this issue 6 years ago • 2 comments

This is maybe not sg that should be fixed here, but in pkgload, just wanted to make note of it. pkgload also has ?, to render development documentation, and this overrides rdoc.

@jimhester do you think that there is an easy workaround for this?

gaborcsardi avatar May 17 '19 11:05 gaborcsardi

I think if rdoc just called help() rather than utils::help()at https://github.com/mdequeljoe/rdoc/blob/75fcca917c4f7b93c7972f674b157b392cb5a71c/R/rdoc.R#L19 it would work with the devtools shims.

But you might have to do something like get("help")() to avoid a R CMD check note.

jimhester avatar May 17 '19 18:05 jimhester

Yeh i think there may be two related points here:

  • as @jimhester suggested rdoc shouldn't always call utils::help. This is fixed by finding the closest help to call that is not from rdoc. https://github.com/mdequeljoe/rdoc/blob/bb3920d4747f7d2148daea4ca14e427a5253a10c/R/rdoc.R#L19 In trying the above suggestion I realised that in some cases help can refer to the one attached via rdoc which will cause issues.

  • The original point remains: if 'devtools_shims' are attached at some point after rdoc then documentation output will be decided via pkgload. I agree that there is probably not much that can be done here. At least now use_rdoc has been changed such that if is over-ridden, re-calling it will move it to the front of the search.

https://github.com/mdequeljoe/rdoc/blob/bb3920d4747f7d2148daea4ca14e427a5253a10c/R/rdoc.R#L210-L212

mdequeljoe avatar May 26 '19 09:05 mdequeljoe