[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tangle option to not write a file with same contents?
From: |
Greg Minshall |
Subject: |
tangle option to not write a file with same contents? |
Date: |
Thu, 28 Oct 2021 07:04:58 +0300 |
hi.
i wonder if it would be reasonable to add an option such that, when
tangling, `org-babel-tangle` would not write a file with the
already-existing contents of the target file?
this would be helpful, e.g., for those of us who use make(1)-based work
flows.
then, if this might generally be thought useful, i wonder if this should
be implemented as specifically this, or whether we might implement a
callback at the appropriate point in `org-babel-tangle` asking whether
or not to proceed. (then, the user's callback routine could do the
comparison.)
if we do "specifically this", i would suggest that this comparison be
dead simple: read in the existing file's contents into some hidden
buffer, and use `compare-buffer-substrings` to compare point-{min,max}
of both.
cheers, Greg
- tangle option to not write a file with same contents?,
Greg Minshall <=