Error loading autoloads: (user-error Local variables entry is missing the suffix)
这是报错内容,能提供一下解决问题的方向吗,完全没有任何头绪,又抵不住centaur emacs的好用。
什么平台,什么版本,有哪些配置,做过什么排查,有什么有用信息,去掉私有配置是否正常,重装是否有用?……
这样很难判断呀。
看看这个有没有用:
opened 04:09PM - 29 Feb 20 UTC
closed 12:18AM - 25 Jun 20 UTC
re:packages
status:resolved-elsewhere
module:core:cli
is:upstream
re:git
**What did you expect to happen?**
Using cc module, or *-posframe packages and … running `doom sync` should work.
**What actually happened?**
Error during compilation of the affected packages(s),
```
error: (Local variables entry is missing the suffix)
```
full output available below.
**Additional details:**
Currently running emacs 26.3, but I have tried 27 and 28 with same result.
I have tried reinstalling doom from scratch.
On my work PC, I have exactly the same setup, but there it works correctly. I was unable to find any similar issues on the internet.
repo link: https://github.com/rzikm/.doom.d/
running `doom -d sync` produces following output
<details><pre>- Debug mode on
> Synchronizing your config with Doom Emacs...
> (Re)generating core autoloads...
> Generating core autoloads...
- Scanning core/autoload/buffers.el
- Scanning core/autoload/cache.el
- Scanning core/autoload/cli.el
- Scanning core/autoload/config.el
- Scanning core/autoload/debug.el
- Scanning core/autoload/files.el
- Scanning core/autoload/fonts.el
- Scanning core/autoload/format.el
- Scanning core/autoload/help.el
- Scanning core/autoload/packages.el
- Scanning core/autoload/plist.el
- Scanning core/autoload/projects.el
- Scanning core/autoload/scratch.el
- Scanning core/autoload/sessions.el
- Scanning core/autoload/text.el
- Scanning core/autoload/themes.el
- Scanning core/autoload/ui.el
- Scanning modules/app/calendar/autoload.el
- Scanning modules/app/irc/autoload/irc.el
- Scanning modules/app/irc/autoload/settings.el
- Scanning modules/app/regex/autoload/export.el
- Scanning modules/app/regex/autoload/regex.el
- Scanning modules/app/rss/autoload.el
- Scanning modules/app/twitter/autoload.el
- Scanning modules/checkers/spell/autoload.el
- Scanning modules/checkers/syntax/autoload.el
- Scanning modules/completion/company/autoload.el
- Scanning modules/completion/helm/autoload/evil.el
- Scanning modules/completion/helm/autoload/helm.el
- Scanning modules/completion/helm/autoload/posframe.el
- Scanning modules/completion/ivy/autoload/evil.el
- Scanning modules/completion/ivy/autoload/hydras.el
- Scanning modules/completion/ivy/autoload/ivy.el
- Scanning modules/completion/ivy/autoload/posframe.el
- Scanning modules/config/default/autoload/default.el
- Scanning modules/config/default/autoload/files.el
- Scanning modules/config/default/autoload/search.el
- Scanning modules/config/default/autoload/text.el
- Scanning modules/config/literate/autoload.el
- Scanning modules/editor/evil/autoload/advice.el
- Scanning modules/editor/evil/autoload/embrace.el
- Scanning modules/editor/evil/autoload/evil.el
- Scanning modules/editor/evil/autoload/ex.el
- Scanning modules/editor/evil/autoload/files.el
- Scanning modules/editor/evil/autoload/textobjects.el
- Scanning modules/editor/evil/autoload/unimpaired.el
- Scanning modules/editor/file-templates/autoload.el
- Scanning modules/editor/fold/autoload/fold.el
- Scanning modules/editor/fold/autoload/hideshow.el
- Scanning modules/editor/format/autoload/evil.el
- Scanning modules/editor/format/autoload/format.el
- Scanning modules/editor/format/autoload/settings.el
- Scanning modules/editor/god/autoload.el
- Scanning modules/editor/multiple-cursors/autoload/evil-mc.el
- Scanning modules/editor/rotate-text/autoload.el
- Scanning modules/editor/snippets/autoload/settings.el
- Scanning modules/editor/snippets/autoload/snippets.el
- Scanning modules/editor/word-wrap/autoload.el
- Scanning modules/emacs/dired/autoload.el
- Scanning modules/emacs/electric/autoload.el
- Scanning modules/emacs/vc/autoload/hydra.el
- Scanning modules/emacs/vc/autoload/vc.el
- Scanning modules/email/mu4e/autoload/email.el
- Scanning modules/email/mu4e/autoload/evil.el
- Scanning modules/email/notmuch/autoload.el
- Scanning modules/email/wanderlust/autoload.el
- Scanning modules/lang/assembly/autoload.el
- Scanning modules/lang/cc/autoload.el
- Scanning modules/lang/clojure/autoload.el
- Scanning modules/lang/common-lisp/autoload/common-lisp.el
- Scanning modules/lang/csharp/autoload.el
- Scanning modules/lang/emacs-lisp/autoload.el
- Scanning modules/lang/ess/autoload.el
- Scanning modules/lang/faust/autoload.el
- Scanning modules/lang/go/autoload.el
- Scanning modules/lang/haskell/autoload.el
- Scanning modules/lang/java/autoload.el
- Scanning modules/lang/javascript/autoload.el
- Scanning modules/lang/julia/autoload.el
- Scanning modules/lang/kotlin/autoload.el
- Scanning modules/lang/latex/autoload.el
- Scanning modules/lang/lua/autoload/lua.el
- Scanning modules/lang/lua/autoload/moonscript.el
- Scanning modules/lang/markdown/autoload.el
- Scanning modules/lang/nix/autoload.el
- Scanning modules/lang/ocaml/autoload.el
- Scanning modules/lang/org/autoload/contrib-dragndrop.el
- Scanning modules/lang/org/autoload/contrib-ipython.el
- Scanning modules/lang/org/autoload/contrib-present.el
- Scanning modules/lang/org/autoload/org-attach.el
- Scanning modules/lang/org/autoload/org-avy.el
- Scanning modules/lang/org/autoload/org-capture.el
- Scanning modules/lang/org/autoload/org-export.el
- Scanning modules/lang/org/autoload/org-link.el
- Scanning modules/lang/org/autoload/org-refile.el
- Scanning modules/lang/org/autoload/org-tables.el
- Scanning modules/lang/org/autoload/org.el
- Scanning modules/lang/php/autoload.el
- Scanning modules/lang/plantuml/autoload.el
- Scanning modules/lang/python/autoload/conda.el
- Scanning modules/lang/python/autoload/pyenv.el
- Scanning modules/lang/python/autoload/python.el
- Scanning modules/lang/qt/autoload.el
- Scanning modules/lang/racket/autoload.el
- Scanning modules/lang/rest/autoload.el
- Scanning modules/lang/ruby/autoload.el
- Scanning modules/lang/rust/autoload.el
- Scanning modules/lang/scala/autoload.el
- Scanning modules/lang/scheme/autoload.el
- Scanning modules/lang/sh/autoload.el
- Scanning modules/lang/terra/autoload.el
- Scanning modules/lang/web/autoload/css.el
- Scanning modules/lang/web/autoload/evil.el
- Scanning modules/lang/web/autoload/html.el
- Scanning modules/term/eshell/autoload/commands.el
- Scanning modules/term/eshell/autoload/company.el
- Scanning modules/term/eshell/autoload/eshell.el
- Scanning modules/term/eshell/autoload/evil.el
- Scanning modules/term/eshell/autoload/prompts.el
- Scanning modules/term/eshell/autoload/settings.el
- Scanning modules/term/shell/autoload.el
- Scanning modules/term/term/autoload.el
- Scanning modules/term/vterm/autoload.el
- Scanning modules/tools/debugger/autoload/debugger.el
- Scanning modules/tools/debugger/autoload/evil.el
- Scanning modules/tools/editorconfig/autoload.el
- Scanning modules/tools/ein/autoload/ein.el
- Scanning modules/tools/ein/autoload/hydra.el
- Scanning modules/tools/eval/autoload/eval.el
- Scanning modules/tools/eval/autoload/evil.el
- Scanning modules/tools/eval/autoload/repl.el
- Scanning modules/tools/eval/autoload/settings.el
- Scanning modules/tools/gist/autoload/evil.el
- Scanning modules/tools/lookup/autoload/docsets.el
- Scanning modules/tools/lookup/autoload/evil.el
- Scanning modules/tools/lookup/autoload/lookup.el
- Scanning modules/tools/lookup/autoload/online.el
- Scanning modules/tools/lsp/autoload.el
- Scanning modules/tools/macos/autoload.el
- Scanning modules/tools/magit/autoload.el
- Scanning modules/tools/make/autoload.el
- Scanning modules/tools/pass/autoload.el
- Scanning modules/tools/pdf/autoload/pdf.el
- Scanning modules/tools/prodigy/autoload.el
- Scanning modules/tools/rgb/autoload.el
- Scanning modules/tools/tmux/autoload/evil.el
- Scanning modules/tools/tmux/autoload/tmux.el
- Scanning modules/ui/doom-dashboard/autoload.el
- Scanning modules/ui/fill-column/autoload.el
- Scanning modules/ui/hydra/autoload/windows.el
- Scanning modules/ui/modeline/autoload.el
- Scanning modules/ui/nav-flash/autoload.el
- Scanning modules/ui/neotree/autoload.el
- Scanning modules/ui/popup/autoload/popup.el
- Scanning modules/ui/popup/autoload/settings.el
- Scanning modules/ui/pretty-code/autoload.el
- Scanning modules/ui/treemacs/autoload.el
- Scanning modules/ui/unicode/autoload.el
- Scanning modules/ui/vc-gutter/autoload.el
- Scanning modules/ui/vi-tilde-fringe/autoload.el
- Scanning modules/ui/workspaces/autoload/evil.el
- Scanning modules/ui/workspaces/autoload/workspaces.el
> Byte-compiling core autoloads file...
[32mΓ£ô Generated .local/autoloads.elc[0m
> Installing packages...
-> Building helm-posframe...
[31mx There was an unexpected error:[0m
[1mType:[0m doom-package-error
[1mMessage:[0m
Error with packages
[1mData:[0m
"helm-posframe"
(error "helm-posframe.el:0:0: error: error: (Local variables entry is missing the suffix)")
"FIND: Invalid switch
"
Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:
doom -d sync
If you file a bug report, please include it!
</pre></details>
**System information:**
<details><pre>
((emacs
(version . "26.3")
(features . "XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2")
(build . "Aug 29, 2019")
(buildopts "--without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'")
(windowsys . batch)
(daemonp . server-running))
(doom
(version . "2.0.9")
(build . "HEAD -> develop ac87afe34 2020-02-29 00:30:22 -0500")
(dir . "c:/Users/rzikm/.doom.d/"))
(system
(type . windows-nt)
(config . "x86_64-w64-mingw32")
(shell . "C:/ProgramData/chocolatey/lib/Emacs/tools/emacs/libexec/emacs/26.3/x86_64-w64-mingw32/cmdproxy.exe")
(uname . "n/a")
(path "c:/Program Files/ConEmu/ConEmu/Scripts" "C:/Program Files/ConEmu" "C:/Program Files/ConEmu/ConEmu" "C:/Perl64/site/bin" "C:/Perl64/bin" "C:/Program Files (x86)/Common Files/Oracle/Java/javapath" "C:/Python38/Scripts/" "C:/Python38/" "C:/Windows/system32" "C:/Windows" "C:/Windows/System32/Wbem" "C:/Windows/System32/WindowsPowerShell/v1.0/" "C:/Windows/System32/OpenSSH/" "C:/ProgramData/chocolatey/bin" "C:/Program Files/dotnet/" "C:/Program Files/Microsoft SQL Server/130/Tools/Binn/" "C:/tools/BCURRAN3" "C:/Program Files/LLVM/bin" "C:/Program Files/Git/cmd" "C:/Users/rzikm/.cargo/bin" "C:/Users/rzikm/AppData/Local/Microsoft/WindowsApps" "C:/Program Files/Emacs/x86_64/bin/" "C:/Program Files/NASM" "C:/Program Files (x86)/OpenSSL/bin/" "C:/Program Files/CMake/bin/" "C:/Users/rzikm/.dotnet/tools" "C:/Users/rzikm/.emacs.d/bin" "." "c:/ProgramData/chocolatey/lib/Emacs/tools/emacs/libexec/emacs/26.3/x86_64-w64-mingw32"))
(config
(envfile)
(elc-files . 0)
(modules :completion company helm :ui doom doom-dashboard doom-quit fill-column hl-todo hydra modeline nav-flash ophints (popup +all +defaults) treemacs vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors rotate-text snippets :emacs dired electric ibuffer vc :checkers syntax :tools (eval +overlay) gist (lookup +docsets) lsp magit make :lang csharp data emacs-lisp fsharp latex markdown (org +dragndrop +present) php python rst rust sh web :config (default +bindings +smartparens))
(packages . "<(void-function sp-point-in-string)>")
(unpin . "<(void-function sp-point-in-string)>")
(elpa "n/a")))
</pre></details>
我只能猜测,你下载的某个包里包含这样的内容
;; Local Variables:
;; coding: utf-8-unix
;; End:
把这三个包的el文件里的utf-8-unix改成utf-8之后,他还是会自动load older file,因为file is newer than byte compiled
没有任何配置,就官网下载emacs 29.1然后将centaur github的zip包下载下来,解压并改名为C:/user/administrator/.emacs.d,然后运行runemacs.exe,自动安装后就报这个错误。
尝试重新安装这几个包。如果功能没有影响不用关注这个错误。
emacle
2023 年11 月 11 日 04:48
9
(package-initialize)
配置全清除了,只要加上这一行就会报同样的错误,真是奇怪,并且 M-x package-install 安装任何包都会出现
package–with-response-buffer-1: Local variables entry is missing the suffix
GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02
emacle
2023 年11 月 11 日 05:36
10
Error loading autoloads: (user-error Local variables entry is missing the suffix)
这个应该是sis.el的包引起的。
但是去掉后 (package-initialize) 还是不能正常安装包
我重装了一遍没有报错了,我挂了梯子,之前应该是梯子的问题,清华镜像不行
emacle
2023 年11 月 11 日 12:43
12
(package-initialize)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
;; ("org" . "http://orgmode.org/elpa/") ; org/org-plus-contrib
))
(setq url-proxy-services '(("no_proxy" . "127.0.0.1")
("http" . "127.0.0.1:10809")
("https" . "127.0.0.1:10809")))
有可能,我感觉是网络代理有问题,后来故意找了一个国内源想试试,刚好用的是清华镜像。。。没想到这个镜像有问题可能这个镜像是http的原因?
回头我再试试,我的代理在浏览器上配置是没问题的,emacs里感觉没起作用也真是奇怪。
在custom.el文件把这个 centaur打开设置成自己的端口
不用改其他地方,源还是他自己的源,这样耐心下载完成就没问题,
但必须得官方melpa.org的源,必须网好或者挂梯子
大佬,centaur 安装好了,打开显示的是2.几秒,但是实际上我计时了要十多秒,怎么回事啊,这也太难受了
wsug
2023 年11 月 12 日 08:37
16
其实我比较奇怪为什么各种流行的emacs配置,启动时都要联网更新插件,这在网好的情况下是没问题,但实际大部分人的网络都是有问题的. 但好像大家都默认这样设计是合理的
emacle
2023 年11 月 13 日 09:15
18
这个问题真是麻烦,也不是sis的原因,也不是镜像的原因。
(setq user-emacs-directory "xxx/.emacs.d/")
我的是 windows 11 emacs 29, 配置都是以前老系统复制过来的,因为配置里面加了这一句就出问题,最明显的是 M-x eww
输入任意网站后都会报 Local variables entry is missing the suffix 错误,M-x package-install
这种也是会报错,好像涉及到网络读取哪个文件造成权限不行或都编码问题。
这一句本身也没什么问题,我把 ~/.emacs.d/ 目录下的文件全部移走,然后再一步一步剪切加回来,就好了,不确定是哪个文件引起的,可能 是权限的问题 或者编码的问题。
有没有想过elpa加入配置维护放不方便?这种的话建议使用git-submodule 方式。如果用melpa有问题,国内有各种镜像站点,基本也不会有网络问题啊。比如,Centaur Emacs第一次启动还有网络自动检测,自动选择速度最快的镜像。
Shynur
2023 年11 月 22 日 05:22
20
另外提一嘴, (emacs-init-time)
算出来的时间是严重偏小的, 建议用
(add-hook 'window-setup-hook
(lambda ()
...
(time-to-seconds (time-since before-init-time))
...))
追求更准确的数值, 可以放到 post-command-hook
里.
恕我直言, 使用 (emacs-init-time)
来统计整个 startup time 是一种自欺欺人的做法.