Carsten Dominik <carsten.domi...@gmail.com> 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