sly icon indicating copy to clipboard operation
sly copied to clipboard

Readtable-case other than :upcase?

Open kchanqvq opened this issue 1 year ago • 3 comments

Entering (setf (readtable-case *readtable*) :preserve) makes the SLY session almost unusable. Completion constantly generates CL conditions, even if I type symbols in all uppercases. I've glimpse some SLY source and seems that it's written mostly only with readtable-case=:upcase in mind (e.g. in sly-mrepl--insert-prompt a (downcase package) is hardcoded, which will erase information if the reader is not case-converting). Is that true? Is there hope to improve the situation?

kchanqvq avatar Mar 05 '23 00:03 kchanqvq

Is that true?

Probably.

Is there hope to improve the situation?

Send patches?

joaotavora avatar Mar 05 '23 00:03 joaotavora

I'm curious, what do you use :preserve for? I've never seen it used, but it would be interested to know what is more easily achieved with it. Whenever I need to preserve case, I sth |Zebra|, or intern.

joaotavora avatar Mar 05 '23 00:03 joaotavora

It's a wild hack and as for now I'm not sure if it's useful either. I'm using :invert. This may enable tight integration with case-sensitive systems, in my case Unix. WIP here if you want to take a look https://github.com/PuellaeMagicae/unix-in-lisp. I've got it working on SLIME (which seem to not have this readtable-case assumption built-in). Basically it hacks SLIME REPL into a usable lispy Unix shell.

Send patches?

Sure, let me try...

kchanqvq avatar Mar 05 '23 01:03 kchanqvq