fixes some scripts; add emacs to common packages