From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Mazzoli Newsgroups: gmane.emacs.help Subject: Re: reading a variable from the user Date: Wed, 10 Oct 2012 10:08:34 +0100 Message-ID: <87k3uy1yp9.wl%f@mazzo.li> References: <1349853875855-266778.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1349860132 27652 80.91.229.3 (10 Oct 2012 09:08:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2012 09:08:52 +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 Oct 10 11:08:58 2012 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 1TLsHi-00055h-LS for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 11:08:58 +0200 Original-Received: from localhost ([::1]:53192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLsHc-0001tz-7N for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 05:08:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLsHS-0001tQ-EU for Help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 05:08:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLsHK-0002aN-Oc for Help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 05:08:42 -0400 Original-Received: from mail-wi0-f171.google.com ([209.85.212.171]:45989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLsHK-0002ZS-IB for Help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 05:08:34 -0400 Original-Received: by mail-wi0-f171.google.com with SMTP id hj13so5500434wib.12 for ; Wed, 10 Oct 2012 02:08:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:message-id:from:to:subject:in-reply-to:references:user-agent :mime-version:content-type:x-gm-message-state; bh=qKPldcGNY4t/8Tn0QU33OXjnGbzW3lSqIHR3FYTI2zo=; b=V8Zv4lXZ38tT7jgeV8NaXex6zyanDVrVjec0Pls5g/12ONzS9WRGC7yyBoQ8/OMogB cT3s/30OG1I9U4JGwo11JYfn3UZbctx4PylgFy66Cphn30CCwrflo0YU+GRv8so8REkD 3PEu5i4wSj8uZ+tSW/iVhAfij3ZAVjEs8Cf+qiBJcmWUJdBlDLhdCvor0NBtpCsFDXW6 8VBfro1gcn0+QrRRqJm72K9lyx93CcQCYPh8BcrZgCvxnWufc5XUTf4ztOxAd31X8BAZ yV1jkOj71l41Zp9R/9cRs/kCkZISEFH0lm9A0yiD/Q/0QtKEnxf8Z/E6X+p7P7jJafz+ O03g== Original-Received: by 10.180.24.4 with SMTP id q4mr11256419wif.19.1349860113214; Wed, 10 Oct 2012 02:08:33 -0700 (PDT) Original-Received: from stringer.mazzo.li (dyn902-9.eduroam.ic.ac.uk. [146.179.202.9]) by mx.google.com with ESMTPS id v3sm29211237wiw.7.2012.10.10.02.08.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 02:08:32 -0700 (PDT) In-Reply-To: <1349853875855-266778.post@n5.nabble.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Gm-Message-State: ALoCoQmmYADY3r4k5hFC7tMQKoIllitoMdPjRpsZ32bP43gSj+jSfy3Q9VL4zhVqX0DCe0wEtAUy X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.171 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:87146 Archived-At: At Wed, 10 Oct 2012 00:24:35 -0700 (PDT), drain wrote: > Is there a function that prompts the user in the mini-buffer, matches the > string input with a local variable name, and then returns the variable? You can use something like (defun foo (var) (interactive "v") (message "%S" (symbol-value var))) See the help page for `interactive' for more info. -- Francesco * Often in error, never in doubt