From: Christopher Dimech <dimech@gmx.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" <help-gnu-emacs@gnu.org>
Subject: Re: FW: RE: RE: [External] : Making a function than can only be used interactively
Date: Wed, 6 Jul 2022 01:05:04 +0200 [thread overview]
Message-ID: <trinity-c453bfbe-570c-4b40-9c95-4a51e9aff335-1657062304430@3c-app-mailcom-bs14> (raw)
In-Reply-To: <SJ0PR10MB548894AF55DE4AB20C43C768F3819@SJ0PR10MB5488.namprd10.prod.outlook.com>
> Sent: Wednesday, July 06, 2022 at 10:40 AM
> From: "Drew Adams" <drew.adams@oracle.com>
> To: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" <help-gnu-emacs@gnu.org>
> Cc: "Christopher Dimech" <dimech@gmx.com>
> Subject: FW: RE: RE: [External] : Making a function than can only be used interactively
>
> I guess this was maybe intended for the help list?
It was. Thanks.
> -----Original Message-----
> From: Christopher Dimech <dimech@gmx.com>
> Sent: Tuesday, July 5, 2022 2:15 PM
> To: Drew Adams <drew.adams@oracle.com>
> >
> > > > Has any concrete description been presented
> > > > in this thread that makes clear what the real
> > > > problem to be solved is - the use case behind
> > > > the question?
> > >
> > > The filling of arguments could be difficult
> > > if a sequence of interactive prompt depend
> > > on previous values.
> >
> > Hard to guess what you mean. Example?
> >
> > What's to prevent someone from calling the
> > function (whatever it is) with appropriate
> > arguments, whether or not some of them depend
> > on others?
> >
> > > One thing that has been discussed is the following
> > > (defun foo ()
> > > (interactive)
> > > (let ((a ...)
> > > (b ...)
> > > (c ...))
> > > ...))
> >
> > Didn't Stefan show that only to indicate that
> > you can prompt for values in the body of a
> > function, instead of (or in addition to) doing
> > so in an `interactive' spec?
>
> Yes. That strategy could easily make a function inappropriate
> for non-interactive use. The result would not necessarily be
> a result of bad design.
>
> > IOW, presumably he was suggesting that some of
> > the "..." to provide values for a, b, and c
> > could come from prompting a user - IOW, making
> > the function interactive regardless of how
> > it's called.
> >
> > I don't see what that has to do with any
> > problem of "filling arguments" when calling
> > from Lisp.
> >
> > Sorry, but so far I'm not grasping what the
> > problem is - what OP is really trying to do.
>
> The OP wants to make the function purely interactive.
> But at a low-level, you can't have a function that
> can be called interactively and not non-interactively.
>
> The sensible way out is for the OP to include its inappropriateness
> for use in elisp code in the documentation. Either that, or using
> a specific part-name separated by "--" for the function name, as
> indicator that function is inappropriate for elisp code. Emacs
> has done this strategy before.
>
> > But again, I only skimmed the thread. If you
> > think the question / use case is clear to
> > others then please ignore my feedback.
>
> Although I understand it, the result would either be unreliable or
> too cumbersome for actual use.
>
>
>
>
>
next prev parent reply other threads:[~2022-07-05 23:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 21:07 Making a function than can only be used interactively Christopher Dimech
2022-07-04 21:45 ` Stefan Monnier
2022-07-04 22:05 ` Christopher Dimech
2022-07-04 22:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-07-05 14:02 ` [External] : " Drew Adams
2022-07-05 15:35 ` RE: [External] : " Christopher Dimech
2022-07-05 16:34 ` Drew Adams
[not found] ` <trinity-568779dc-3120-4001-a48b-df09d38f19a1-1657055684424@3c-app-mailcom-bs14>
2022-07-05 22:40 ` FW: " Drew Adams
2022-07-05 23:05 ` Christopher Dimech [this message]
2022-07-04 23:33 ` Christopher Dimech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-c453bfbe-570c-4b40-9c95-4a51e9aff335-1657062304430@3c-app-mailcom-bs14 \
--to=dimech@gmx.com \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).