Re: [O] Not overwriting unchanged source code files when tangling

2011-11-22 Thread Nick Dokos
Allen S. Rout wrote: > On 11/19/2011 01:32 PM, Holger Hoefling wrote: > > Hi everyone, > > > > I wanted to thank everyone for their helpful suggestions and wanted to > > share the best solutions I heard of and found. > > > > One solution is to include a rule in the makefile for every sourcecode >

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-22 Thread Allen S. Rout
On 11/19/2011 01:32 PM, Holger Hoefling wrote: Hi everyone, I wanted to thank everyone for their helpful suggestions and wanted to share the best solutions I heard of and found. One solution is to include a rule in the makefile for every sourcecode file that that copies it and only updates the

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-19 Thread Holger Hoefling
Hi everyone, I wanted to thank everyone for their helpful suggestions and wanted to share the best solutions I heard of and found. One solution is to include a rule in the makefile for every sourcecode file that that copies it and only updates the copy if something has changed (see Nick's email b

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-19 Thread cberry
Holger Hoefling writes: > 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

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-19 Thread Rustom Mody
Sorry for the earlier mail: Send got pressed on a half-cooked mail :-) Heres a cleanup. -- Build-tools like scons rethink make's "older timestamp => rebuild" model. You may want to look at one such. >From http://www.scons.o

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-19 Thread Rustom Mody
Such tools are for example scons is a make alternative that rethinks make's "older timestamp => rebuild" >From www.scons.org/architecture/index.html *(S)Cons decides if a file was out-of-date by using MD5 checksums of the > contents of files, not timestamps. * > SCons also comes to mind because

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Holger Hoefling
Hey Nick, thank you very much. That sounds like a very good solution to my problem that does not require changes to org-mode. Best Holger On Sat, Nov 19, 2011 at 5:00 AM, Nick Dokos wrote: > Holger Hoefling wrote: > > > I think you misunderstood me there - I am actually not worried about how

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Nick Dokos
Holger Hoefling wrote: > 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. > Ah, ok - so you are talk

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Holger Hoefling
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, N

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Holger Hoefling
Hi Eric, sounds like the problem may after all not be that simple.Could the code blocks be written incrementally to the buffer (or a temporary file on disk) and only after everything has been tangled out all temporary buffers or files checked against the ones on disk? Unfortunately, I do not thin

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Eric Schulte
Achim Gratz writes: > Eric Schulte writes: >> I think the best approach in this case would be to tangle each file out >> to a temporary buffer, and then just before exiting the tangle function >> the content of these temporary buffers could be checked against the >> files on disk, and only those

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Nick Dokos
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, b

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Achim Gratz
Eric Schulte writes: > I think the best approach in this case would be to tangle each file out > to a temporary buffer, and then just before exiting the tangle function > the content of these temporary buffers could be checked against the > files on disk, and only those buffers which differ from d

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Achim Gratz
Holger Hoefling writes: > I have a problem/request for org-mode and was looking for help. I am > using org-mode to write source code files and tangle them out. I want > to compile them using make. My problem now is that org-mode overwrites > the old files every time I tangle them out, therefore al

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Eric Schulte
Brian Wightman writes: > On Fri, Nov 18, 2011 at 11:02 AM, Carsten Dominik > wrote: >> How about changing the make file so that the dependence is on the Org file, >> not on the source file? >> You could then arrange for make to call emacs in batch-mode to tangle the >> source file and then com

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Holger Hoefling
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 wai

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Brian Wightman
On Fri, Nov 18, 2011 at 11:02 AM, Carsten Dominik wrote: > How about changing the make file so that the dependence is on the Org file, > not on the source file? > You could then arrange for make to call emacs in batch-mode to tangle the > source file and then compile it? The original question w

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Carsten Dominik
On 18.11.2011, at 14:17, Holger Hoefling wrote: > Hi, > > I have a problem/request for org-mode and was looking for help. I am using > org-mode to write source code files and tangle them out. I want to compile > them using make. My problem now is that org-mode overwrites the old files > every

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Brian Wightman
On Fri, Nov 18, 2011 at 10:46 AM, Tom Prince wrote: > On Fri, 18 Nov 2011 08:23:18 -0600, Brian Wightman > wrote: >> Perhaps a way to deal with this would be to tangle to a different >> directory, and then sync any changes into your compilation source >> directory.  If you would update the compi

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Tom Prince
On Fri, 18 Nov 2011 08:23:18 -0600, Brian Wightman wrote: > Perhaps a way to deal with this would be to tangle to a different > directory, and then sync any changes into your compilation source > directory. If you would update the compilation directory only when > something differs from the tang

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Sebastien Vauban
Hi Holger, Holger Hoefling wrote: > I have a problem/request for org-mode and was looking for help. I am using > org-mode to write source code files and tangle them out. I want to compile > them using make. My problem now is that org-mode overwrites the old files > every time I tangle them out, th

Re: [O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Brian Wightman
On Fri, Nov 18, 2011 at 7:17 AM, Holger Hoefling wrote: > I have a problem/request for org-mode and was looking for help. I am using > org-mode to write source code files and tangle them out. I want to compile > them using make. My problem now is that org-mode overwrites the old files > every time

[O] Not overwriting unchanged source code files when tangling

2011-11-18 Thread Holger Hoefling
Hi, I have a problem/request for org-mode and was looking for help. I am using org-mode to write source code files and tangle them out. I want to compile them using make. My problem now is that org-mode overwrites the old files every time I tangle them out, therefore also updating the time stamp -