[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't execute the keymacro in batch mode

From: Kevin Rodgers
Subject: Re: Can't execute the keymacro in batch mode
Date: Wed, 03 May 2006 09:32:14 -0600
User-agent: Thunderbird (Windows/20060308)

Lee, Jinhyuk wrote:
I am using EMACS 21.3.1 in redhat machine.

In older version,, 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.

Are you sure you're not using Emacs 22, from CVS?  The etc/NEWS file says:

* Startup Changes in Emacs 22.1
** The -f option, used from the command line to call a function,
now reads arguments for the function interactively if it is
an interactively callable function.

But that feature seems to interact badly with -batch.  Here's what I
put in in mykeymacro.el:

(fset 'myfunction (kbd "C-x C-f foo.bar RET"))

Invoking Emacs as you did causes it to hang with the "Find file: " prompt; and if I redirect standard input from /dev/null it reports
"After 0 kbd macro iterations: Error reading from stdin"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]