+ Marco Baringer mb@bese.it:
| the "problem" here is that the completions are leading you to supply | the wrong package name. I assume that if you ignored the completions | and wrote the package-names yourself, in lower case, everything would | Just Work right?
Er, no, the completing-read upcases the package name anyway, even if I carefully avoid hitting the TAB key. In any case, it should not offer package names that will not work in the context they're going to be used anyhow.
| > Surely, there is some inconsistency, but I can't tell which part can | > be corrected without introducing another inconsistency. | | i think we can make swank:list-all-package-names smarter, but i | wouldn't touch anything post completing-read (iow i wouldn't change | how we process package names but, at most, how we help the user type | them)
So we're basically assuming that the user will think of package names as symbols, to be read according to the current value of (readtable-case *readtable*), and should make swank:list-all-package-names do the right thing: Invert if necessary, and escape if necessary. So if (readtable-case *readtable*) is :upcase and the package name is "foo" then what goes in the list is "|foo|". The user will have to use the initial vertical bar in order for completion to succeed, but that's a reasonable price to pay for naming packages in un-nameable ways I suppose. 8-)
Oh, wait a minute. slime-repl-set-package works differently: It treats package names like strings, not symbols. Shouldn't the two functions treat package names identically? Are you suggesting we change the behaviour of slime-repl-set-package as well?
- Harald