From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Hattuari Newsgroups: gmane.emacs.help Subject: Re: Using passing the tempo-template user input to my function? Date: Sat, 30 Oct 2004 08:11:43 -0400 Organization: Asii 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 Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1099138712 2310 80.91.229.6 (30 Oct 2004 12:18:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Oct 2004 12:18:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 30 14:18:23 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 1CNsBb-0000pF-00 for ; Sat, 30 Oct 2004 14:18:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNsJU-0006e2-Rq for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Oct 2004 08:26:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Sat, 30 Oct 2004 07:13:54 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.8.1 Original-Lines: 40 Original-NNTP-Posting-Host: 66.92.149.152 Original-X-Trace: sv3-GjFs+vYZdSNR60w3mnudXhZ/V6Cp8+MxC/kjc7ijV82e4wFnvNfQkB3m67DfbM7lpPGYtVXv+coyIfP!z3pxNXyDveURvwS7/aptT3fnt2oUotdcYWtrDVsxO/7NCsFG1g/OxI0kify9fQOnYMhQymUsBgpC!qo+/6KOtCz0WrTC0JVs= Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.20 Original-Xref: shelby.stanford.edu gnu.emacs.help:126243 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:21624 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21624 Vagn Johansen wrote: > 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) > I just wanted to let you know I didn't ignore this. I did look at the code you posted, and tried a few variations. The reason I'm exploring alternative approaches is that I simply came to the conclusion that I need to work on the fundamentals of Lisp a bit more. I've been stabbing in the dark at my .emacs for years without really understanding what I'm doing. I've wasted a lot of time trying to accomplish 'simple' things because I didn't know what I was doing. -- p->m == (*p).m == p[0].m