Skip to content
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

error_stack errors improperly parsed by rust-mode on emacs #811

Closed
wildwestrom opened this issue Jul 15, 2022 · 4 comments · Fixed by #812
Closed

error_stack errors improperly parsed by rust-mode on emacs #811

wildwestrom opened this issue Jul 15, 2022 · 4 comments · Fixed by #812
Assignees
Labels
area/libs > error-stack Affects the `error-stack` crate (library)

Comments

@wildwestrom
Copy link
Contributor

This is related to rust-lang/rust-mode#452.
I won't repost all the information from there.

Since trying to make rust-mode also parse this particular type of error seems a bit cumbersome, I think it may make sense to add a .dir-locals.el file that somebody can drop into their project.

@wildwestrom
Copy link
Contributor Author

  (setq error_stack-regexps
    '("\\(?:at\\|',\\) \\(\\([^:\s]+\\):\\([0-9]+\\)\\)"
      2 3 nil nil 1))
  (setf (cdr (assoc 'cargo compilation-error-regexp-alist-alist))
        error_stack-regexps)

Here's my current workaround. I just need to figure out how to make this work locally only.
Of course, if it's not a problem for @rust-lang to add this to rust-mode then I won't have to consider this as an option.

@TimDiekmann TimDiekmann self-assigned this Jul 15, 2022
@TimDiekmann TimDiekmann added the area/libs > error-stack Affects the `error-stack` crate (library) label Jul 15, 2022
@TimDiekmann
Copy link
Member

Hi @wildwestrom and thanks for reporting this!

Would you like to open a PR for this? While this should be fixed in Emacs, we're happy to provide a temporary workaround until this is fixed to improve user performance.

@wildwestrom
Copy link
Contributor Author

wildwestrom commented Jul 15, 2022

Would you like to open a PR for this?

Absolutely!
I'm thinking that since there is no way to make compilation-error-regexp-alist-alist a local variable, then I'll have to edit the list itself.
Maybe this can just be somewhere in documentation. What do you think?

@TimDiekmann
Copy link
Member

I never used emacs so I'm probably the wrong one to ask if/how this is possible. Adding this to the README.md sounds reasonable I think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/libs > error-stack Affects the `error-stack` crate (library)
Development

Successfully merging a pull request may close this issue.

2 participants