-
Notifications
You must be signed in to change notification settings - Fork 162
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
forward tokenization failed within roxygen2 examples #375
Comments
It should be fixed, thanks. Please don't expect indentation to work perfectly in roxygen blocks by the way, that is a difficult problem. Eventually we'll provide an edit-to-popup-buffer command, as in org-mode, to edit the example block. |
For clarity: I "expect" nothing. You guys are maintaining a very non-trivial tool providing fluid access to a backend process, dealing with expressions, steps, and a whole lot of styling, sometimes resulting in conflicts and/or non-deterministic expectations. I'm grateful that it does what it does! I don't currently rely on indentation within roxy blocks; the issue here was that the roxy tokens were being indented (which is different from code indentation, afaict) and enter-and-indent was failing. After that, any other coolness within roxy editing is gravy. Thanks! BTW, speaking of tokenization and such, are you aware that |
Yes and I'm absolutely thrilled! No more weird latex :)
I think that would be difficult because polymode is designed to work with vertically separated chunks, not horizontally separated (roxy prefix vs code). Best approach is probably popup-to-edit-buffer. |
I'm pretty stoked about Gotcha on the polymode thing; I thought about that, but am not certain how the section-demarcation is happening internally. I know that the triple-tick notation works well (and is vertically-deterministic), I thought perhaps that the polymode determination of block-mode could be done by creating a list of line boundaries, and finding the roxy token is just one way to demarcate another boundary of lines. No worries. Thanks again! |
I think this is actually two errors (handling backslashes and handling braces), but I think they are both being caused by a tokenization problem.
Setup:
After
@examples
, add\dontrun{
and hit return. The#'
doesn't auto-fill, and I get the message:If I manually enter the closing brace:
and hit enter after
\dontrun{
, it still gives me the tokenization failure.If I manually input the mid-brace line, ala
the enter-and-indent is causing the mid-brace roxy-prefixes to indent as well:
Notes:
#'
and##'
#' \dontrun
(no brace), it fails with the tokenization error#' dontrun{
(no backslash), no error but it indents the next#'
lineVersions:
The text was updated successfully, but these errors were encountered: