emacs - 使用 org-babel : Debugger entered--Lisp error: (void-function cl-member) 初始化 emacs

标签 emacs org-mode org-babel

我已经将我的 init.el 迁移到一个 org-mode 文件,以利用 org-mode 的灵 active 和 babel。

但是,我无法让它工作。我怀疑存在一些依赖性错误,已经尝试了很多方法来修复它,但我没有能力了解哪里出了问题:

  1. 这里我的 init.el --- 除了调用包含所有初始化代码的 org 文件之外什么都不做

    ;; from http://orgmode.org/worg/org-contrib/babel/intro.html#literate-programming
    ;;; init.el --- Where all the magic begins
    ;;
    ;; This file loads Org-mode and then loads the rest of our Emacs initialization from Emacs lisp
    ;; embedded in literate Org-mode files.
    
    ;; Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode files
    (package-initialize)
    (setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
    (require 'org-install)
    (require 'ob-tangle)
    (org-babel-load-file (expand-file-name "emacs-and-org-init.org" dotfiles-dir))
    
  2. 这是 org 文件 --- 即使是最小的它也会抛出错误

    #+TITLE: Emacs and Org init
    #+OPTIONS: toc:2 num:nil ^:nil
    
    #+begin_quote
      Emacs outshines all other editing software in approximately the same
      way that the noonday sun does the stars. It is not just bigger and
      brighter; it simply makes everything else vanish.
    
      -- Neal Stephenson, "In the Beginning was the Command Line"
    #+end_quote
    
    * Implementation
    This section contains all the init code.
    ** basics
    this is commented on purpose --- even commented, the use of this file throw the error "Debugger entered--Lisp error: (void-function cl-member)"
      #+begin_src emacs-lisp
    ;;    (add-to-list 'load-path "~/.emacs.d/elpa/") ;;;; this is commented on purpose --- even commented, the use of this file throw the error "Debugger entered--Lisp error: (void-function cl-member)"
      #+end_src
    
    ** the rest of the code
    - this sections is almost empty for the moment, so that this file is the minimal file that throw an error
    
    #+BEGIN_SRC emacs-lisp
    ;; this should appear in the emacs-and-org.el, but does not
    (message "test")
    #+END_SRC
    
  3. 这里是生成的 emacs-and-org.el --- 第一个“org babel 代码部分”在这里,但第二个丢失了

    ;;    (add-to-list 'load-path "~/.emacs.d/elpa/") ;;;; this is commented on purpose -- even commented, the use of this file throw the error "Debugger entered--Lisp error: (void-function cl-member)"
    
  4. 抛出的错误:

    Debugger entered--Lisp error: (void-function cl-member)
    

谁能帮忙?

M-x version
GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-09-29 on gkar, modified by Debian

M-x org-version
Org-mode version 8.2.1 (8.2.1-3-g35e5e5-elpa @ /home/me/.emacs.d/elpa/org-20131007/)

最佳答案

这是最小的设置:

~/emacs-and-org-init.org:

#+begin_src emacs-lisp
(message "test")
#+end_src

~/.emacs:

(package-initialize)
(require 'ob-tangle)
(org-babel-load-file "~/emacs-and-org-init.org")

从这个设置开始,逐步添加东西,直到东西坏了 (希望它不会:))。

顺便说一句,如果出现这种情况,您可以通过(require 'cl) 获取cl-member

关于emacs - 使用 org-babel : Debugger entered--Lisp error: (void-function cl-member) 初始化 emacs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19336489/

相关文章:

emacs - 在 Emacs 中,如何使用键盘选择完成列表?

c++ - 使用 emacs 对 C++ 代码中的注释进行拼写检查

python - 对 Vimscript 递归错误的解决方案感到困惑

latex - 来自 src block 的多行 latex 标题

R没有在Org Babel中输出图表

vim - 如何在emacs中使用vim的语法文件给文本着色

emacs - 显示组织模式大纲直至特定标题级别

emacs - 组织模式:抽屉的可见导出

emacs - emacs 中的组织模式文档

Emacs:CUA 模式。在迷你缓冲区中粘贴(猛拉)不起作用