[Top][All Lists]

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

Re: ps-print variables interactive setting

From: Andreas Politz
Subject: Re: ps-print variables interactive setting
Date: Thu, 04 Sep 2008 00:32:48 +0200
User-agent: Mozilla-Thunderbird (X11/20080724)

Rodolfo Medina wrote:
Rodolfo Medina <address@hidden> 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

 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

Barry Margolin <address@hidden> writes:

(defun my-function ()
  (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 ()
  (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.


Take a look at the documentation of the interactive call, it let's you
read any kind of data from the minibuffer.

(defun my-manage-ps-font-size(size string)
  (interactive "nFont size ? \nsErase all memory ? ")
  (setq ps-font-size (cons 7 size)))

This reads a number and a string.


reply via email to

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