medley icon indicating copy to clipboard operation
medley copied to clipboard

Add SEdit command to look up symbol documentation

Open pamoroso opened this issue 1 year ago • 11 comments

It would be handy to add to SEdit a command key, possibly bound to Meta-D, to look up in DInfo the documentation of the selected symbol.

@rmkaplan suggested this feature motivated by user feedback.

pamoroso avatar Mar 28 '24 16:03 pamoroso

If the selected symbol has no DInfo or HyperSpec entry the command might show the output of CL:DESCRIBE.

pamoroso avatar Mar 28 '24 17:03 pamoroso

I think there are several sources of interest: the ARGLIST (sometimes an 'actual' and a presumed pattern) the DOCUMENTATION string (for DEFnnn) definers the output of CL:DESCRIBE The DInfo (for Interlisp) and CLHS (Common Lisp HyperSpec) The in-repo .TEDIT file for the LispUsers or Library package

In HELPSYS I tried to make ? and the MAN command lookup all that apply among some of these sources.

I was thinking that having meta-H repeated cycle through the ones that apply.

masinter avatar Mar 28 '24 17:03 masinter

A separate issue wrt meta-H would be to make it work not just on function-atoms but also on lists headed by function-atoms. In that case it could show the correspondence between argument names and arguments, the way ?= does in TTYIN, and not just say that args are not available.

On Mar 28, 2024, at 10:41 AM, Larry Masinter @.***> wrote:

I think there are several sources of interest: the ARGLIST (sometimes an 'actual' and a presumed pattern) the DOCUMENTATION string (for DEFnnn) definers the output of CL:DESCRIBE The DInfo (for Interlisp) and CLHS (Common Lisp HyperSpec) The in-repo .TEDIT file for the LispUsers or Library package

In HELPSYS I tried to make ? and the MAN command lookup all that apply among some of these sources.

I was thinking that having meta-H repeated cycle through the ones that apply.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1623#issuecomment-2025777272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJPERROML5JTEVQLSG3Y2RI6PAVCNFSM6AAAAABFNEOF3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVG43TOMRXGI. You are receiving this because you were mentioned.

rmkaplan avatar Mar 28 '24 17:03 rmkaplan

@rmkaplan - it already does that - if the point is in a list it looks up the arglist of the head of the list.

nbriggs avatar Mar 28 '24 17:03 nbriggs

It shows the argument names, as if you had clicked on the atom, but it doesn’t show the alignment:

Select the whole of (CONS A B), type meta-H, get (CONS X=A Y=B )

On Mar 28, 2024, at 10:53 AM, Nick Briggs @.***> wrote:

@rmkaplan https://github.com/rmkaplan - it already does that - if the point is in a list it looks up the arglist of the head of the list.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1623#issuecomment-2025796284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJKUZWSJ3ESC2CVBWMDY2RKKTAVCNFSM6AAAAABFNEOF3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVG44TMMRYGQ. You are receiving this because you were mentioned.

rmkaplan avatar Mar 28 '24 18:03 rmkaplan

@rmkaplan right - that would be better. It would need to do it somewhere other than the single line SEdit prompt window. It already is suboptimal on long arglists, even though it says it should show it in the main promptwindow if it's too big.

nbriggs avatar Mar 28 '24 18:03 nbriggs

For me, when there are a lot of arguments, they show up in the system promptwindow (which in my set up is far off to the side and I don’t always immediately notice). We could also pop up a temporary Tedit window next to the Tedit.

On Mar 28, 2024, at 11:13 AM, Nick Briggs @.***> wrote:

@rmkaplan https://github.com/rmkaplan right - that would be better. It would need to do it somewhere other than the single line SEdit prompt window. It already is suboptimal on long arglists, even though it says it should show it in the main promptwindow if it's too big.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1623#issuecomment-2025828026, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJMCW7IU7TKQSZA2QMTY2RMUNAVCNFSM6AAAAABFNEOF3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVHAZDQMBSGY. You are receiving this because you were mentioned.

rmkaplan avatar Mar 28 '24 18:03 rmkaplan

SEdit now provides the Meta-D command. Can this issue be closed?

pamoroso avatar Jul 12 '24 19:07 pamoroso

Actually, it is now provided as a load-able lispusers file SEDIT-MAN. The next step would be to add it to the standard SEDIT menu/command, so it is always there. Any objections?

rmkaplan avatar Jul 12 '24 19:07 rmkaplan

In general, it is not a good idea to close issues requesting a feature until it has been documented in places that user's will look (unless the feature is obvious and needs no documentation.) Where?:

  • The "Medley Release Notes" should cover all of the "modernizations". If the documentation is extensive, then the release notes can point to the documentation of the feature, but it needs to be linked in and readily accessible.

I don't see any particular advantage to closing the "want feature" implementation and opening a new "Want feature documentation" issue.

masinter avatar Jul 13 '24 00:07 masinter

In this case, if it's in the basic menu, then there would be at least some documentation when the menu is brought up.

rmkaplan avatar Jul 13 '24 19:07 rmkaplan