更新了一下package,现在只要打开spacemacs就会提示这个,有解决办法吗?
1 个赞
spacemacs 已经处理了 https://github.com/syl20bnr/spacemacs/pull/15140 更新就好
如果你也用 Spacemacs
,把第三行注释掉!
(setq configuration-layer-elpa-archives
'(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
;;("org-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
("gnu-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
)
记得把 no-gnu 也加上 https://mirrors.tuna.tsinghua.edu.cn/elpa/
看起来还是不行。spacemacs配置如下:
spacemacs是最新的
spc-a-o-a的时候还是会提示如下:
另外比较奇怪的时候,第一次spc-a-o-a的时候,显示不出任何agenda,必须spc-f-e-R重新Reload spacemacs的配置然后再spc-a-o-a的时候才可以显示。然后每次显示之前,都会提示,必须随便摁一个摁键才可以。
以下是我的spacemacs完整配置。
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
dotspacemacs-distribution 'spacemacs
dotspacemacs-enable-lazy-installation 'unused
dotspacemacs-ask-for-lazy-installation t
dotspacemacs-configuration-layer-path '()
dotspacemacs-configuration-layers
'(html
typescript
imenu-list
themes-megapack
systemd
yaml
(go :variables
go-format-before-save t
gofmt-command "goimports"
go-use-golangci-lint t
go-backend 'lsp
go-tab-width 4
godoc-at-point-function 'godoc-gogetdoc)
docker
github
tmux
colors
rust
org
auto-completion
better-defaults
emacs-lisp
git
markdown
lsp
helm
treemacs
(shell :variables
shell-default-shell 'vterm
shell-default-term-shell "/bin/zsh"
shell-default-full-span t
close-window-with-terminal t
shell-default-height 30
shell-default-position 'bottom)
spell-checking
syntax-checking
version-control
multiple-cursors
)
dotspacemacs-additional-packages '(org-autolist protobuf-mode ace-jump-mode flymake wucuo hl-fill-column)
dotspacemacs-frozen-packages '()
dotspacemacs-excluded-packages '(exec-path-from-shell)
dotspacemacs-install-packages 'used-but-keep-unused))
(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration.
You should not put any user code in there besides modifying the variable
values."
(setq-default
dotspacemacs-enable-emacs-pdumper nil
dotspacemacs-emacs-pdumper-executable-file "emacs"
dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
dotspacemacs-elpa-https t
dotspacemacs-elpa-timeout 5
dotspacemacs-check-for-update nil
dotspacemacs-elpa-subdirectory nil
dotspacemacs-editing-style 'vim
dotspacemacs-startup-buffer-show-version t
dotspacemacs-startup-banner 'official
dotspacemacs-startup-lists '((recents . 5)
(projects . 7)
(agenda . 7))
dotspacemacs-startup-buffer-responsive t
dotspacemacs-show-startup-list-numbers t
dotspacemacs-startup-buffer-multi-digit-delay 0.4
dotspacemacs-new-empty-buffer-major-mode 'text-mode
dotspacemacs-scratch-mode 'text-mode
dotspacemacs-themes '(darkokai)
dotspacemacs-colorize-cursor-according-to-state t
dotspacemacs-default-font '("Monaco"
:size 12
:weight normal
:width normal
:powerline-scale 1.1)
dotspacemacs-leader-key "SPC"
dotspacemacs-emacs-command-key "SPC"
dotspacemacs-ex-command-key ":"
dotspacemacs-emacs-leader-key "M-m"
dotspacemacs-major-mode-leader-key ","
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
dotspacemacs-distinguish-gui-tab nil
dotspacemacs-remap-Y-to-y$ nil
dotspacemacs-retain-visual-state-on-shift t
dotspacemacs-visual-line-move-text nil
dotspacemacs-ex-substitute-global nil
dotspacemacs-default-layout-name "Default"
dotspacemacs-display-default-layout nil
dotspacemacs-auto-resume-layouts nil
dotspacemacs-large-file-size 1
dotspacemacs-auto-save-file-location 'cache
dotspacemacs-max-rollback-slots 5
dotspacemacs-helm-resize nil
dotspacemacs-helm-no-header nil
dotspacemacs-helm-position 'bottom
dotspacemacs-helm-use-fuzzy 'always
dotspacemacs-enable-paste-transient-state nil
dotspacemacs-which-key-delay 0.4
dotspacemacs-which-key-position 'bottom
dotspacemacs-loading-progress-bar t
dotspacemacs-fullscreen-at-startup t
dotspacemacs-fullscreen-use-non-native t
dotspacemacs-maximized-at-startup nil
dotspacemacs-active-transparency 90
dotspacemacs-inactive-transparency 90
dotspacemacs-show-transient-state-title t
dotspacemacs-show-transient-state-color-guide t
dotspacemacs-mode-line-unicode-symbols t
dotspacemacs-smooth-scrolling t
dotspacemacs-line-numbers nil
dotspacemacs-folding-method 'evil
dotspacemacs-smartparens-strict-mode t
dotspacemacs-smart-closing-parenthesis t
dotspacemacs-highlight-delimiters 'all
dotspacemacs-persistent-server nil
dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
dotspacemacs-default-package-repository nil
dotspacemacs-whitespace-cleanup nil
))
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in setting them in
`dotspacemacs/user-config' first."
(setq configuration-layer-elpa-archives
'(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
("nongnu" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/nongnu/")))
)
(when (eq system-type 'darwin)
(setq insert-directory-program "/usr/local/bin/gls"))
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(with-eval-after-load 'treemacs
(evil-define-key 'treemacs treemacs-mode-map (kbd "h") #'treemacs-root-up)
(evil-define-key 'treemacs treemacs-mode-map (kbd "l") #'treemacs-root-down)
(dolist (state '(root-node-open root-node-closed dir-node-open dir-node-closed file-node-open
file-node-closed tag-node-open tag-node-closed tag-node))
(treemacs-define-COLLAPSE-action state #'treemacs-root-up)))
(defvar org-agenda-dir "/Users/tl/org/agenda/")
(setq org-agenda-dir "/Users/tl/org/agenda/")
(setq org-agenda-file-note (expand-file-name "notes.org" org-agenda-dir))
(setq org-agenda-file-journal (expand-file-name "journal.org" org-agenda-dir))
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/agenda/notes.org" "Tasks")
"* 任务: %?\n %i\n %a")
("j" "Journal" entry (file+datetree "~/org/agenda/journal.org")
"* %?\nEntered on %U\n %i\n %a")
("w" "重要紧急" entry (file+headline "~/org/agenda/notes.org" "Tasks")
"* 重要紧急 %?\n %i\n %a")))
(setq org-default-notes-file (expand-file-name "notes.org" org-agenda-dir))
(setq org-agenda-files (list org-agenda-dir))
(defvar original-recentf-save-file recentf-save-file)
(defun change-recentf-save-file-based-on-projectile ()
"Change recentf-save-file base on project name"
(let ((new-recentf-save-file (format "%s.%s" original-recentf-save-file (projectile-project-name))))
(unless (string= recentf-save-file new-recentf-save-file)
(setq recentf-save-file new-recentf-save-file)
; (recentf-cleanup) It doesn't work for me
; create new recentf-list with open files
(setq recentf-list (mapcar 'buffer-file-name (cl-remove-if-not 'buffer-file-name (buffer-list))))
)))
(add-hook 'projectile-mode-hook #'change-recentf-save-file-based-on-projectile)
(add-hook 'projectile-after-switch-project-hook #'change-recentf-save-file-based-on-projectile)
(add-hook 'org-mode-hook (lambda () (org-autolist-mode)))
(spaceline-define-segment buffer-id
(if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
(powerline-buffer-id)))
(setq spacemacs-default-jump-handlers
(remove 'evil-goto-definition spacemacs-default-jump-handlers))
(electric-pair-mode 1)
(org-autolist-mode 1)
(use-package lsp-mode
:hook (go-mode . lsp-deferred)
:commands (lsp lsp-deferred))
(setq lsp-auto-guess-root t)
(setq lsp-ui-doc-enable t)
(setq lsp-ui-sideline-enable t)
(setq lsp-prefer-flymake :none)
(setq lsp-enable-symbol-highlighting t)
(setq lsp-completion-show-detail t)
(setq lsp-completion-show-kind t)
(setq lsp-enable-file-watchers t)
(setq lsp-enable-text-document-color t)
(use-package lsp-ui
:ensure t
:commands lsp-ui-mode)
(use-package company
:ensure t
:config
(setq company-idle-delay 0)
(setq company-minimum-prefix-length 1))
(setq current-project-path (projectile-project-root))
(defun set-project-path (relative-path)
(interactive
(list (read-string "relative path: " "." nil nil nil)))
(setq current-project-path (file-truename relative-path)))
(defun get-project-path ()
(interactive)
(message current-project-path))
(setq default-gopath (getenv "GOPATH"))
(setq current-gopath "")
(setq evil-escape-delay 0.2)
(setq-default evil-escape-key-sequence "jk")
(cond
((string-equal system-type "darwin") ; Mac OS X
(progn
(setq save-to-clipboard-cmd "pbcopy")
(setq paste-from-clipboard-cmd "pbpaste")
)
)
((string-equal system-type "gnu/linux") ; linux
(progn
(setq save-to-clipboard-cmd "xsel -i -b")
(setq paste-from-clipboard-cmd "xsel -o -b")
)
)
)
(defun copy-to-clipboard ()
"Copies selection to x-clipboard."
(interactive)
(if (display-graphic-p)
(progn
(message "Yanked region to x-clipboard!")
(call-interactively 'clipboard-kill-ring-save)
)
(if (region-active-p)
(progn
(shell-command-on-region (region-beginning) (region-end) save-to-clipboard-cmd)
(message "Yanked region to clipboard!")
(deactivate-mark))
(message "No region active; can't yank to clipboard!")))
)
(defun paste-from-clipboard ()
"Pastes from x-clipboard."
(interactive)
(if (display-graphic-p)
(progn
(clipboard-yank)
(message "graphics active")
)
(insert (shell-command-to-string paste-from-clipboard-cmd))
)
)
(evil-leader/set-key "o y" 'copy-to-clipboard)
(evil-leader/set-key "o p" 'paste-from-clipboard)
)
(defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use
Emacs customize menu instead.
This function is called at the very end of Spacemacs initialization."
(custom-set-variables
'(compilation-message-face 'default)
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-safe-themes
'("fc6697788f00629cd01f4d2cc23f1994d08edb3535e4c0facef6b7247b41f5c7" "39dd7106e6387e0c45dfce8ed44351078f6acd29a345d8b22e7b8e54ac25bac4" "f04122bbc305a202967fa1838e20ff741455307c2ae80a26035fbf5d637e325f" "3632cf223c62cb7da121be0ed641a2243f7ec0130178722554e613c9ab3131de" "0fffa9669425ff140ff2ae8568c7719705ef33b7a927a0ba7c5e2ffcfac09b75" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "9b59e147dbbde5e638ea1cde5ec0a358d5f269d27bd2b893a0947c4a867e14c1" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8f54cfa3f010d83d782fbcdc3a34cdc9dfe23c8515d87ba22d410c033160ad7e" "2809bcb77ad21312897b541134981282dc455ccd7c14d74cc333b6e549b824f3" "e7ba99d0f4c93b9c5ca0a3f795c155fa29361927cadb99cfce301caf96055dfd" "366b9053faaf433b42746226dafe8e07b248fc09f263b54768d2da96af231152" "ab0f81acbf7510140b0e592523eb12424b96da7c52bd3e0318c4456d114015a6" "3987c0d4dd1c239b4151aa4b01d3a0f17d069146c6c71f5a4765e194916458a9" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "8f567db503a0d27202804f2ee51b4cd409eab5c4374f57640317b8fcbbd3e466" "2dff5f0b44a9e6c8644b2159414af72261e38686072e063aa66ee98a2faecf0e" "73c23be438652197c60b47194f37dd24ecb72b6bc41f18fb11a1c5d8dc1089c1" "0cd00c17f9c1f408343ac77237efca1e4e335b84406e05221126a6ee7da28971" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" default))
'(evil-want-Y-yank-to-eol nil)
'(fci-rule-color "#323342")
'(helm-completion-style 'emacs)
'(highlight-changes-colors '("#ff8eff" "#ab7eff"))
'(highlight-symbol-colors
'("#4ab71e4a53c5" "#24102e386af7" "#54ef0d7751a3" "#1e79173c7bea" "#40d020d85306" "#54ef0d7751a3" "#104123987c15"))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors
'(("#323342" . 0)
("#63de5d" . 20)
("#4BBEAE" . 30)
("#1DB4D0" . 50)
("#9A8F21" . 60)
("#A75B00" . 70)
("#F309DF" . 85)
("#323342" . 100)))
'(hl-bg-colors
'("#866300" "#992700" "#a7020a" "#a00559" "#243e9b" "#0061a8" "#007d76" "#5b7300"))
'(hl-fg-colors
'("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36"))
'(hl-todo-keyword-faces
'(("TODO" . "#dc752f")
("NEXT" . "#dc752f")
("THEM" . "#2aa198")
("PROG" . "#268bd2")
("OKAY" . "#268bd2")
("DONT" . "#d70000")
("FAIL" . "#d70000")
("DONE" . "#86dc2f")
("NOTE" . "#875f00")
("KLUDGE" . "#875f00")
("HACK" . "#875f00")
("TEMP" . "#875f00")
("FIXME" . "#dc752f")
("XXX+" . "#dc752f")
("\\?\\?\\?+" . "#dc752f")))
'(jdee-db-active-breakpoint-face-colors (cons "#1B2229" "#fd971f"))
'(jdee-db-requested-breakpoint-face-colors (cons "#1B2229" "#b6e63e"))
'(jdee-db-spec-breakpoint-face-colors (cons "#1B2229" "#525254"))
'(lsp-ui-doc-border "#93a1a1")
'(magit-diff-use-overlays nil)
'(nrepl-message-colors
'("#dc322f" "#cb4b16" "#b58900" "#5b7300" "#b3c34d" "#0061a8" "#2aa198" "#d33682" "#6c71c4"))
'(objed-cursor-color "#e74c3c")
'(org-agenda-files nil)
'(org-fontify-done-headline nil)
'(org-fontify-todo-headline nil)
'(package-selected-packages
'(org-contrib org-autolist org-gtd tagedit slim-mode scss-mode sass-mode pug-mode impatient-mode helm-css-scss haml-mode counsel-css company-web web-completion-data helm-gtags ggtags d-mode counsel-gtags counsel swiper company-dcd ivy flycheck-dmd-dub orgit-forge yaml orgit org git-commit with-editor transient dash org-rich-yank org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-cliplink htmlize helm-org-rifle gnuplot evil-org soria-theme nova-theme vs-dark-theme molokai-theme monokai-theme dracula-theme solarized-theme openstack-cgit-browse-file web-mode tide typescript-mode import-js grizzl emmet-mode add-node-modules-path zones bazel-mode yasnippet-snippets yaml-mode xterm-color ws-butler writeroom-mode winum which-key vterm volatile-highlights vi-tilde-fringe uuidgen use-package unfill treemacs-projectile treemacs-persp treemacs-magit treemacs-icons-dired treemacs-evil toml-mode toc-org terminal-here systemd symon symbol-overlay string-inflection spaceline-all-the-icons smeargle shell-pop ron-mode restart-emacs rainbow-mode rainbow-identifiers rainbow-delimiters racer popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless mwim multi-term move-text mmm-mode markdown-toc magit-svn magit-section magit-gitflow macrostep lsp-ui lorem-ipsum link-hint indent-guide hybrid-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-mode-manager helm-make helm-lsp helm-ls-git helm-gitignore helm-git-grep helm-flx helm-descbinds helm-company helm-c-yasnippet helm-ag google-translate golden-ratio godoctor go-tag go-rename go-impl go-guru go-gen-test go-fill-struct go-eldoc gitignore-templates gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ gh-md fuzzy font-lock+ flyspell-correct-helm flycheck-rust flycheck-pos-tip flycheck-package flycheck-golangci-lint flycheck-elsa flx-ido fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-surround evil-numbers evil-nerd-commenter evil-matchit evil-magit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-cleverparens evil-args evil-anzu eval-sexp-fu eshell-z eshell-prompt-extras esh-help emr elisp-slime-nav editorconfig dumb-jump dotenv-mode dockerfile-mode docker diminish devdocs define-word darkokai-theme dap-mode company-go column-enforce-mode color-identifiers-mode clean-aindent-mode centered-cursor-mode cargo browse-at-remote auto-yasnippet auto-highlight-symbol auto-dictionary auto-compile aggressive-indent ace-link ace-jump-helm-line ac-ispell))
'(pdf-view-midnight-colors '("#fdf4c1" . "#1d2021"))
'(pos-tip-background-color "#E6DB74")
'(pos-tip-foreground-color "#242728")
'(rustic-ansi-faces
["#1c1e1f" "#e74c3c" "#b6e63e" "#e2c770" "#268bd2" "#fb2874" "#66d9ef" "#d6d6d4"])
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(vc-annotate-background nil)
'(vc-annotate-background-mode nil)
'(vc-annotate-color-map
'((20 . "#ff0066")
(40 . "#CF4F1F")
(60 . "#C26C0F")
(80 . "#E6DB74")
(100 . "#AB8C00")
(120 . "#A18F00")
(140 . "#989200")
(160 . "#8E9500")
(180 . "#63de5d")
(200 . "#729A1E")
(220 . "#609C3C")
(240 . "#4E9D5B")
(260 . "#3C9F79")
(280 . "#53f2dc")
(300 . "#299BA6")
(320 . "#2896B5")
(340 . "#2790C3")
(360 . "#06d8ff")))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(unspecified "#242728" "#323342" "#F70057" "#ff0066" "#86C30D" "#63de5d" "#BEB244" "#E6DB74" "#40CAE4" "#06d8ff" "#FF61FF" "#ff8eff" "#00b2ac" "#53f2dc" "#f8fbfc" "#ffffff"))
'(xterm-color-names
["#073642" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#eee8d5"])
'(xterm-color-names-bright
["#002b36" "#cb4b16" "#586e75" "#657b83" "#839496" "#6c71c4" "#93a1a1" "#fdf6e3"]))
(custom-set-faces
'(default ((t (:background nil)))))
)
我当时手动把 C:\Users\sunsh\.emacs.d\elpa\28.0\develop\
下的 org-2021??
删除后,再更新 Package
,org
的版本就变成 org-9.5.1
了。
我把~/.emacs.d/elpa/develop/目录下的org-2021xxx给删了之后,重启spacemacs确实好了。感谢vikingssd和Voleking。
最终解决方案看来是:
如果是spacemacs,且是develop分支
1、删除org-cn,加上nongnu
(setq configuration-layer-elpa-archives
'(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
("nongnu" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/nongnu/")
("gnu-cn" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
)
2、把~/emacs.d/elpa/develop目录下的org-2021xxx目录给删掉,然后重启spacemacs。
1 个赞
- 只是提醒 vikingssd ,org 不是来自那