From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rodolfo Medina Newsgroups: gmane.emacs.help Subject: ps-print variables interactive setting (was: How to define a `multiple prompt' function?) Date: Wed, 03 Sep 2008 21:31:23 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <87ej412cpw.fsf@gmail.com> References: <87ej42m64o.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220470894 1344 80.91.229.12 (3 Sep 2008 19:41:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2008 19:41:34 +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 Sep 03 21:42:29 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KayFC-0006Ak-D0 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 21:42:22 +0200 Original-Received: from localhost ([127.0.0.1]:59502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KayED-0005vL-BB for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 15:41:21 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:eAkkZPRn0HiUn0g6+3ssVyN81y8= Original-Lines: 48 Original-NNTP-Posting-Host: 151.80.218.109 Original-X-Trace: news.sunsite.dk DXC=@nM[QQWSjTRbD]FUj; YcCZYSB=nbEKnk[jL0kO3l6od^:AocXk=\=_TT7bXfBO; G:UKAib\KDO`hRm=c5DAkLCD\ 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:57240 Archived-At: Rodolfo Medina wrote: >> I wish to define a function that prompts me more than once: let's call it >> `my-function': when I type `M-x my-function', in the echo area I see (just an >> example): >> >> Hi, how are you today? >> >> . Then I type, e.g., `fine RET', and again it prompts me with: >> >> I see. And, what did you do yesterday? >> >> ... and so on. Then I'm going to put some `if... else' conditions over my >> possible answers. Can anybody please provide some hints about how to elisp >> this? Barry Margolin writes: > (defun my-function () > (interactive) > (let* ((response (read-from-minibuffer "Hi, how are you today? ")) > (new-prompt (format "I see, you're %s? And where did you go > yesterday?" response)) > (response2 (read-from-minibuffer new-prompt))) > (message "I hope you enjoyed %s" response2))) Thanks, that works. I wish to set some ps-print variables in an interactive way, i.e. be prompted for the value that I want to set. So, following Barry's hint, I put: (defun my-manage-ps-font-size () (interactive) (let* ((prompt1 (read-from-minibuffer "Font size? ")) (prompt2 (format "(quote (7 . %s))" prompt1)) ) (setq ps-font-size prompt2) ) ) , but it seems that the variable's value is put between "" and so it is not accepted. I need help in this point. Thanks to anyone still helping. Rodolfo