-
Notifications
You must be signed in to change notification settings - Fork 314
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
snippets/go-mode/default: Invalid Read Syntax: "#" on Emacs development #521
Comments
No. Sorry, but I need a way to reliably reproduce the error. Read https://github.com/capitaomorte/yasnippet#important-note-regarding-bug-reporting FWIW I'm also running fairly recent emacsen. I will reopen this issue once you provide this information. |
I just updated Emacs to no avail—still the same problem. Currently running off of the following commit (obtained using
I suppose it may be a problem with my configuration, seeing as when I run the following code in a (setq load-path (cons (expand-file-name "~/.emacs.d/elpa/yasnippet-20140929.240/") load-path))) I'll investigate further. |
This is the same as AndreaCrotti/yasnippet-snippets#55. I think the problem is that package.el adds the snippet directories to the
(defun command-line ()
"A subroutine of `normal-top-level'.
Amongst another things, it parses the command-line arguments."
...
(unless inhibit-default-init
(let ((inhibit-startup-screen nil))
;; Users are supposed to be told their rights.
;; (Plus how to get help and how to undo.)
;; Don't you dare turn this off for anyone
;; except yourself.
(load "default" t t))) |
@npostavs well spotted, is there a way to prevent snippet directories from being added to the |
As a workaround for this problem until a complete fix is sorted out, it usually suffices to put |
@treese and @rye I still haven't understood very well from this thread what is a reproducible way to see the error happening. I'm guessing it happens only with very recent emacsen, and when yasnippet is I would try to add an empty |
I ran into it by installing the yasnippets package using the package system, which then seems to automatically add a huge number of directories to the load-path. I am using Aquamacs 3.0 on a Mac, which is based on Emacs version 24.3.50.2. I will try the . |
Hmm, I just tried that with emacs 24.3.3 and 24.3.94.1 and it didn't happen to me. |
In my former Emacs configuration (since opening this issue, I've started work on a new one—it was time for one anyways), I did have something like that. It appears that Emacs was trying to load the snippets as LISP code (?). From my original configuration, I had the following code getting called on startup: ;; file: init-lib.el
(defun init--add-directory-to-load-path (path)
"Adds a directory to the load-path"
(let ((default-directory path))
(setq load-path
(append
(let ((load-path (copy-sequence load-path)))
(normal-top-level-add-subdirs-to-load-path))
load-path)))
(message "Added %s to the load-path" path))
(provide 'init-lib) and it was getting called like so: ;; file: init.el
(load-file "~/.emacs.d/init-lib.el")
(require 'init-lib)
(init--add-directory-to-load-path "~/.emacs.d/elpa/")
(init--add-directory-to-load-path "~/.emacs.d/lisp/") So it is very possible that code that was called after that was trying to load the snippets as Emacs-Lisp code. I'm not sure, though. One of the reasons I started rewriting my config was that it was just a jumbled mess that was pretty hard to understand, and was very inconsistent. So far, I haven't run into this problem on my fresh config. I think that it might have been a code completion package that was causing these problems in my former config—I seem to remember some |
Can you try it and report back here, please? |
I tried |
Nice one @treese |
I'm currently running a version of Emacs that updates nightly to the latest Emacs version of the Git clone of the BZR repo. Today, I noticed a problem with loading, which prevents yasnippet from loading entirely:
Any ideas? I'll be glad to test any patches or pull requests.
The text was updated successfully, but these errors were encountered: