texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Interactive feedback


From: Joris van der Hoeven
Subject: [Texmacs-dev] Interactive feedback
Date: Wed, 25 Feb 2004 11:48:26 +0100 (CET)

Hi,

I just noticed that David submitted a patch for the improvement
of interactive commands. In fact, for the future, I had in mind
something even better, although I did not check yet whether
my idea is feasable. Indeed, I think that we should use
continuations for user feedback and implement Scheme macros like

        (with-interactive x "Enter a number"
          prg)

or

        (let-interactive ((x "First argument")
                          (y "Second argument"))
          prg)

which should return nothing when executing, but which passes
control to the status bar (or a popup widget) and asks for
user feedback. Moreover, we keep the "prg" continuation,
which is executed when the user is done (except when
the user cancels). This way of using continuations should
be acceptable in the sense that we only have to save
the stack frame once for each user operation (so this is
even OK for the bad implementation of continuations in Guile).

Having macros like the above would make it much easier and
natural to deal with all kinds of interactive feedback
(think about confirmations for loading an autosave file or
for each unsaved buffer when quitting TeXmacs).
The current way of handling interactive commands can
also easily be simulated.

Maybe that David is willing to think a bit about this.
It might be a good idea to implement user feedback from
popup windows all along with this. Also, the idea may
be further extended so as to allow things like

        (let-interactive
            ((name "File name" url)
             (operation "Operation" (enum "Blah" "Hop"))
             (confirm? "Really do this" bool))
          prg)

and to generate an appropriate widget or footer feedback.
Delayed commands might be implemented in a similar way too.

Best wishes, Joris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]