From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brady Trainor Subject: sharing my firsts, org babel tangle and "init" .org file Date: Thu, 17 Apr 2014 16:43:45 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WavyQ-0004C5-GE for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 19:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WavyK-0000Cc-NZ for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 19:44:06 -0400 Received: from plane.gmane.org ([80.91.229.3]:45561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WavyK-0000CV-Gh for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 19:44:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WavyJ-0007Hy-4V for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 01:43:59 +0200 Received: from 24.16.211.63 ([24.16.211.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 01:43:59 +0200 Received: from algebrat by 24.16.211.63 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 01:43:59 +0200 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@gnu.org Have you migrated your init files into .org file(s)? What's your setup? Below is my first setup for fellow newbs, or for the interested developer. And please let me know if I'm missing some logic or conventions/practices. In the short history of my Emacs init file evolution (~ oct '13), I had considered packages like dot-emacs.org, but for some reason had not succeeded (I thought it had demanded Emacs 24.3.50+, but I don't see that in the description now). So when I recently felt motivated to try such a .org Literation of my init files (my project of making agenda custom commands and capture templates was starting to topple), I tried let's say a more basic approach. I worked mostly from the tutorial in Babel: Introduction / Emacs Initialization with Babel http://orgmode.org/worg/org-contrib/babel/intro.html#emacs-initialization It took just a little wrestling with a clean tty2 Emacs, but here is my interpretation of a "minimal" setup for initializing via org babel tangling: ____________ / ;;;; make sure org has been installed in an "emacs -q" (require 'package) (package-initialize) (require 'org) ;; declare org indentation before we might manually open org to tangle (setq org-startup-indented t) (setq org-hide-block-startup t) ;; declare source indentation before we might manually open org to tangle (setq org-src-fontify-natively t) (setq org-edit-src-content-indentation 0) ;; default I/O in windows is undecided-dos/unix for de/encoding respectively (prefer-coding-system 'utf-8-unix) ;; load org initialization files (require 'ob-tangle) (org-babel-load-file "/e/emacs-config/dot-emacs-test.org") \____________ Some of those aren't necessary but for aesthetics before manually stepping through lines for testing the initialization (starting emacs -q tangling and/or executing one-by-one). The character encoding is there as I have some utf-8 Fahrenheit symbols in my (.org) init file. Initially (while troubleshooting) I had some dired customizations (vertical omit, horizontal hide), font family and color-theming in this code block, as I have a hard time looking at plain Emacs for too long. You may also want to toggle some tangles in your (first ever) init file, this can be done per file, subtree or source block, via #+PROPERTY: header-args :tangle yes or :PROPERTIES: :header-args: :tangle no :END: or #+BEGIN_SRC emacs-lisp :tangle no And the latter take precendence. TWIMC, HTH Brady