I have migrated my init.el to an org-mode file, to use the flexibility of org-mode coupled with babel.
However, I cannot get it to work. I suspect some dependency error, have tried a lot of things to fix it, but I don't have the skills to understand where things go wrong :
here my init.el --- does nothing but calling an org file containing all the init code
;; 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))
this is the org file --- even minimal it throws the error
#+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
and here the resulting emacs-and-org.el --- the first "org babel code section" is here, but the second is missing
;; (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)"
the error thrown :
Debugger entered--Lisp error: (void-function cl-member)
Who could help ?
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/)
Here's the minimal setup:
~/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")
Start from this setup and add things incrementally until stuff breaks (hopefully it will not:)).
By the way, you can get cl-member by (require 'cl), if this comes up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With