From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Vagn Johansen Newsgroups: gmane.emacs.help Subject: Re: Using passing the tempo-template user input to my function? Date: Wed, 27 Oct 2004 19:23:47 +0200 Organization: TDC Totalloesninger Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098898041 14969 80.91.229.6 (27 Oct 2004 17:27:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2004 17:27:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 27 19:27:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMrZr-0004aZ-00 for ; Wed, 27 Oct 2004 19:27:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMrhc-0006G6-E7 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Oct 2004 13:35:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!irazu.switch.ch!switch.ch!news-fra1.dfn.de!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:Lr9wXqpmBBFm5cTS7AcZGstO4Gw= Original-Lines: 29 Original-NNTP-Posting-Host: 80.196.132.34 Original-X-Trace: 1098897860 dread16.news.tele.dk 86941 80.196.132.34:47273 Original-X-Complaints-To: abuse@post.tele.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:126128 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21509 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21509 Hattuari writes: > I've tried all the ways I can come up with to pass the string returned from > querying the user to my own function. [...] > If I explicitly pass the correct string to the function, the correct output > is generated. Suggestions? Use your own query-function and a global variable. For example (defvar xyz-name nil) (defun xyz-read () (interactive) (setq xyz-name (read-from-minibuffer "xyz-name? "))) (defun xyz-func () (upcase xyz-name)) (tempo-define-template "xyz" '("xyz { " (xyz-read) " } { " 'xyz-name " } { " (xyz-func) " }" ) "xyz" "desc" 'elisp-tempo-tags) -- Vagn Johansen