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
Invalid read syntax: "]" #270
Comments
I'm having the same problem. Have been able to work around the issue? |
I have just tested with 'org-toggle-inline-images', it worked without problem with helpful-callable, so it is probably something in your setup. Have you tried to run Emacs with -Q option and just load helpful.el and see if it works then? I don't know which package defines python-mark-defun, I don't seem to have it installed, so I can't confirm that one. My Emacs is from the latest master: GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, cairo version 1.17.4) But I don't think that matters. I also suggest installing Emacs with sources uncompressed or to run it form the source directory, that speeds up helpful quite a bit. |
I'm actually using emacs from a snap, to avoid the compilation time. That might be the issue. emacs -q and requiring helpful does work. It is definitely something with my setup, sadly. |
Those things happen. Since you are two different persons, it might be some external package doing something. You will have to debug your setup, like uncomment half, run Emacs, then uncomment half of the half and so, if you can't guess what might cause the syntax error. |
The issue seems to be on helpful. The syntax error comes when calling something like Debugger entered--Lisp error: (invalid-read-syntax "]" 1 81)
read(#<buffer subr.el.gz>)
find-function--search-by-expanding-macros(#<buffer subr.el.gz> with-current-buffer nil)
#<subr find-function-search-for-symbol>(with-current-buffer nil "/var/lib/snapd/snap/emacs/1268/usr/share/emacs/28....")
ad-Advice-find-function-search-for-symbol(#<subr find-function-search-for-symbol> with-current-buffer nil "/var/lib/snapd/snap/emacs/1268/usr/share/emacs/28....")
apply(ad-Advice-find-function-search-for-symbol #<subr find-function-search-for-symbol> (with-current-buffer nil "/var/lib/snapd/snap/emacs/1268/usr/share/emacs/28...."))
find-function-search-for-symbol(with-current-buffer nil "/var/lib/snapd/snap/emacs/1268/usr/share/emacs/28....")
helpful--definition(with-current-buffer t)
helpful-update()
helpful-function(with-current-buffer)
eval-expression((helpful-function 'with-current-buffer) nil nil 127)
funcall-interactively(eval-expression (helpful-function 'with-current-buffer) nil nil 127)
command-execute(eval-expression) |
I don't think so; you said you tested with -Q option, and it worked, so it is probably something else. Looking at the stack trace:
read is a built-in function. I don't know myself if it handles compressed files internally, or they have to be passed in uncompressed before passed to read. Docs for 'read' mention nothing about compressed streams, so no idea tbh. But if it works for you with -Q option, then it is not that. |
I've built from source and it works like a charm. So the issue must be the combination of the snap package build with my config. |
Ok, great it works. Tbh, I have no idea what "snap package" is, but great it works when you build from the source. I recommend also running Emacs from the src directory instead of installing; that removes delays caused by decompressing sources to display Helpful buffers. It least what I have experienced on my computer. |
Emacs snap with native compilation comes from here. It seems to be way faster when run from the source folder. Good to know. |
I am not sure what it is but I have this in my message buffer
when I try
EDIT:
When you remove the I do not know why. Just want to report here. |
I can't reproduce this in my Emacs, so it is definitely your setup.
So have you restored 'file-name-handler-alist' at the end of your setup? People usually set this to nil at the start of their init file and restore to its old value at the end. Somewhere at the end of your init file, or in 'after-init-emacs' hook, you should have:
I don't think it has to do with your problem, but you should certainly restore it back. What might be a problem in your setup is a missing parenthesis:
Try this:
|
Yes and no I do but forgot the code. It is done when emacs goes to idle. When I wait after startup the
You can not reproduce this with my
It does.
Can you please check my original code. I do not see a missing paranthesis. I would assume that this would case an error when starting emacs and my rainbow-delemiter package also do not see a missing one. |
You do. Check use-package documentation for 'bind' keyword. |
For anyone else who finds this through a search engine, I found that I hit this when I neglected to restore my (defvar my--file-name-handler-alist file-name-handler-alist)
(setq-default file-name-handler-alist nil)
(add-hook 'after-init-hook
(lambda ()
(setq file-name-handler-alist my--file-name-handler-alist))) |
When I use helpful-function to search
org-toggle-inline-images
, I got an error: "Invalid read syntax: "]", 1, 125". I found some other functions will also cause this problem, e.g.python-mark-defun
.I also found the problem occurs when the el.gz file will be opened, for example, I search
org-toggle-inline-image
, it failed, and the org.el.gz file will be opened.The backtrace screeshot are here:
The text was updated successfully, but these errors were encountered: