[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Iinteractive function allowing multiple inputs
From: |
Heime |
Subject: |
Re: Iinteractive function allowing multiple inputs |
Date: |
Mon, 09 Dec 2024 21:14:05 +0000 |
On Tuesday, December 10th, 2024 at 9:06 AM, Jean Louis <bugs@gnu.support> wrote:
> * Heime heimeborgia@protonmail.com [2024-12-09 23:48]:
>
> > > (defun my-multi-input-function (input1 input2 input3)
> > > "An example function that takes three inputs and displays them."
> > > (interactive
> > > (list
> > > (read-string "Enter the first input: ")
> > > (read-string "Enter the second input: ")
> > > (read-string "Enter the third input: ")))
> > > (message "You entered: %s, %s, %s" input1 input2 input3))
> > >
> > > ;; To use the function, execute it with M-x my-multi-input-function
> > >
> > > Me personally, I don't like that style, I like using `let' and reading
> > > what I need to read within function, while leaving (interactive) as it
> > > is. - Jean Louis
> >
> > But then you would not be able to use it in elisp code because it would
> > ask for the values.
>
>
> Isn't that Emacs Lisp code? - Jean Louis
Yes, but the values are not set automatically as one can do with a call
with arguments. The code will force on you an interaction as though you
are in interactive mode.
- Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs,
Heime <=
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/10
Re: Iinteractive function allowing multiple inputs, Stefan Monnier, 2024/12/09