From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: Can't execute the keymacro in batch mode Date: Wed, 03 May 2006 09:32:14 -0600 Organization: IHS Message-ID: References: <001e01c66e1e$7abf9d10$0201a8c0@uni> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146670505 24971 80.91.229.2 (3 May 2006 15:35:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 15:35:05 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 03 17:35:04 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbJMj-0007S6-TY for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 May 2006 17:34:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbJMj-0002Tg-DX for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 May 2006 11:34:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbJMN-0002Aa-SU for bug-gnu-emacs@gnu.org; Wed, 03 May 2006 11:33:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbJMM-00029N-1X for bug-gnu-emacs@gnu.org; Wed, 03 May 2006 11:33:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbJML-00029F-Qy for bug-gnu-emacs@gnu.org; Wed, 03 May 2006 11:33:49 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbJMk-0001FJ-Vf for bug-gnu-emacs@gnu.org; Wed, 03 May 2006 11:34:15 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FbJLk-0007Cp-Ik for bug-gnu-emacs@gnu.org; Wed, 03 May 2006 17:33:13 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 May 2006 17:33:12 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 May 2006 17:33:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) In-Reply-To: <001e01c66e1e$7abf9d10$0201a8c0@uni> X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15070 Archived-At: Lee, Jinhyuk wrote: > 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. 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" -- Kevin