[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-

From: Nick Bell
Subject: Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
Date: Sun, 23 Aug 2009 13:59:22 +0100
User-agent: Thunderbird (Macintosh/20090812)

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

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 Bell

reply via email to

[Prev in Thread] Current Thread [Next in Thread]