From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Where does org-mode elisp hacking go? Date: Wed, 13 Mar 2013 22:38:47 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFuKD-00078X-IO for emacs-orgmode@gnu.org; Wed, 13 Mar 2013 18:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFuKB-0004Cz-CL for emacs-orgmode@gnu.org; Wed, 13 Mar 2013 18:39:09 -0400 Received: from plane.gmane.org ([80.91.229.3]:50094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFuKB-0004Cq-5B for emacs-orgmode@gnu.org; Wed, 13 Mar 2013 18:39:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UFuKU-0002lt-KM for emacs-orgmode@gnu.org; Wed, 13 Mar 2013 23:39:26 +0100 Received: from 137.110.34.176 ([137.110.34.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Mar 2013 23:39:26 +0100 Received: from ccberry by 137.110.34.176 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Mar 2013 23:39:26 +0100 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 Lawrence Bottorff gmail.com> writes: > > > I see on the org-hacks.html page lots of interesting elisp code. > If I wanted to use some of this (lots of this) it seems wrong to shove it > all in my .emacs file. My first guess would be to put what I want into > separate .el files, go to my .org file and do a load-file on the .el file > of hacks. But I really loath doing something that's not "best practice." > What's the best practice for enabling org-mode elisp hacks? And what if > I want to use just one hack for one project? With usual elisp-ing you can > simply evaluate region. Is that possible in conjunction with a .org file?  Yes. But you might like to look at http://orgmode.org/worg/org-contrib/babel/intro.html#sec-8-2-1 which discusses "Emacs Initialization with Babel" for a comprehensive approach. For a single project, you can but a src_block in the master that loads whatever is needed or use a file local variables block to load up the requisites. See: Specifying File Variables in the emacs manual.