-
Notifications
You must be signed in to change notification settings - Fork 62
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-sexp: Scan error: "Unbalanced parentheses", 121867, 1 with Emacs 29 #329
Comments
Another way to reproduce the error. This time
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(use-package helpful
:ensure t)
(cl-defstruct test-struct
;; just a smiley :) inside comments
(test-slot nil))
|
I can reproduce this on 29.1 ( (require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(use-package helpful
:ensure t)
(helpful-variable 'mode-line-format) However, opening the
|
I have this problem to. This seemingly innocuous commit (66ba816) is the first one that has the error for me. It doesn't error on every variable, but this consistently errors: (helpful-variable 'load-path) But this does not: (helpful-variable 'user-emacs-directory) |
I got here because of the same error on the default value of |
Hi. Please let me know if #335 fixes this issue for you. @montchr @purplg @Jake-Moss @fredericgiquel. |
@LemonBreezes Unfortunately this did not fix the issue for me. I tested with Configured with: ./configure --with-imagemagick --with-json --with-native-compilation=aot --with-pgtk --with-tree-sitter --without-x I'd be happy to provide any more details. I'm not sure what information would be useful for this kind of error. |
Okay. You're right. It works if we do EDIT: I think I'm going to leave it as-is calling the major mode. Let-binding the syntax table doesn't work for this. |
@LemonBreezes The error described in first and second post is still present when I test with your PR. The first problem has been fixed in |
You've tried it with the current version where we call the major mode as well? I'm thinking we should just call the major mode or not let-bind auto-mode-alist. |
@LemonBreezes As far as I understand the PR, your modification only applies to symbols defined in C (condition in line 1255) whereas the problem described happens in Emacs Lisp files. I also did a test by adding |
Ohhh, makes sense. The fix involving setting the major-mode was specifically because I got an error using |
I think I finally figured out the right fix in #336. |
@LemonBreezes, I'm not sure if the change in #336 is the way to go. For one, using the In fact, when Helpful opens a source buffer, it uses the |
Yeah, the error occurs with the |
Manually running the following code in the buffer returned by (let ((syntax-table (make-syntax-table)))
(c-populate-syntax-table syntax-table)
(set-syntax-table syntax-table)) This is effectively what However, manually enabling |
This seems to work for me now! :) |
I actually get a similar error with this package, enabled as per the OP, and calling C-h v load-path. It returns: forward-list: Scan error: "Unbalanced parentheses", 157780, 170875 |
Just updated my PR #336 to add a test case. Hopefully that will be merged as a temporary fix until the day someone decides to grok the C syntax table code enough to set that up properly. |
Steps to reproduce
init.el
:helpful-callable
lsp--workspace-server-capabilities
Further information
The error only happens with Emacs 29. It works well with Emacs 28.
Debug trace:
Because of the error,
lsp-mode.el
is not closed. So we can swith to this buffer (opened infundamental-mode
) and executecheck-parens
. This command returns "Unmatched bracket or quote" in this case.But if we open the same
lsp-mode.el
withfind-file
(so with emacs-lisp major-mode),check-parens
detects no problem.Last thing, not binding
auto-mode-alist
to nil inhelpful--open-if-needed
fixes the problem. But it's probably too radical.The text was updated successfully, but these errors were encountered: