Re: interactive scheme



Jens Axel Søgaard wrote:

Repeatedly pressing ctrl+p  (for previously) will get you
the previously entered expressions in the DrScheme interaction
window. Copying s-expressions is done by placing the cursor
before the parenthesis pressing alt+rightarrow alt-c and then
alt-v where you want to insert it.

I'm continually annoyed by schemata that don't have a command shell that lets me edit and reenter previous inputs, or which restrict editing to the current line, not allowing backspace or left-arrow to cross line boundaries - or which don't allow newline characters at the command shell, making code into a great gray block. I sort of understand that they intend to be run as inferior processes under emacs, but it's still irritating.

I think the following are pretty good guidelines for an
interactive language, and what I plan to do myself when
my system is advanced so far as to have an interactive
shell.  Of course, you'd want an emacs-mode switch that
turns some of these off so as not to confuse emacs, but
that's a reasonable parallel to the interactive-mode
switch I'll be using to tell it not to function as a
compiler-only system.

I leave more complex editing tasks (structure editing,
cut&paste, etc) to editors, the software best suited
for it. But just by itself, I think a lisp shell ought
to do at least this...

up-arrow, down-arrow: moves up or down through edited
          input history.  The current typed-but-not-entered
          input, if any, is saved (including any edits made
          so far on it) and the previous/next input in the
          history (edited versions) appears in its place.
          The window may have to scroll up or down to
          accomodate the apparition.

left-arrow, right-arrow: moves edit cursor back and
          forth in typed-but-not-entered input including
          wrapping at line breaks.

backspace: deletes the character to the immediate left of
          the cursor and moves the cursor left.  If the cursor
          is at the beginning of a line, the newline character
          separating lines is deleted, the window above the
          cursor scrolls down, the cursor appears at the end
          of the line previous, and further characters on the
          current line, if any, appear after the last visible
          character on the previous line.

Left-paren, right-paren:  highlight the matching right/left paren
          if any and if it's on the current window.

enter:  If the previous character was not a line break, inserts
          a line break for code formatting during entry.  If the
          previous character was a line break and the current
          expression is balanced, "enters" the present
          expression into the system to be executed.  If the
          present expression is "entered", it is also appended
          to the edited and (optionally) unedited command
          histories.

	  (optional) If the previous character was a line break
          and the current expression is unbalanced, highlights
          the extra right-parens or inserts the missing right-
          parens without "entering" the present expression.
          (and may print a message in a separate window area if
          I do a full ncurses interface).

(optional)
delete:  deletes the character under the cursor and scrolls the
         remainder of the line left.  If the cursor is at the right
         end of the line, the newline character separating
         the lines is deleted and the window above the cursor
         scrolls down, with the subsequent line appearing to
         the right of the cursor.

(optional)
page-up, page-down: moves up or down through the unedited
          input history.  The current typed-but-not-entered
          input, if any, is not saved, and the previous/next
          input in the history (unedited version) takes its
          place.  The window may have to scroll up or down to
          accomodate the apparition.


Bear

.



Relevant Pages

  • Re: convert hyperlink to email address
    ... If the Project Explorer is not showing, ... A blank window should open up to the right. ... then you can close the VBE. ... won't be any changes (except the flashing cursor moving down to the next ...
    (microsoft.public.excel.programming)
  • Re: Customising Word for Visually-Impaired
    ... the application will grab hold of the cursor and do its own thing with it. ... perhaps a black-bordered window around the insertion point to draw attention ... But I've found it impossible to get the handle of the Word window ... Control Panel> Accessibility Options> Display> Cursor Width ...
    (microsoft.public.windowsxp.accessibility)
  • RE: hide cursor for kiosk application (powerpoint)
    ... you use a WebBrowser control to display ... PowerPoint document and you'd like to hide the cursor on the WebBrowser. ... I watch the messages of the paneClassDC "Slide Show" window. ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: MFC: Drag & Drop ohne die Maus zu verwenden?
    ... >> system will direct mouse input to the specified window only if a mouse ... > Prozess bekommt IMHO keine Nachricht das der Cursor über seinem Fenster ... Ich bin da auf einen Artikel gestossen mit mouse_event, ...
    (microsoft.public.de.vc)
  • Re: Detecting button push
    ... David Olsson wrote: ... > I have a window with a number of buttons (created using CreateWindow ... mouse button while the cursor is in the client area of a window. ... Value of the high-order word of lParam. ...
    (microsoft.public.win32.programmer.ui)