Dear, I am using EMACS 21.3.1 in redhat machine. In older version, 20.3.8.1, I could execute my keymacro in batch mode by call my function as following. emacs -batch test.txt -l mykeymacro.el -f myfunction -f save-buffer But, In new version , It doesn't support this. Emacs wait with the prompt , "M-x" when I run this. Thx in advance -- Jinhyuk Lee