Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOL behavior on copy-paste of multiple lines and and comments #1575

Open
masinter opened this issue Mar 10, 2024 · 1 comment
Open

EOL behavior on copy-paste of multiple lines and and comments #1575

masinter opened this issue Mar 10, 2024 · 1 comment

Comments

@masinter
Copy link
Member

Two problems: copy multiple lines from outside medley and paste into exec window...
and also after ; comment in exec window.

However, I noticed an unexpected and potentially confusing behavior when evaluating expressions that end with a comment preceeded by a semicolon.

I tested the code on Medley Online by pasting into a XCL Exec the expressions previously copied into the noVNC clipboard. I initially copied the first dozen lines of code, each of which is a Lisp expression followed by a comment like this:

123       ; the integer one hundred twenty-three

If you paste such a line at the Exec, or type it and press ENTER, the caret moves down one line and the expression isn't evaluated. At this point the Exec looks like this:

cl-comment

Pressing ENTER more times just moves the caret down as many lines. To make the prompt reappear I have to press an interruption keychord such as Ctrl+E. The issue occurs also when directly typing the line at the Exec, not just via copy-paste.

Originally posted by @pamoroso in #609 (comment)

@masinter
Copy link
Member Author

THe input behavior may be confusing, but it isn't exactly wrong

The "prompt" is not printed except when starting a new event. So if you have open parens you need to close them or (in Interlisp readtable) type "]" .

If you type in

(defun foo (x)
   (+ x x))

it won't prompt again after the first line.

The problem if you type in a full definition

(defun foo (x)
    ;; double the argument
   (+ x x))

it will throw away the comment. If you enter the code in SEdit,
image
you'll get the comment saved but "stripped" by the definer

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant