From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jdzhang@gmail.com Newsgroups: gmane.emacs.help Subject: Re: copy visible text with some lines hidden with hide-lines Date: Tue, 26 Feb 2008 11:54:12 -0800 (PST) Organization: http://groups.google.com Message-ID: <98acf58b-ef8d-43e5-b63c-7da2518ab810@s19g2000prg.googlegroups.com> References: <6c22270a-576c-41c4-8f01-75b23433ca69@60g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204059963 16696 80.91.229.12 (26 Feb 2008 21:06:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2008 21:06:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 26 22:06:28 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JU6zt-0003DQ-3H for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Feb 2008 22:05:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JU6zN-00040r-44 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Feb 2008 16:05:25 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!s19g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 128.242.109.226 Original-X-Trace: posting.google.com 1204055653 454 127.0.0.1 (26 Feb 2008 19:54:13 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 26 Feb 2008 19:54:13 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s19g2000prg.googlegroups.com; posting-host=128.242.109.226; posting-account=C8KsGwoAAABw3MAyNYsGNjEvudyVCSe1 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:156526 X-Mailman-Approved-At: Tue, 26 Feb 2008 16:05:05 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51895 Archived-At: On Feb 25, 8:22 pm, Kevin Rodgers wrote: > Rupert Swarbrick wrote: > > On Thu, 21 Feb 2008 16:46:20 -0800,jdzhangwrote: > > >> I need looking at large (10s of MB) log files regularly. I use hide- > >> lines to filter out the lines I don't care. However, I was able to > >> figure out how to copy only the text being displayed. Any suggestions > >> are welcome. > > >> Thanks. > > >> Jason Zhang > > > One thing I've done in the past was to use C-M-! and run a grep command > > which will give me the lines I want (and not too much cruft). Then you > > get a temporary buffer, with which you can't accidentally blat your log > > file by saving (so you needn't be scared of deleting lots more stuff) and > > which is hopefully small enough the Emacs won't get upset about buffer > > size. > > I think you meant `M-!'. Have you tried `M-x occur'? > > > If it's a regular job, I suspect one could write a short elisp function > > to get the relevant bits in this way, and maybe rename the buffer to > > something more informative than the standard thing with ** in it. > > > Rupert > > -- > Kevin Rodgers > Denver, Colorado, USA M-x occur works great. Thanks. Jason.