2017-08-11 65 views
1

對不起,如果這是一個愚蠢的問題;當涉及到emacs時,我是一個完全新手。Emacs:作爲變量的Symbol值是void:刪除(init.el)

最近,我開始研究如何設置emacs,並偶然發現了Mike Zamansky的一個很棒的視頻系列。但是,在遵循this video(創建組織初始化文件)的同時,我安裝到我的emacsclient的所有軟件包都無法正常工作。在初始化期間,出現錯誤 - 即「作爲變量的Symbol值爲void:Removes。」我逐字複製了他的教程,我沒有看到任何潛在的語法錯誤 - 也許我忽略了一些錯誤。但是,我一直在搜索整個互聯網,但無法找到任何答案這個問題。

這裏是init.el文件的內容:

(require 'package) 
(setq package-enable-at-startup nil) 
(add-to-list 'package-archives 
    '("melpa" . "http://melpa.org/packages/")) 

(package-initialize) 

;; Bootstrap 'use-package' 
(unless (package-installed-p 'use-package) 
    (package-refresh-contents) 
    (package-install 'use-package)) 

(org-babel-load-file (expand-file-name "~/.emacs.d/myinit.org")) 

這裏是錯誤:

Warning (initialization): An error occurred while loading 
‘/Users/Kyojin/.emacs.d/init.el’: 

Symbol's value as variable is void: Removes 

To ensure normal operation, you should investigate and remove the 
cause of the error in your initialization file. Start Emacs with 
the ‘--debug-init’ option to view a complete error backtrace. 

調試器輸出(--debug-INIT):

Debugger entered--Lisp error: (void-variable Removes) 
    eval-buffer(#<buffer *load*-527594> nil 
"/Users/Kyojin/.emacs.d/myinit.el" nil t) ; Reading at buffer position 
8 
    load-with-code-conversion("/Users/Kyojin/.emacs.d/myinit.el" 
"/Users/Kyojin/.emacs.d/myinit.el" nil nil) 
    load("/Users/Kyojin/.emacs.d/myinit.el" nil nil t) 
    load-file("/Users/Kyojin/.emacs.d/myinit.el") 
    (progn (load-file exported-file) "Loaded") 
    (if compile (progn (byte-compile-file exported-file (quote load)) 
"Compiled and loaded") (progn (load-file exported-file) "Loaded")) 
    (message "%s %s" (if compile (progn (byte-compile-file exported-file 
(quote load)) "Compiled and loaded") (progn (load-file exported-file) 
"Loaded")) exported-file) 
    (let* ((age (function (lambda (file) (float-time (time-subtract 
(current-time) (nth 5 ...)))))) (base-name (file-name-sans-extension 
file)) (exported-file (concat base-name ".el"))) (if (and (file-exists- 
p exported-file) (> (funcall age file) (funcall age exported-file))) 
nil (setq exported-file (car (last (org-babel-tangle-file file 
exported-file "emacs-lisp"))))) (message "%s %s" (if compile (progn 
(byte-compile-file exported-file (quote load)) "Compiled and loaded") 
(progn (load-file exported-file) "Loaded")) exported-file)) 
    org-babel-load-file("/Users/Kyojin/.emacs.d/myinit.org") 
    eval-buffer(#<buffer *load*> nil "/Users/Kyojin/.emacs.d/init.el" 
nil t) ; Reading at buffer position 358 
    load-with-code-conversion("/Users/Kyojin/.emacs.d/init.el" 
"/Users/Kyojin/.emacs.d/init.el" t t) 
    load("/Users/Kyojin/.emacs.d/init" t t) 
#[0"\205\266\306=\203\307\310Q\202?\311=\204\307\312Q\202?\313\307 
\314\315#\203* \316\202?\313\307\314\317#\203>\320\321\322!D\nB\323 
\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325 
\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334! 
\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\ 
\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f\205\264\314\325 
\344\324\211#)\262\207"[init-file-user system-type 
delayed-warnings-list user-init-file inhibit-default-init inhibit- 
startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory- 
files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)? 
$" initialization format-message "`_emacs' init file is deprecated, 
please use `.emacs'" "~/_emacs" t load expand-file-name "init" file- 
name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans- 
extension ".el" file-exists-p file-newer-than-file-p message "Warning: 
%s is newer than %s" sit-for 1 "default"] 7]() 
    command-line() 
    normal-top-level() 

回答

0

在init文件中搜索Removes這個詞,"/Users/Kyojin/.emacs.d/myinit.el"(或者可能在它加載的某個文件中)。

如果您沒有立即找到它,然後遞歸地平分您的init文件以找到有問題的代碼。您可以通過註釋掉文件的前1/2,然後3/4,然後7/8,...直到找到問題。您可以通過選擇它並使用M-x comment-region來評論一段文字/代碼。您可以用相同的方式取消選擇註釋,但首先使用C-uC-u M-x comment-region

+0

哦,我的天啊...所以,我在每個包或配置中添加了描述,並且它使myinit.el將其作爲變量而不是註釋來讀取(忘記使用分號來註釋它)。你非常想要答案。 – Kyojin