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:01:57 -0700 Message-ID: <20101103.110157.309054292.Takaaki.Ota@am.sony.com> References: <87fwvkjwh8.fsf@uwakimon.sk.tsukuba.ac.jp> <20101102.173845.392894510.Takaaki.Ota@am.sony.com> <87zktrasec.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288807360 7256 80.91.229.12 (3 Nov 2010 18:02:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2010 18:02:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 03 19:02:34 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 1PDhfK-0003zo-Dw for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 19:02:30 +0100 Original-Received: from localhost ([127.0.0.1]:35340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDhfJ-0003ON-QV for ged-emacs-devel@m.gmane.org; Wed, 03 Nov 2010 14:02:29 -0400 Original-Received: from [140.186.70.92] (port=41707 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDhf8-0003Lk-0O for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:02:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDhf6-00021k-RY for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:02:17 -0400 Original-Received: from db3ehsobe002.messaging.microsoft.com ([213.199.154.140]:21067 helo=DB3EHSOBE002.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDhf6-00021a-Cp for emacs-devel@gnu.org; Wed, 03 Nov 2010 14:02:16 -0400 Original-Received: from mail21-db3-R.bigfish.com (10.3.81.242) by DB3EHSOBE002.bigfish.com (10.3.84.22) with Microsoft SMTP Server id 14.1.225.8; Wed, 3 Nov 2010 18:02:14 +0000 Original-Received: from mail21-db3 (localhost.localdomain [127.0.0.1]) by mail21-db3-R.bigfish.com (Postfix) with ESMTP id 78682B082C3; Wed, 3 Nov 2010 18:02:14 +0000 (UTC) X-SpamScore: -12 X-BigFish: VPS-12(zz1432N98dNzz1202hzz8275dhz2fh2a8h61h) Original-Received: from mail21-db3 (localhost.localdomain [127.0.0.1]) by mail21-db3 (MessageSwitch) id 1288807325465445_23365; Wed, 3 Nov 2010 18:02:05 +0000 (UTC) Original-Received: from DB3EHSMHS012.bigfish.com (unknown [10.3.81.254]) by mail21-db3.bigfish.com (Postfix) with ESMTP id 69017348053; Wed, 3 Nov 2010 18:02:05 +0000 (UTC) Original-Received: from mail7.fw-bc.sony.com (160.33.98.74) by DB3EHSMHS012.bigfish.com (10.3.87.112) with Microsoft SMTP Server (TLS) id 14.0.482.44; Wed, 3 Nov 2010 18:02:02 +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 oA3I1x7m009595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 3 Nov 2010 18:01:59 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 oA3I1wti008384; Wed, 3 Nov 2010 18:01:58 GMT In-Reply-To: <87zktrasec.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-Reverse-DNS: mail7.fw-bc.sony.com X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) 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:132326 Archived-At: Tue, 2 Nov 2010 22:27:23 -0700: "Stephen J. Turnbull" wrote: > Tak Ota writes: > > > Don't you like the simplicity? > > Proliferating unrelated functions is a complexity of its own. I agree in general. > Occur > already does this kind of thing; that's where I would look for this > functionality. Sure, you can add the function, but unless you can > document it for other users in a discoverable way, you should add it > to your init file, not to Emacs. ;-) How about rename the command as collect-occur instead of collect-string and document it as next? `M-x collect-occur' Prompt for a regexp, and collect the matching string into a collection buffer. A numeric argument N specifies to extract the Nth recorded matched substring. Does this address your concern in simpler fashion? > > How about simply adding collect-string to replace.el instead of > > trying to associate it with occur in a clumsy way? > > Uh, what "replace" functionality does "collect-string" provide? I followed your logic as you insist associating this command to occur which is defined in replace.el. -Tak