忽然想写博客,结果 m-x 愣是没找到有 blog-admin-start。
我用的 blog-admin 是最新版本。删掉 package 以后不管是 melpa-cn 还是 github 的重新安装都不起作用。
不知道有谁和我有一样的问题。
已经提了 issue。
opened 07:46AM - 23 Jan 17 UTC
closed 12:53PM - 28 Jan 17 UTC
question
# Environment Info
## Emacs version
"GNU Emacs 25.1.1 (x86_64-apple-darwin16.… 3.0, NS appkit-1504.76 Version 10.12.2 (Build 16C67))
of 2017-01-07"
## Spacemacs version
[email protected] (spacemacs)
## Configuration
```
(defun social/init-blog-admin ()
"Initialize blog-admin"
(use-package blog-admin
:defer t
:init
;; Keybinding
(spacemacs/set-leader-keys "ab" 'blog-admin-start)
:config
(progn
;; Open post after create new post
(add-hook 'blog-admin-backend-after-new-post-hook 'find-file)
;; Hexo
(setq blog-admin-backend-path "~/blog")
(setq blog-admin-backend-type 'hexo)
;; create new post in drafts by default
(setq blog-admin-backend-new-post-in-drafts t)
;; create same-name directory with new post
(setq blog-admin-backend-new-post-with-same-name-dir t)
;; default assumes _config.yml
(setq blog-admin-backend-hexo-config-file "_config.yml"))
)
)
```
# Detail
After I updated blog-admin, I cannot find `blog-admin-start` in `M-x`.
I tried to delete packages and recompile, but it didn't work.
## Compile-log
```
Leaving directory ‘/Users/apple/.emacs.d/elpa/blog-admin-20170110.2351’
Compiling file /Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/blog-admin-backend-hexo.el at Mon Jan 23 15:30:52 2017
Entering directory ‘/Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/’
Compiling file /Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/blog-admin-backend-nikola.el at Mon Jan 23 15:30:53 2017
Compiling file /Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/blog-admin-backend-org-page.el at Mon Jan 23 15:30:53 2017
Compiling file /Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/blog-admin-backend.el at Mon Jan 23 15:30:53 2017
Compiling file /Users/apple/.emacs.d/elpa/blog-admin-20170110.2351/blog-admin.el at Mon Jan 23 15:30:53 2017
Compiling no file at Mon Jan 23 15:30:53 2017
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh
Warning (bytecomp): Unused lexical argument ‘file-attributes’
Warning (bytecomp): Unused lexical variable ‘output’
Warning (bytecomp): macro ‘blog-admin-backend-nikola--with-venv’ defined too late
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh,
org-next-visible-heading
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): assignment to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/site-preview-directory’
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh, op/do-publication
```
顺带贴上错误信息:
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh
Warning (bytecomp): Unused lexical argument ‘file-attributes’
Warning (bytecomp): Unused lexical variable ‘output’
Warning (bytecomp): macro ‘blog-admin-backend-nikola--with-venv’ defined too late
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh,
org-next-visible-heading
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): assignment to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/site-preview-directory’
Warning (bytecomp): the following functions are not known to be defined:
blog-admin--table-current-file, blog-admin-refresh, op/do-publication
嗯。似乎是 layer 配置的问题。作者忘记更新插件后在 README 上家加:command blog-admin-start
把更改后的配置贴上。
(defun social/init-blog-admin ()
"Initialize blog-admin"
(use-package blog-admin
:defer t
:commands blog-admin-start
:init
;; Keybinding
(spacemacs/set-leader-keys "ab" 'blog-admin-start)
:config
(progn
;; Open post after create new post
(add-hook 'blog-admin-backend-after-new-post-hook 'find-file)
;; Hexo
(setq blog-admin-backend-path "~/blog")
(setq blog-admin-backend-type 'hexo)
;; create new post in drafts by default
(setq blog-admin-backend-new-post-in-drafts t)
;; create same-name directory with new post
(setq blog-admin-backend-new-post-with-same-name-dir t)
;; default assumes _config.yml
(setq blog-admin-backend-hexo-config-file "_config.yml"))
)
)
我是作者,放假回来没怎么逛论坛 谢谢你专业的 issue
嗯。幸苦了。其实我是在这里看到有安利blog-admin去用的