-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Prompt if user wants the error searched #2
Comments
Assuming the user is working in RStudio, could you somehow utilize the Viewer window? Thinking "big" for a moment, I'm envisioning a user encountering an error and then a rendered HTML document populates the Viewer window with:
Thoughts? (You could also do this with a browser window.) You could get really crazy and allow users to specify extra args for links that always appears, say for example for a course that a user is currently taking. Sort of like, here are the links for your specific error, but also some links that will always be helpful while taking course STAT 4XX. Basically have students setup options at the beginning of the semester for projects related to a specific course. Maybe develop some way to pass this information to students. You could also include some messaging about what to do for further help. A suggestion to use I haven't had enough coffee yet this morning so maybe this is ridiculous, but I had this idea seeing the conversations around |
Yes. This is possible. Though, we add a dependency on the The approach is given in the # probe for viewer option then fall back to browseURL
viewer <- getOption("viewer")
if (!is.null(viewer))
viewer("http://localhost:8100")
else
utils::browseURL("http://localhost:8100") Regarding the other ideas... The main sticking point is quickly creating and rendering an HTML overlay.
This is a bit more tricky as we need to search for function calls in the error. Sometimes the functions would be user-defined or the package author may disable the e.g. stop_with_call = function() {
stop("hi", call. = TRUE)
}
stop_without_call = function() {
stop("hi", call. = FALSE)
}
stop_with_call()
# Error in stop_with_call() : hi
stop_without_call()
# Error: hi
We'd probably have to get a list of packages on the search path. environments_active = search()
pkgs_active = sub("^package[:]", "",
environments_active[grepl("^package", environments_active)])
pkgs_active Potentially, we could search for the function with either pkg_list = findFunction("print")
docs = help.search(pattern = "^print$"),
agrep = FALSE)
This could be generated with the proposed In terms of course space, I think it makes sense to pursue an
I think these options could be embedded in the Though, the current state of RStudio Cloud instances would have the |
@daviddalpiaz let's aim to talk more in-depth about this during our meeting on Friday. |
Agreed on an in-depth conversation. I'm even more excited about this than the package I proposed last time. A couple notes:
|
Also, now that I've thought about this for a second, I feel like I'm basically proposing Clippy for |
Another quick thought: check user's R, RStudio, and maybe package versions against current versions. If lagging, provide as much code as possible to automate the update procedure. |
The present experience might be a bit too jarring of immediately opening a web browser.
Let's prompt the user first to see if they would like us to search the error. Maybe add something with
praise
?The text was updated successfully, but these errors were encountered: