From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.help Subject: Re: Occur lite Date: Sun, 15 Jul 2012 17:41:21 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342370713 14140 80.91.229.3 (15 Jul 2012 16:45:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2012 16:45:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 15 18:45:13 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SqRwW-0002ux-Tz for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jul 2012 18:45:13 +0200 Original-Received: from localhost ([::1]:59219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqRwW-0000yw-8v for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jul 2012 12:45:12 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-X-Trace: individual.net 9z4o+PyY3zs6M5SCQjgd3grfw0S13Xbp2ueU6ppKT6PIVikfj6/1DDXZ5O8wmSxByC Cancel-Lock: sha1:ryeN9PLLQiLZK+FBZIHMcP7VpHo= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: Original-Xref: usenet.stanford.edu gnu.emacs.help:193478 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85862 Archived-At: On 07/15/2012 03:06 PM, B. T. Raven wrote:> Ignutians: > > Is there an Emacs function that extracts only words matching a regexp > and writes them to another buffer? This would work exactly like the > "occur" function but would write only the words to the *Occur* buffer > instead of the whole line. I have looked at the code for "occur" in > replace.el but I'm afraid it's over my head to try and modify it into a > custom function. An indirect solution: run occur and then run a regexp over the *Occur* buffer to capture each word. Something like: (call-interactively #'occur) (switch-to-buffer "*Occur*") ;; Or with-current-buffer (goto-char (point-min)) ;; etc.