From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Bell Subject: Re: Re: Preventing (or mitigating) accidental deletion in org-mode Date: Sun, 23 Aug 2009 13:27:56 +0100 Message-ID: <4A9135CC.1050709@nickbell.org> References: <4A9120DB.6030003@nickbell.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfCB0-0007sl-Pr for emacs-orgmode@gnu.org; Sun, 23 Aug 2009 08:28:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfCAy-0007pU-UF for emacs-orgmode@gnu.org; Sun, 23 Aug 2009 08:28:02 -0400 Received: from [199.232.76.173] (port=34392 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfCAy-0007pG-Nn for emacs-orgmode@gnu.org; Sun, 23 Aug 2009 08:28:00 -0400 Received: from v-smtp-auth-relay-2.gradwell.net ([79.135.125.41]:45863) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfCAy-0002ke-6R for emacs-orgmode@gnu.org; Sun, 23 Aug 2009 08:28:00 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: PT Cc: emacs-orgmode@gnu.org PT wrote: > Nick Bell nickbell.org> writes: >> Org-mode is great and I'd like to commit to it. However, I'm held back >> by the apparent fragility of data stored in org-files. For example, >> it's easy to delete entire folded trees of data with just a couple of >> keystrokes or a mouse click. > This shouldn't be a big problem, because you have automatic > backup of your org and other files, right? Yes, I have, but I'd like something a bit better. 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? I suppose one could do this with some kind of before-change- type function if feeling particularly paranoid. -- Nick Bell