emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* tangle option to not write a file with same contents?
@ 2021-10-28  4:04 Greg Minshall
  2021-10-29 16:21 ` Max Nikulin
  2022-05-07  8:05 ` Max Nikulin
  0 siblings, 2 replies; 14+ messages in thread
From: Greg Minshall @ 2021-10-28  4:04 UTC (permalink / raw)
  To: Org Mode

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-09-12 17:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  4:04 tangle option to not write a file with same contents? Greg Minshall
2021-10-29 16:21 ` Max Nikulin
2021-10-29 17:58   ` Greg Minshall
2021-10-30 15:13     ` Max Nikulin
2021-10-30 16:13       ` Greg Minshall
2022-05-07  8:05 ` Max Nikulin
2022-05-08  4:42   ` [PATCH] " Ihor Radchenko
2022-05-17 15:39     ` Max Nikulin
2022-05-30  3:14       ` Ihor Radchenko
2022-05-31 16:07         ` Max Nikulin
2022-06-03  7:04           ` Ihor Radchenko
2022-06-07  3:47             ` Tom Gillespie
2022-06-01 13:18     ` Greg Minshall
2022-09-12 17:36       ` Org version mismatch -- hooray! Greg Minshall

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).