From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: copying headline structure without contents Date: Thu, 23 Apr 2009 16:45:13 -0400 Message-ID: <873abzqeue.fsf@gollum.intra.norang.ca> References: <20090423212213.734d717b@newmanfamily.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lx5nT-00075D-Vo for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:45:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lx5nQ-00073X-B7 for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:45:27 -0400 Received: from [199.232.76.173] (port=44486 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx5nQ-00073S-6b for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:45:24 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:58351) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lx5nP-0005ba-Se for emacs-orgmode@gnu.org; Thu, 23 Apr 2009 16:45:24 -0400 In-Reply-To: <20090423212213.734d717b@newmanfamily.me.uk> (Mike Newman's message of "Thu\, 23 Apr 2009 21\:22\:13 +0100") 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: Mike Newman Cc: emacs-orgmode@gnu.org Or S-TAB to fold the org-mode buffer to top level headlines only Hit C-c C-k on the headlines to expand Select the region you want to copy (in transient mode) (the rest of this could be easily made into a function that works on the selected region above) M-x narrow-to-region C-c C-e v SPC to export the visible stuff to another buffer C-x h C-w to cut it all C-x 0 to close the export window M-x widen Go to where you want to insert it and C-y or C-u C-y to paste -Bernt Mike Newman writes: > 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 > > > _______________________________________________ > 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