Closed dmvianna closed 3 months ago
To trigger the problem I can just open the config after starting and add whitespace. However if I use parinfer-rust-switch-mode
after the first error is triggered, then I cease to see the problem. Using that function before the error is triggered does not prevent it.
I dogfood parinfer-rust-mode all the time in emacs-lisp files, and they have lots of comments so this shouldn't be true.
What versions of parinfer-rust-mode and parinfer-rust do you have installed? You can check the library's version by calling the parifner-rust-version
function.
(parinfer-rust-version)
Additionally, what does your parinfer-rust-mode
config look like?
Version 0.4.6
(use-package parinfer-rust-mode
:custom
(parinfer-rust-troublesome-modes ;; removed electric-pair-mode from list
'(hungry-delete-mode global-hungry-delete-mode))
(parinfer-rust-auto-download t)
(electric-pair-local-mode -1)
(parinfer-rust-preferred-mode 'paren)
:hook
(emacs-lisp-mode
ielm-mode
lisp-mode
slime-repl-mode
lisp-interaction-mode
racket-mode)
(before-save . delete-trailing-whitespace))
I am not sure if this is your problem but parinfer-rust-preferred-mode
should be a string and not a symbol.
From:
(parinfer-rust-preferred-mode 'paren)
To:
(parinfer-rust-preferred-mode "paren")
This might explain why switching modes would fix it.
Oh, I'm glad I reported the issue! That was easy, thank you!
Did you change your API? I wouldn't have come up with a symbol were I not copying it from somewhere else š¤ .
Happy to close, after making the change the error disappeared.
I don't think that I changed the API; looking through the git-blame, it looks like it always required a string. However, I also think that this is a pretty reasonable API, so I have added support for symbols when using setq
for parinfer-rust-preferred-mode
.
Thanks for bringing this up š
I've noticed recently after updating my libraries that when I run emacs 29.3 with
emacs --debug-init
and start editing any elisp file, I get this:My interpretation is that
parinfer-rust-mode
is unable to parse comments, which is very surprising.