From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: simple useful functions Date: Wed, 3 Nov 2010 11:08:45 -0700 Message-ID: <20101103.110845.494787500.Takaaki.Ota@am.sony.com> References: <87zktrasec.fsf@uwakimon.sk.tsukuba.ac.jp> <4CD118AF.3040207@online.de> <87tyjyiujz.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1288807750 9247 80.91.229.12 (3 Nov 2010 18:09:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2010 18:09:10 +0000 (UTC) Cc: andreas.roehler@online.de, emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 03 19:09:06 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PDhlh-0008F4-Kl for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 19:09:05 +0100 Original-Received: from localhost ([127.0.0.1]:58327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDhlh-0001Bg-2m for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 14:09:05 -0400 Original-Received: from [140.186.70.92] (port=34594 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDhlY-00019B-M3 for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:08:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDhlX-00037u-Ju for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:08:56 -0400 Original-Received: from db3ehsobe004.messaging.microsoft.com ([213.199.154.142]:3216 helo=DB3EHSOBE004.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDhlX-00037i-Cb for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:08:55 -0400 Original-Received: from mail20-db3-R.bigfish.com (10.3.81.247) by DB3EHSOBE004.bigfish.com (10.3.84.24) with Microsoft SMTP Server id 14.1.225.8; Wed, 3 Nov 2010 18:08:54 +0000 Original-Received: from mail20-db3 (localhost.localdomain [127.0.0.1]) by mail20-db3-R.bigfish.com (Postfix) with ESMTP id 4E24A1168187; Wed, 3 Nov 2010 18:08:54 +0000 (UTC) X-SpamScore: -12 X-BigFish: VPS-12(zz1432N98dNzz1202hzz8275dhz2fh2a8h62h) Original-Received: from mail20-db3 (localhost.localdomain [127.0.0.1]) by mail20-db3 (MessageSwitch) id 1288807734276_17490; Wed, 3 Nov 2010 18:08:54 +0000 (UTC) Original-Received: from DB3EHSMHS002.bigfish.com (unknown [10.3.81.253]) by mail20-db3.bigfish.com (Postfix) with ESMTP id EFE5D370051; Wed, 3 Nov 2010 18:08:53 +0000 (UTC) Original-Received: from mail7.fw-bc.sony.com (160.33.98.74) by DB3EHSMHS002.bigfish.com (10.3.87.102) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 3 Nov 2010 18:08:51 +0000 Original-Received: from mail1x.bc.in.sel.sony.com ([43.144.65.112]) by mail7.fw-bc.sony.com (Switch-3.4.2/Switch-3.3.2mp) with ESMTP id oA3I8lNZ013499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 3 Nov 2010 18:08:48 GMT Original-Received: from localhost (tak-vaio-z790-043191018003.am.sony.com [43.191.18.3]) by mail1x.bc.in.sel.sony.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oA3I8kSV012864; Wed, 3 Nov 2010 18:08:46 GMT In-Reply-To: <87tyjyiujz.fsf@uwakimon.sk.tsukuba.ac.jp> X-Mailer: Mew-6.3.50 on Emacs-23.2.1 (i386-mingw-nt6.1.7600 built on 2010-06-30) X-OriginatorOrg: am.sony.com X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132327 Archived-At: Wed, 3 Nov 2010 03:13:36 -0700: "Stephen J. Turnbull" wrote: > Andreas R=F6hler 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. -Tak