[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: |
Mon, 4 Jul 2022 22:46:18 +0200 |
> Sent: Tuesday, July 05, 2022 at 8:35 AM
> From: "Stefan Monnier" <monnier@iro.umontreal.ca>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: tsdh@gnu.org, help-gnu-emacs@gnu.org
> Subject: Re: Making a function than can only be used interactively
>
> > I could envisage a situation where someone wants to concentrate on the
> > interactive parts, if taking care of non-interactive use would make the
> > function difficult to maintain. I am not sure that it will always be
> > because of bad design.
>
> Indeed, we have many such functions which have been designed
> specifically for interactive use and the non-interactive use case has
> simply not been considered. It's not bad design.
>
> And it doesn't require us to make it impossible to call those functions
> non-interactively.
>
> > I also say that it would be better to have declarations that are somewhat
> > safer for the general elisp user as well.
>
> Not sure what you mean. Are you saying that (declare (interactive-only
> <foo>))
> is not safe enough? Can you expand on that?
>
>
> Stefan
>
Another debate is that although one can declare a non-interactive function,
and an interactive function that can run non-interactively; there is no
construct that can define a purely interactive function.
Does a function know whether it was run from lisp code or from the user in
an emacs session?
- Re: [External] : Re: Making a function than can only be used interactively, (continued)
- Re: [External] : Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- Re: [External] : Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, Drew Adams, 2022/07/04
- no difference between interactive and "from Lisp" (was: Re: Making a function than can only be used interactively), Emanuel Berg, 2022/07/05
- Re: no difference between interactive and "from Lisp", Stefan Monnier, 2022/07/05
- Re: no difference between interactive and "from Lisp", Emanuel Berg, 2022/07/05
- Re: Making a function than can only be used interactively, Po Lu, 2022/07/03
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, Christopher Dimech, 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, Stefan Monnier, 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, Stefan Monnier, 2022/07/04
- RE: [External] : Re: Making a function than can only be used interactively, Drew Adams, 2022/07/05
- Re: RE: [External] : Making a function than can only be used interactively, Christopher Dimech, 2022/07/05
- RE: RE: [External] : Making a function than can only be used interactively, Drew Adams, 2022/07/05