Leo wrote:
On 2009-08-23 13:27 +0100, Nick Bell wrote:
I'm trying to write a little function using before-save-hook to
compare the current buffer to the saved version and output the result
of diffstat, asking the user whether they want to go ahead with the
save or view the full diff. Or has someone done something like this
before?

See diff-buffer-with-file.

Yes, that was the idea. I was going to hook a function into before-save-hook which does pipe diff -u $1 $2 | diffstat and show the result in some kind of minibuffer. Not sure how to set $1 and $2 (in fact, I've never written any elisp at all). I don't suppose anyone could whip up the code in a moment or two? ;-)

Nick

--
Nick Bell


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to