Message from discussion
Occur lite
Received: by 10.216.105.3 with SMTP id j3mr15579weg.10.1342481649504;
Mon, 16 Jul 2012 16:34:09 -0700 (PDT)
Received: by 10.68.227.67 with SMTP id ry3mr428812pbc.8.1342481649394;
Mon, 16 Jul 2012 16:34:09 -0700 (PDT)
Path: q11ni142865962wiw.1!nntp.google.com!dj10no3160440wib.1!news-out.google.com!b9ni151218524pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!border5.newsrouter.astraweb.com!news.astraweb.com!border6.newsrouter.astraweb.com!feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!83.149.209.203.MISMATCH!news.mi.ras.ru!goblin2!goblin.stu.neva.ru!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Raffaele Ricciardi <rfflrc...@gmail.com>
Newsgroups: gnu.emacs.help
Subject: Re: Occur lite
Date: Sun, 15 Jul 2012 17:41:21 +0100
Lines: 16
Message-ID: <a6ga52Fc1sU1@mid.individual.net>
References: <jtuip602i8s@news3.newsguy.com>
Mime-Version: 1.0
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: <jtuip602i8s@news3.newsguy.com>
Bytes: 1700
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
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.