[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 23:40:15 +0200 |
> Sent: Tuesday, July 05, 2022 at 1:21 AM
> From: "Stefan Monnier" <monnier@iro.umontreal.ca>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Tassilo Horn" <tsdh@gnu.org>, carlmarcos@tutanota.com,
> help-gnu-emacs@gnu.org
> Subject: Re: Making a function than can only be used interactively
>
> > "interactive-only" should go far beyond a byte-compilation warning.
> >
> > I suggest that "interactive-only" does actually make the function work
> > in an interactive-only way.
>
> What would be the benefit?
>
> Stefan
There could be no benefit. One sure thing is that there are so many ways to use
the interactive clause, that it is difficult to decide what is good design and
what is
bad design. Might be the reason some users think more assistance on its use is
fundamental
to their elisp learning. Mainly because the manual does not include any
scenarios for
good design.
Speaking of design. I can see situations when a sequence of interactive calls
could depend
on the specific interactive value supplied through arguments.
(defun foo (a b c)
(interactive ...)
(if (equal a 1)
(let* (h (read-from-minibuffer ...))
... ))
...)
Although discouraged, the above could make sense, but completely wrong to use
non-interactively.
Perhaps there should be something beyond "An Introduction to Programming in
Emacs Lisp".
- Re: Making a function than can only be used interactively, (continued)
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/03
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/03
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Message not available
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Tassilo Horn, 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, Robert Pluim, 2022/07/04
- 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/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, 2022/07/06
- 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