alphapapa / outorg

Convert source-code buffers temporarily to Org-mode for comment editing
53 stars 7 forks source link

Warn when quitting emacs without writing changes in outorg buffer #5

Open langston-barrett opened 5 years ago

langston-barrett commented 5 years ago

If I'm editing a buffer with outorg, it might be the case that I've written the *outorg-edit-buffer* to disk (presumably in some temporary directory), but not saved the changes back to the original file. If I attempt to quit Emacs, I won't receive any warning (after all - all changes to buffers have been written to files).

In this situation, I likely want to save my changes back to the original file. Is there a way outorg could prevent Emacs from quitting and prompt the user to save, just like vanilla Emacs does when you have pending changes to a buffer?

alphapapa commented 5 years ago

This could definitely be done, and it would probably be a good idea. It probably wouldn't require too much work.

I doubt that I'll get around to the idea myself, at least not anytime soon. This package (these packages, really) is (are) mostly in maintenance mode other than the amazing work Thibault has done on Outshine recently. In the long term, they should probably be refactored and/or merged. But lacking that, this feature is probably worthwhile and simple enough to add in its current form.