From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brady Trainor Newsgroups: gmane.emacs.help Subject: Re: porting crufty old init.el to package management Date: Thu, 17 Apr 2014 23:57:37 -0700 Message-ID: References: <861txr29h7.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1397804447 18374 80.91.229.3 (18 Apr 2014 07:00:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Apr 2014 07:00:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 18 09:00:41 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wb2mu-0003Ki-Na for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Apr 2014 09:00:40 +0200 Original-Received: from localhost ([::1]:36625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb2mu-00015A-E7 for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Apr 2014 03:00:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb2mU-00011X-0A for help-gnu-emacs@gnu.org; Fri, 18 Apr 2014 03:00:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wb2mO-0005o6-Fk for help-gnu-emacs@gnu.org; Fri, 18 Apr 2014 03:00:13 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb2mO-0005ng-9y for help-gnu-emacs@gnu.org; Fri, 18 Apr 2014 03:00:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wb2mK-0002NX-Po for help-gnu-emacs@gnu.org; Fri, 18 Apr 2014 09:00:04 +0200 Original-Received: from 71-217-24-179.tukw.qwest.net ([71.217.24.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 09:00:04 +0200 Original-Received: from algebrat by 71-217-24-179.tukw.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 09:00:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 71-217-24-179.tukw.qwest.net User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <861txr29h7.fsf@somewhere.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97184 Archived-At: On 03/24/2014 03:10 AM, Fabrice Niessen wrote: > That big file (in my case) can be: > > - Tangled :: > Extract the source code blocks and generate *real working code* > files for further compilation or execution, eventually outside of > Emacs. > > Best regards, > Fabrice I wrote about this in the org-mode newsgroup, my first tangle, at http://lists.gnu.org/archive/html/emacs-orgmode/2014-04/msg00698.html It comes down to the following block for me. This init file is loaded first, and in turn extracts and loads the embedded code from the .org file (tangle). ____________ / ;;;; 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") \____________ Brady