From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Newman Subject: Re: copying headline structure without contents Date: Thu, 23 Apr 2009 21:22:13 +0100 Message-ID: <20090423212213.734d717b@newmanfamily.me.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lx5R4-0006Mw-9x for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:22:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lx5R1-0006Mk-RR for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:22:17 -0400 Received: from [199.232.76.173] (port=50586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx5R1-0006Mh-MP for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:22:15 -0400 Received: from smtp4.enta.net ([78.33.48.14]:55533) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lx5R1-0002mu-Bg for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:22:15 -0400 Received: from localhost.localdomain (unknown [84.45.232.14]) by smtp4.enta.net (Postfix) with ESMTP id 71A79ADF3CC for ; Thu, 23 Apr 2009 20:22:13 +0000 (UTC) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I think this is handled easily enough with existing org-mode + emacs facilities 1) Mark the sub-tree (C-c @ is useful) 2) Copy and yank where you need it 3) Mark the new copy (or activate transient mark mode) 4) M-C-% (query-replace-regexp in region) to eliminate all the lines not starting with "*" A suitable regexp should be "^[^*].*^J" where the ^J (linefeed) is entered by C-q C-j. On Thu, 23 Apr 2009 11:47:02 +0200 Rainer Stengele wrote: > hi all, > > is it possible to clone all visible or marked headlines without > contents? > > Example: > > > Having these lines: > > * header1 > - contents > ** header11 > - contents > * header2 > - contents > ** header21 > - contents > > > I'd like to have > > > * header1 > - contents > ** header11 > - contents > * header2 > - contents > ** header21 > - contents > * header1 > ** header11 > * header2 > ** header21 > > > application: > having written a spec for a job I want to write another > one for a similar subject with headlines as before but changed > contents > > > Thanks for any thought! > > Rainer > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode