Do what I mean for packages
The standard programming tools, such as ED/PF/WHEREIS are not dwimified with respect to symbols not in the current package. If you don't specify the package-qualified name of the symbol that you want to edit or see, then, then they fail. And even if you know the package, they fail if you don't get the internal/external right.
These interfaces should be upgraded so that if the target of whatever type doesn't exist in the current package, they scan all the packages (and maybe including a scan in a whereis database) to find all instances of that name in other packages, and either operate on a properly qualified symbol if it is of the right type for the operation, or pop up a menu that offers all of the package-qualified versions of that symbol of that type.
For many users (well, almost all except a few dinos) DWIM is very confusing, as is Medley case, as are packages. DWIM"s feedback is terse and hard to understand. DWIM in a single package with a single Intersp readable... there's a lot of state and context. If you type in one window (setq x 'y) and in another 'x' you'll get a terse messge x -> il:x or x->X or X->x or X->XCL-USER::X. DWIM is a bunch of "heuristic" code that was based on intuitions about the kinds of errors Lisp programmers made in the 70s; these need at least a little touch up. DWIM in Common Lisp and in other contexts lacks the important feature in that it mainly DOESN'T fix the error! I suspect this is the case because in Common Lisp, comments can be anywhere -- and are stripped in he code you are running. I think this might be why, in an break, EDIT just says "can't".
I like DWIM and think it deserves a better demo. Some adjustments might fix some of these problems:
set DWIMWAIT to 300 (5 minutes) give better explanations of what changes are proposed, including, if it can find it, the context of the error and the proposed replacement.
A lot of people have a visceral reaction and our mission is to develop demonstrations of ideas based on Interlisp.
I think this isn't right -- DWIM seems to find symbols in other packages and offer them as fixes.
There are some problems with DWIM making corrections that aren't saved sometimes, but that's different from this issue.
I don’t think DWIM is operating in the editor interface.
On Oct 24, 2021, at 4:10 PM, Larry Masinter @.***> wrote:
I think this isn't right -- DWIM seems to find symbols in other packages and offer them as fixes.
There are some problems with DWIM making corrections that aren't saved sometimes, but that's different from this issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/477#issuecomment-950412067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJIFEEITMKENSFMHGZ3UISG7BANCNFSM5D623DOA.
you know, there are so many ways to call the editor that I don't know what you mean. often i use evalquote-style
ED(NEWFN]
as I usually end lines with right ] bracket. but mostly i don't type the name of what i want to edit
You have a better DWIM than I have, I usually have to specify what I want to edit.
Try this in an Interlisp Exec.
(DEFINEQ (FOO NIL (CONS)))
Then switch to a commonlisp exec and try
(ED ‘FOO)) (no package)
You get a pop up that asks you how you want to define (I guess) CL:FOO—structure, variable, function…
It should at least look around for FOO-like things, ask about that.
Or, in an Interlisp exec, (ED ’SEDIT). It should notice that SEDIT:SEDIT exists unambiguously and coerce to that (and maybe then ask whether you want to load etc.)
On Oct 24, 2021, at 7:47 PM, Larry Masinter @.***> wrote:
you know, there are so many ways to call the editor that I don't know what you mean. often i use evalquote-style
ED(NEWFN] as I usually end lines with right ] bracket. but mostly i don't type the name of what i want to edit
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/477#issuecomment-950478120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJI53FIAXIZ565LHCWLUITAL3ANCNFSM5D623DOA.
There are some problems with EDITF and ED's interaction with DWIM, not with DWIM's interaction with packages. The spelling correction happens in HASDEF, which has a SPELLFLG last argument. Calling HASDEF with FOOO will spelling correct, and with XCL-USER::FOO will correct to the right package.
il:hasdef(foo il:fns nil t)
=IL:FOO
il:editdef(foo il:fns)
Could not find fns definition for FOO.
Could not find fns definition for
FOO