emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Namespacing design: consider completion/matching


From: Drew Adams
Subject: Namespacing design: consider completion/matching
Date: Sun, 10 May 2020 15:00:22 -0700 (PDT)

This message is no doubt premature in the
discussion that started about library `s.el',
and `s-' versus `string-' as a prefix, and
then moved on to namespaces, CL packages,
lexicons, etc.  But I wanted to get this out
there as a consideration in the context of
designing a namespacing scheme for Elisp.

This is about _user interaction_ with symbol
names etc., including users who are closely
involved with Lisp code.  I mean interactive
as opposed to reading/writing code.  By this
I include minibuffer completion.

The discussion of function & var names touched
on discoverability, apropos output, etc., as
well as usability for completion (speed, ways
of matching, etc.).  That's my concern here.

Currently, completion of, say, function names
typically uses the main obarray.  As long as
there's no namespacing, and any package-specific
or object type-specific name is just included
as part of a function name, completion is simple.

And even if such a categorizing name component
isn't the prefix, but is elsewhere in the name,
completion works well - substring, fuzzy, flex,
or regexp matching, for example.

What about the various namespacing schemes under
discussion?  How would they affect the mileage
a user can get with completion, say?  I know
that people mentioned that things like `apropos'
search, and grep would likely need to be adjusted,
to accommodate a namespacing scheme.  I bring up
completion in that context.  All such interaction
needs to be taken into account at some point.

With completion (and probably with things like
`apropos'), sometimes you might want to match
against only fully qualified (unabbreviated)
names, i.e., with the package/namespace part
included. Sometimes you might want to match
against only short(hand) names.  Sometimes you
might want to match against both (namespace part,
non-namespace part, or both).  Sometimes you
might want to match only stuff in a single
package/namespace.

If we ended up using, say, different obarrays
then that might have to be considered in the
context of completion.  Or if we, say, put
package/type info on symbol plists (same
obarray), then that might need to be considered
wrt completion.

My request is just that you think about this,
at least at some point, while discussing just
how to incorporate namespacing into Emacs Lisp.

You need not consider it right away - it sounds
like the discussion is still far from designing
a namespacing solution.  But I thought it would
be better to mention this now, to have folks
maybe keep it in the back of the head.

The interactive dimension of Elisp is strong.  
Interaction with Lisp thingies is a big part of
what Emacs users do.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]