From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: emacs initialization files in org mode Date: Sun, 06 Jan 2013 18:41:17 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TruDu-000095-Ag for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 12:41:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TruDr-0006kc-Dl for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 12:41:26 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:13093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TruDr-0006kG-6n for emacs-orgmode@gnu.org; Sun, 06 Jan 2013 12:41:23 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello, After having read about the emacs-starter-kit on the list, I really like the idea of having my initialization files in org-mode. As I have many customizations already made, I don't want to dump everything to use esk. What I want is doing the same with my own keybindings and customizations. So I went and had a look at the code, and it seems it's fairly trivial to do. If I have missed something, please don't hesitate to let me know. The bare minimum one can do is: - rename the current init.el into myinit.org - add the lines "#+begin_src emacs-lisp" as the first line, and "+end_src" as the last line - adapt the init.el from emacs-starter-kit as follows #+BEGIN_SRC emacs-lisp (add-hook 'after-init-hook `(lambda () ;; remember this directory (setq emacsd-dir ,(file-name-directory (or load-file-name (buffer-file-name)))) ;; load up the starter kit (require 'org) (org-babel-load-file (expand-file-name "myinit.org" emacsd-dir)))) #+END_SRC Then one can start editing the myinit.org so that it is not just a big chunk of code. Alan