[Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
On 2009-08-23 11:58 +0100, Nick Bell wrote: 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 should not be a problem as long as you know how the undo in Emacs works. You can even use browse-kill-ring¹ to see what you have deleted in Emacs. Footnotes: ¹ http://www.emacswiki.org/emacs/BrowseKillRing -- Emacs uptime: 5 days, 21 hours, 45 minutes, 22 seconds ___ 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
[Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
Nick Bell mail at nickbell.org writes: Dear List, 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? Combining this with the builtin undo and setting up Emacs' own backup properly (http://www.emacswiki.org/emacs/ForceBackups) makes any recent or older version of your org files easily retrievable, so no information can be lost. ___ 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
Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
PT wrote: Nick Bell mail at 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 ___ 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
Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
2009/8/23 Leo sdl@gmail.com: On 2009-08-23 11:58 +0100, Nick Bell wrote: 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 should not be a problem as long as you know how the undo in Emacs works. You can even use browse-kill-ring¹ to see what you have deleted in Emacs. ...Provided you know that you killed something you didn't intend to. However, it's easy to kill a tree without noticing it had content. Maybe we could augment org-kill-line with some optional facility that checks that it doesn't encompass a collapsed section -- or less intrusively, emits a message saying it's killed a collapsed section. I'm having a hard time seeing how to code it though. ___ 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
[Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
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. -- Emacs uptime: 5 days, 22 hours, 23 minutes, 6 seconds ___ 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
Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode
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