From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Hoefling Subject: Re: Not overwriting unchanged source code files when tangling Date: Sat, 19 Nov 2011 01:51:12 +0100 Message-ID: References: <5701.1321644756@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307f3240a8cd4d04b20bd9a3 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRZ9G-0000d3-Vt for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 19:51:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRZ9F-0002bk-OE for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 19:51:14 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:40670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRZ9F-0002be-IK for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 19:51:13 -0500 Received: by vbbfq11 with SMTP id fq11so862740vbb.0 for ; Fri, 18 Nov 2011 16:51:13 -0800 (PST) In-Reply-To: <5701.1321644756@alphaville.americas.hpqcorp.net> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org, Carsten Dominik --20cf307f3240a8cd4d04b20bd9a3 Content-Type: text/plain; charset=ISO-8859-1 Hi Nick, I think you misunderstood me there - I am actually not worried about how computationally intensive the tangling process is. This always works very quickly, so even if they have to be copied around and take a bit longer, I would not mind. Thanks Holger On Fri, Nov 18, 2011 at 8:32 PM, Nick Dokos wrote: > Holger Hoefling wrote: > > > Hi Carsten, > > > > thanks for the suggestion, but as I agree with Brian. If there is more > > than one source file in the org-file, then the whole project would > > still be recompiled, not just the updated file. > > > > To be more exact, I actually don't want to compile things, but run R > > scripts using make. So the waiting time if a computationally intensive > > step is repeated although it is not necessary can be substantial. > > > > I wonder how difficult the following change would be (no emacs lisp > experience, also do not know the org source code): > > > > - would it be possible to write out the source files when tangling > > - into a temporary directory, then compare to the actual target files > > - and overwrite only if something has changed? Then the time stamps > > - would stay fixed. Hopefully, this would not involve too much work: > > You've lost right there unless there is a method to select *which* source > blocks to tangle. IOW, the problem is not the *comparison* of the temp and > actual > target files, it is the *production* of the temp files themselves: that's > the computationally expensive step and this method does nothing to > alleviate > that. Unless I'm missing something. > > Nick > > > - creating temporary files and remembering the mapping to true files > > > - tangling out as usual into temporary files (so probably little > > - change there) > > > - compare temporary file to true file (does emacs already have a diff > > - utility that could be used?) > > > - overwrite true file if any changes > > > - delete temporary files > > --20cf307f3240a8cd4d04b20bd9a3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Nick,

I think you misunderstood me there - I am actually not worr= ied about how computationally intensive the tangling process is. This alway= s works very quickly, so even if they have to be copied around and take a b= it longer, I would not mind.

Thanks

Holger

On Fri, Nov 18, = 2011 at 8:32 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
Holger Hoefling <hhoeflin@gmail.com> wrote:

> Hi Carsten,
>
> thanks for the suggestion, but as I agree with Brian. If there is more=
> than one source file in the org-file, then the whole project would
> still be recompiled, not just the updated file.
>
> To be more exact, I actually don't want to compile things, but run= R
> scripts using make. So the waiting time if a computationally intensive=
> step is repeated although it is not necessary can be substantial.
>
> I wonder how difficult the following change would be (no emacs lisp ex= perience, also do not know the org source code):
>
> - would it be possible to write out the source files when tangling
> - into a temporary directory, then compare to the actual target files<= br> > - and overwrite only if something has changed? Then the time stamps > - would stay fixed. Hopefully, this would not involve too much work:
You've lost right there unless there is a method to select *which= * source
blocks to tangle. IOW, the problem is not the *comparison* of the temp and = actual
target files, it is the *production* of the temp files themselves: that'= ;s
the computationally expensive step and this method does nothing to alleviat= e
that. Unless I'm missing something.

Nick

> - creating temporary files and remembering the mapping to true files
> - tangling out as usual into temporary files (so probably little
> - change there)

> - compare temporary file to true file (does emacs already have a diff<= br> > - utility that could be used?)

> - overwrite true file if any changes

> - delete temporary files


--20cf307f3240a8cd4d04b20bd9a3--