emacs-devel
[Top][All Lists]
Advanced

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

Re: About `<prefix>--' (was Re: filenotify.el)


From: Josh
Subject: Re: About `<prefix>--' (was Re: filenotify.el)
Date: Thu, 27 Jun 2013 16:19:39 -0700

On Wed, Jun 26, 2013 at 12:50 AM, Stephen Berman <address@hidden> wrote:
> [...] On
> the other hand, it does contain some internal functions and variables of
> a rather general character, needed to implement parts of the UI, which I
> included because Emacs doesn't have them (e.g. a powerset function), and
> these certainly could be used by other packages, but more likely they
> would be reimplemented using the package prefix.

Coincidentally enough, I needed a power set function just yesterday.
After fruitlessly grepping for one on my system I ended up writing
my own.  I wish I had procrastinated a bit longer so I could have
used yours :)

It would be great if more of these generally useful functions were
"promoted" from the libraries where they originated into the core of
Emacs, stripped of package prefixes and properly documented in the
Emacs or Elisp info manuals in order to make them more discoverable
for use elsewhere.  Doubtless many wheels have been reinvented after
failed searches for functionality that already ships with Emacs.  For
example, I have implemented and later stumbled across existing
implementations of anaphora (later found in lisp/ibuf-macs.el) and a
recursive directory-files function (later found in
lisp/gnus/gnus-util.el).  I'd expect discoverability to worsen as
libraries continue to move out of grep's reach in the core to GNU
ELPA, Marmalade, Github, etc., which in turn would result in greater
duplication of effort as well as proliferation of similar but subtly
incompatible implementations of general-purpose functions.

Users' interest in a richer set of elisp building blocks is evident
from the existence and popularity of libraries such as Magnar Sveen's
dash[0] ("a modern list library for emacs") and s[1] ("the long lost
Emacs string manipulation library").  IMO it would be a worthwhile
goal to move toward shipping canonical implementations of these
building blocks with Emacs.  What do others think?

Josh

[0] https://github.com/magnars/dash.el
[1] https://github.com/magnars/s.el



reply via email to

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