help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using passing the tempo-template user input to my function?


From: Hattuari
Subject: Re: Using passing the tempo-template user input to my function?
Date: Sat, 30 Oct 2004 08:11:43 -0400
User-agent: KNode/0.8.1

Vagn Johansen wrote:

> Hattuari <susudata@setidava.kushan.aa> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]