From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: simple useful functions Date: Wed, 03 Nov 2010 19:13:36 +0900 Message-ID: <87tyjyiujz.fsf@uwakimon.sk.tsukuba.ac.jp> References: <20101029.111346.113803171.Takaaki.Ota@am.sony.com> <20101101.174010.322416312.Takaaki.Ota@am.sony.com> <87fwvkjwh8.fsf@uwakimon.sk.tsukuba.ac.jp> <20101102.173845.392894510.Takaaki.Ota@am.sony.com> <87zktrasec.fsf@uwakimon.sk.tsukuba.ac.jp> <4CD118AF.3040207@online.de> 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 1288779140 27425 80.91.229.12 (3 Nov 2010 10:12:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2010 10:12:20 +0000 (UTC) Cc: Tak Ota , emacs-devel@gnu.org To: Andreas =?iso-8859-1?Q?R=F6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 03 11:12:14 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 1PDaKD-0000kh-JC for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 11:12:14 +0100 Original-Received: from localhost ([127.0.0.1]:36466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDaKC-0004lM-NH for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 06:12:12 -0400 Original-Received: from [140.186.70.92] (port=54965 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDaK2-0004kR-AD for emacs-devel@gnu.org; Wed, 03 Nov 2010 06:12:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDaK0-0008MF-Rw for emacs-devel@gnu.org; Wed, 03 Nov 2010 06:12:02 -0400 Original-Received: from imss12.cc.tsukuba.ac.jp ([130.158.254.161]:58341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDaK0-0008Lz-IQ for emacs-devel@gnu.org; Wed, 03 Nov 2010 06:12:00 -0400 Original-Received: from imss12.cc.tsukuba.ac.jp (imss12.cc.tsukuba.ac.jp [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 8B6312AF543; Wed, 3 Nov 2010 19:11:57 +0900 (JST) Original-Received: from mgmt1.sk.tsukuba.ac.jp (unknown [130.158.97.223]) by imss12.cc.tsukuba.ac.jp (Postfix) with ESMTP id 7BCC72AF542; Wed, 3 Nov 2010 19:11:57 +0900 (JST) Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 786673FA0531; Wed, 3 Nov 2010 19:11:57 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 6BDB71A3EDD; Wed, 3 Nov 2010 19:13:36 +0900 (JST) In-Reply-To: <4CD118AF.3040207@online.de> X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:132322 Archived-At: 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. 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=20 > 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?"