From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Re: A quick way to empty contents of entries? Date: Wed, 23 Nov 2011 17:11:26 +0000 (UTC) Message-ID: <87ehwy22ix.fsf@mean.albasani.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTGMV-0007Xl-9L for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 12:12:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTGMR-0005W4-1B for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 12:11:55 -0500 Received: from lo.gmane.org ([80.91.229.12]:56687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTGMQ-0005Vz-OC for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 12:11:50 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RTGMG-0002yT-6e for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 18:11:40 +0100 Received: from e178229045.adsl.alicedsl.de ([85.178.229.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Nov 2011 18:11:40 +0100 Received: from gegendosenfleisch by e178229045.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Nov 2011 18:11:40 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: > On Nov 4, 2011, at 7:56 AM, gylns wrote: >> Hi, all >> I want to empty all my contents but leave only with the headlines and the >> properties, is there a fast way? [...] > For one file: > > perl -ne 'print if /^\*+ / or /^\s*:PROPERTIES:\s*$/../^\s*:END:\s*$/' old.org > stripped.org Hmm... perl. Within emacs, that would be something like C-< M-x keep-lines RET ^\*\|:PROPERTIES:\(.\|\n\)+?:END: (\n via "C-q C-j") ... right? Memnon