From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Evans Winner Newsgroups: gmane.emacs.help Subject: Re: How to define a `multiple prompt' function? Date: Wed, 03 Sep 2008 13:43:08 -0600 Organization: Aioe.org NNTP Server Message-ID: <86od353tir.fsf@timbral.net> References: <87ej42m64o.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220474442 14535 80.91.229.12 (3 Sep 2008 20:40:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2008 20:40:42 +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 Sep 03 22:41:37 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KazAU-0008R3-RR for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 22:41:34 +0200 Original-Received: from localhost ([127.0.0.1]:57273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kaz9V-00060p-BA for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 16:40:33 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.straub-nv.de!news.k-dsl.de!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: tHL7Pw00KvzSeEbptdOqCQ.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Cancel-Lock: sha1:+nZjJYcUF2CshV7sf8G3UiUQvpQ= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:161899 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:57242 Archived-At: Rodolfo Medina writes: I wish to define a function that prompts me more than once: let's call it `my-function': when I type `M-x my-function', in the echo area I see (just an example): Hi, how are you today? . Then I type, e.g., `fine RET', and again it prompts me with: I see. And, what did you do yesterday? ... and so on. Then I'm going to put some `if... else' conditions over my possible answers. Can anybody please provide some hints about how to elisp this? 'read-from-minibuffer might be what you want. (format "Your name is: %s" (read-from-minibuffer "Who are you? "))