Changed how the emacs command generation works