[Top][All Lists]

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

Re: simple useful functions

From: Tak Ota
Subject: Re: simple useful functions
Date: Wed, 3 Nov 2010 11:08:45 -0700

Wed, 3 Nov 2010 03:13:36 -0700: "Stephen J. Turnbull" <address@hidden> wrote:

> 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.

Try M-x collect-string.  It is interactive.  And recently in regard to
my work I most frequently use collect-string to extract specific URLs
from XML and HTML files.  I rarely use it in Lisp programming.

> 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
> code.
> The questions about `collect-string' should be, "Does this
> *functionality* belong in the core codebase?  If so, where?"

This logic makes sense.


reply via email to

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