ActiveState Powered by ActiveState

ActiveState Community


How to ignore changes in a buffer

Posted by ericp on 2008-04-07 14:37
OS: All / Any

If you've used Emacs, you've probably used the [ESC-~] command
(bound to the not-modified command), which leaves your edits
in the buffer, but doesn't require you to save the buffer.
This can be useful if you're exploring a file, want to make some
edits, don't want to save the edits, and don't want to be prompted
to save the buffer when it's time to close it. You can also lose
a lot of work if you invoke this accidentally, but I'm assuming
that if you've been looking for this functionality, it's a small
risk for the benefit it brings.

This is a quick macro in Komodo:

var v = ko.views.manager.currentView;
v.scimoz.emptyUndoBuffer();
v.document.isDirty = false;
var v = ko.views.manager.currentView;
v.scimoz.emptyUndoBuffer();
v.document.isDirty = false;

and you can use the Key Binding tab in the Macro properties window
to bind it to [Escape + ~].

-->