From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rupert Swarbrick Newsgroups: gmane.emacs.help Subject: Re: copy visible text with some lines hidden with hide-lines Date: Sun, 24 Feb 2008 06:05:16 -0600 Message-ID: References: <6c22270a-576c-41c4-8f01-75b23433ca69@60g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1203864955 9478 80.91.229.12 (24 Feb 2008 14:55:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Feb 2008 14:55:55 +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 Feb 24 15:56:20 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 1JTIH5-000791-5V for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Feb 2008 15:56:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTIGZ-0001mX-ES for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Feb 2008 09:55:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 24 Feb 2008 06:05:16 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Pan/0.132 (Waxed in Black) Original-Lines: 23 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-JrCBCVwqCXPJXZ3WIAAqiodD3cVTPvz/DoQBZjR6tfYbKB/ADFZfOoeuKCyXJhkmX7EpdKOwV9gjh5Y!xi68nFXAnA0sF/Xh0kAVRS180XQPqosb6U6yN2aJW77y0BtTTWeVWnV30LNfmXL12T7cg/mr Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.37 Original-Xref: shelby.stanford.edu gnu.emacs.help:156447 X-Mailman-Approved-At: Sun, 24 Feb 2008 09:54:00 -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:51819 Archived-At: On Thu, 21 Feb 2008 16:46:20 -0800, jdzhang wrote: > 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. 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