From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Rowe Newsgroups: gmane.emacs.help Subject: Re: user-input ? Date: Fri, 03 Jun 2005 12:57:50 -0400 Organization: Time-Warner Telecom Message-ID: <42a08c68$0$3718$39cecf19@news.twtelecom.net> References: <878y1rh06n.fsf@madamex.madamex.dk> 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 1117818112 31797 80.91.229.2 (3 Jun 2005 17:01:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Jun 2005 17:01:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 03 19:01:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DeFW2-0003So-7p for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jun 2005 18:59:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DeFbl-0001Tn-N8 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jun 2005 13:05:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!newsfeeds.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: <878y1rh06n.fsf@madamex.madamex.dk> Original-Lines: 24 Original-NNTP-Posting-Date: 03 Jun 2005 16:59:20 GMT Original-NNTP-Posting-Host: 7025ff2d.news.twtelecom.net Original-X-Trace: DXC=GRSn65mE[U9ZL\8J]nbWk?C_A=>8kQj6==_1NR_H?JP=R23; XKjT^]4<=dg>3m?k>76B_ 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:27192 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27192 Mads Jensen wrote: > I am a elisp newbie, who is trying to write a basic major mode. For > this, I need to read some input from the user, but I was not able to > find anything about that, in the elisp manual. Can anyone please tell me > how? Thank you. Check out the help for 'interactive'. This is a link to the relevant section in the elisp manual: http://www.gnu.org/software/emacs/elisp-manual/html_mono/elisp.html#SEC288 A very basic example of a function that requests user input in the form of a string: (defun my-example (arg) "Example of getting user input" (interactive "sEnter a string: ") (insert arg)) Greg -- Home is where the .bashrc is.