The undo in Emacs is great, it's impossible to lose anything because you can undo your undos. I wouldn't start off doing serious work with it, though. Switch gradually and you can avoid these situations by looking stuff up in the moment. Pick a side project to start out with, not your main gig. And if you're a VI user, go with Spacemacs or at least use Evil.