From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wenbinye@gmail.com Newsgroups: gmane.emacs.help Subject: Re: `call-interactively' only the first time Date: 17 Aug 2006 05:02:06 -0700 Organization: http://groups.google.com Message-ID: <1155816126.051555.197190@b28g2000cwb.googlegroups.com> References: <1155649715.990116.250240@m79g2000cwm.googlegroups.com> <1155694417.964904.152030@i3g2000cwc.googlegroups.com> <1155722311.471292.113200@i42g2000cwa.googlegroups.com> <1155741608.389713.3210@74g2000cwt.googlegroups.com> <1155805523.835502.309550@i42g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1155818460 13242 80.91.229.2 (17 Aug 2006 12:41:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2006 12:41:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 17 14:40:59 2006 Return-path: Envelope-to: geh-help-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 1GDhAq-0006rm-7X for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Aug 2006 14:40:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDhAp-0000f3-MB for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Aug 2006 08:40:35 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 218.17.227.208 Original-X-Trace: posting.google.com 1155816131 6436 127.0.0.1 (17 Aug 2006 12:02:11 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 17 Aug 2006 12:02:11 +0000 (UTC) In-Reply-To: <1155805523.835502.309550@i42g2000cwa.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Opera/9.01 (X11; Linux i686; U; zh-cn),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: b28g2000cwb.googlegroups.com; posting-host=218.17.227.208; posting-account=3wOHJA0AAAAYp1ktKqTr4LI0QMFE1g-B Original-Xref: shelby.stanford.edu gnu.emacs.help:141098 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36723 Archived-At: You didn't provide the real code, I assume you may make mistake when use the function in parameter, which is named g in you pseudo code. You should use funcall function. Another question is how do you restore the argument when called interactively first time? (defun foo (arg) (interactive "sGive me a string: ") (message "foo: %S" arg)) (defun bar (func) (message "first call: ") (call-interactively func) (message "call again: ") (funcall func "efg")) ;; use like this: (bar 'foo) augukarl@yahoo.se wrote: > wenbinye@gmail.com skrev: > > Can you give the definition of the function? > > Here is the pseudo code for the function I want to define: > > (defun f (g) ;; g is an interactive function. > ;; Call g interactively. > ;; Call g non-interactively with the parameters (specified by > ;; the user) in the command above. > ) > > Is this clear enough? > > > Thanks, > > August