emacs-pms-dev
[Top][All Lists]
Advanced

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

Re: [emacs-pms] Dir-style package symbols


From: Jonas Bernoulli
Subject: Re: [emacs-pms] Dir-style package symbols
Date: Mon, 20 Dec 2010 00:14:32 +0100

On Sat, Dec 18, 2010 at 19:26, Tom Breton (Tehom) <address@hidden> wrote:
> As we all know, one quirk of elisp is that everything lives in the same
> namespace.  We work around that with prefixes and so forth.  But still it
> constricts what we can do with packages.  It probably contributes to the
> practice of large single-file packages.

It is a problem that there is only one namespace. But that is mostly
because symbols are therefor required to have a prefix to avoid
conflict not because of how it might affect the names we give to
libraries.

I haven't considered that the lack of namespaces could lead to more
lines per file. I personally don't like very long files either but do
not think this is such a big issue.

> You may dismiss this as a case of CPAN-envy if you like, but what I do is
> to give sublibraries names like `emtest/common/testral-types' or
> `emtest/common/persist'.  I just tell load-path the root of that tree.
> Emacs finds them without a problem, and I cleared this with the emacs-dev
> list.

Is this actually documented anywhere? (I do did previously know of
this feature but it does not appear in wide use, so I haven't
investigated it yet.)

> I've said more about this in the blog a while back,
> http://tehom-blog.blogspot.com/2010/07/my-elisp-directory-conventions.html
>
> Then I give all the symbols in the package a clumpier unique prefix, like
> `emdb:'.  That way they both are unique and relate to an expressive name.

I don't see why you can't use the prefix "foo-" both in "foo.el" and
"foo-bar.el" but can use "foo" in "foo.el" and "plugins/bar.el". Also
why is "foo:" any better than "foo-"?

> I find it gives me a lot more freedom to package things as I want to
> instead of in one big file.

Why does it give you more freedom? Because you don't have to add every
subdirectory to the load path anymore?

-- Jonas



reply via email to

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