From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Writing .el files for org in org? Date: Mon, 2 Jun 2014 07:22:49 -0400 Message-ID: References: <87lhturac1.fsf@gmail.com> <87sio29op5.fsf@bzg.ath.cx> <87vbsy88lk.fsf@bzg.ath.cx> <8738g2krbk.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15a3958c883e04fad89d8e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrQKK-0001Py-RO for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 07:22:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrQKJ-0000Vq-EV for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 07:22:52 -0400 In-Reply-To: <8738g2krbk.fsf@bzg.ath.cx> 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: Bastien Cc: Aaron Ecay , "emacs-orgmode@gnu.org" --047d7b15a3958c883e04fad89d8e Content-Type: text/plain; charset=UTF-8 What if we created a new directory in the repository called "org" which contains these kinds of files? It would be analogous to the "lisp" directory. I don't think we need to have both ob-R.org and ob-R.el in the repository. For example I wrote org-ref.org, and I load it like this in my init file (the intention here is to only tangle the org file when it is newer than the el file or if there is no el file. for some reason my memory says that org-babel-load-file was not doing this but that may be a faulty memory). (if (or (not (file-exists-p "org-ref.el")) (< (float-time (nth 5 (file-attributes "org-ref.el"))) (float-time (nth 5 (file-attributes "org-ref.org"))))) (progn (org-babel-tangle-file (expand-file-name "org-ref.org" starter-kit-dir)) (load-file (expand-file-name "org-ref.el" starter-kit-dir))) (require 'org-ref)) I could see there being something like the lisp path for finding these files, so that we could just do: (org-require 'org-ref) or the org-babel-load-file could be adapted to have a path to search for files. This way there is no auto-tangling, committing, etc... just regular version control on the source of the source. John ----------------------------------- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Thu, May 22, 2014 at 7:04 AM, Bastien wrote: > Rainer M Krug writes: > > > So the reason why I think it would be advantageous to have these files > > in org does not lie with the programmer familiar with emacs-lisp, but > > with somebody familiar with the other side. > > Sorry I was too terse in my previous answer: I completely agree with > the goal you describe, but I don't think adding an .org source along > the .el output (say e.g. ob-R.org and ob-R.el) will simplify my life > as a maintainer: each time an ob-*.org file is changed we need to > tangle it again... and this leads to auto-tangling, auto-committing > considerations that I don't even want to start thinking about. > > -- > Bastien > > --047d7b15a3958c883e04fad89d8e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
What if we created a new directory in the repository = called "org" which contains these kinds of files?=C2=A0 It would = be analogous to the "lisp" directory. I don't think we need t= o have both ob-R.org and ob-R.el in the repository.

For example I wrote org-ref.org, and I load it like this in my init file (the intention here is to only t= angle the org file when it is newer than the el file or if there is no el f= ile. for some reason my memory says that org-babel-load-file was not doing = this but that may be a faulty memory).





On Thu, May 22, 2014 at 7:04 AM, Bastien= <bzg= @gnu.org> wrote:
Rainer M Krug <Rainer= @krugs.de> writes:

> So the reason why I think it would be advantageo= us to have these files
> in org does not lie with the programmer familiar with emacs-lisp, but<= br> > with somebody familiar with the other side.

Sorry I was too terse in my previous answer: I completely agree with<= br> the goal you describe, but I don't think adding an .org source along the .el output (say e.g. ob-R.org and ob-R.el) will simplify my life
as a maintainer: each time an ob-*.org file is changed we need to
tangle it again... and this leads to auto-tangling, auto-committing
considerations that I don't even want to start thinking about.

--
=C2=A0Bastien


--047d7b15a3958c883e04fad89d8e--