From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gentsquash Newsgroups: gmane.emacs.help Subject: Re: Interactive-form invoked with specified arg Date: Tue, 4 Jun 2013 16:20:11 -0700 (PDT) Message-ID: <0e2b4b33-4752-41b2-b08c-4299cbe57440@20g2000yqe.googlegroups.com> References: <037e0390-7e59-4239-bf31-1c7e55b269db@v2g2000yqa.googlegroups.com> <87wqq94wz5.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1370389094 29867 80.91.229.3 (4 Jun 2013 23:38:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Jun 2013 23:38:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 05 01:38:14 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uk0nu-00043V-Hc for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jun 2013 01:38:14 +0200 Original-Received: from localhost ([::1]:32836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uk0nt-0004Ui-WA for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Jun 2013 19:38:14 -0400 X-Received: by 10.224.200.202 with SMTP id ex10mr17503230qab.8.1370388011142; Tue, 04 Jun 2013 16:20:11 -0700 (PDT) X-Received: by 10.49.24.243 with SMTP id x19mr827111qef.34.1370388011126; Tue, 04 Jun 2013 16:20:11 -0700 (PDT) Original-Path: usenet.stanford.edu!p1no1448689qaj.0!news-out.google.com!10ni239qax.0!nntp.google.com!ch1no877992qab.0!postnews.google.com!20g2000yqe.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: 20g2000yqe.googlegroups.com; posting-host=24.136.39.217; posting-account=LepcaQgAAACr4mTxtqQZ5RIS3kaWpFxN Original-NNTP-Posting-Host: 24.136.39.217 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:20.0) Gecko/20100101 Firefox/20.0,gzip(gfe) Injection-Date: Tue, 04 Jun 2013 23:20:11 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:199039 X-Mailman-Approved-At: Tue, 04 Jun 2013 19:38:04 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91306 Archived-At: On Jun 4, 1:17pm, Emanuel Berg wrote: > ... intuitively, emulate typing seems a bit strange... Not to me. Keyboard macros are a mechanism to convert typed-actions into programmatic code. E.g, I could use (execute-kbd-macro [?\M-x ?q ?u ?e ?r ?y ?- ?r ?e ?p ?l ?a ?c ?e return ?a ?t return ?@ return ?!] ) in place of my desired (invoke-as-if-I-typed (query-replace "at" "@") "!") However, firstly, this is clumsy. Secondly, it doesn't allow me to pass-in the fnc-name, e.g sometimes `query-replace', sometimes `query-replace-regexp', sometimes `dired-do-query-replace-regexp'. > ... > You might check out `C-h f call-interactively'. I looked at it before I posted. If someone can explain to me how it does what I want, then I'll be grateful. As to why I seek `invoke-as-if-I-typed', there are many reasons, but here is one. Imagine a fnc FOO that sequentially invokes a bunch of fncs that will prompt the user. While debugging FOO, I'd like to make some of the branches in the execution tree [the tree is controlled by user-input] to be executed automatically, while I debug the other parts. -Jonathan