emacs: many improvements