[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a function than can only be used interactively
From: |
Christopher Dimech |
Subject: |
Re: Making a function than can only be used interactively |
Date: |
Wed, 6 Jul 2022 22:00:01 +0200 |
> Sent: Wednesday, July 06, 2022 at 12:07 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: carlmarcos@tutanota.com
> Cc: "Stefan Monnier" <monnier@iro.umontreal.ca>, "Tassilo Horn"
> <tsdh@gnu.org>, help-gnu-emacs@gnu.org
> Subject: Re: Making a function than can only be used interactively
>
> * carlmarcos--- via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> [2022-07-04 22:52]:
> > Technically, you can use `completing-read` and `read-from-minibuffer` if
> > you'd also
> > like to set values interactively, while calling the function
> > non-interactively. One can
> > achieve more or less the same effect with setting values of local
> > variables outside
> > the interactive expression. In this scenario, running the function
> > non-interactively would
> > still force interactive input from the minibuffer.
> >
> > I am not sure if in practice that is ever desired.
>
> (interactive &optional ARG-DESCRIPTOR &rest MODES) -- this makes the
> function a command that may be tied to a key, and it helps in
> specifying the arguments to the function.
>
> In this context function may be run as command, or by pressing a
> key. However, it does not really mean it need to interact with user,
> not at all. It does not need to ask nothing of the user. In fact, it
> can just interactively, during Emacs session be called by user with
> M-x or by using a key. Beyond that, function may remain quite silent
> without interactivity.
>
> The above is one specific context where word "interactive" is used as
> in function (interactive).
>
> It does not exclude the other context that any function without
> (interactive) may do interactive activities, like ask user
> interactively for input.
If one does not mind interactive activities with the minibuffer for
a function without the interactive clause.
> Remember, there are 2 different contexts. One does not exclude the other.
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>
>
- Re: Making a function than can only be used interactively, (continued)
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/04
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/04
- Re: Making a function than can only be used interactively, Robert Pluim, 2022/07/04
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/04
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/05
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/04
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/04
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/05
- Re: Making a function than can only be used interactively,
Christopher Dimech <=
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/07
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/07
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/07
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/07
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/07
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/07
- Re: Making a function than can only be used interactively, Yuri Khan, 2022/07/08
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- Re: Making a function than can only be used interactively, Yuri Khan, 2022/07/08
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08