update to handle terminal and cocoa emacs profiles