[Top][All Lists]

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

Re: simple useful functions

From: Stephen J. Turnbull
Subject: Re: simple useful functions
Date: Wed, 03 Nov 2010 19:13:36 +0900

Andreas Röhler writes:

 > AFAIU `occur' selects lines, not strings.

Sure, but the words "occur" and "occurance" don't imply
line-oriented.  IOW, that's an implementation detail AFAICS.

You can argue this functionality doesn't belong in occur, but I don't
think its current line-oriented implementation is a reason not to add
it there.  More to the point would be that `collect-string' might be
most useful in Lisp programs, but `occur' is interactive.  There may
be other reasons, too.  Note that the interactive vs. programmatic
issue might very well be a problem with my clumsy implementation --
that was just a proof of concept.

Even so, I think it belongs in the "occur-" namespace.  I think it's
most discoverable there.

 > Isn't `collect-string' an instructive example how to write simple and 
 > effective code in Emacs Lisp?

"Instructive examples" belong in the Elisp tutorial, not in the core

The questions about `collect-string' should be, "Does this
*functionality* belong in the core codebase?  If so, where?"

reply via email to

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