From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: structure editing in brainstorming mode Date: Mon, 29 Dec 2008 12:15:37 -0500 Message-ID: <5474.1230570937@gamaville.dokosmarshall.org> References: <871vvrym45.fsf@gollum.intra.norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LHLiW-0001p1-SY for emacs-orgmode@gnu.org; Mon, 29 Dec 2008 12:15:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LHLiV-0001oS-BF for emacs-orgmode@gnu.org; Mon, 29 Dec 2008 12:15:48 -0500 Received: from [199.232.76.173] (port=51634 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHLiV-0001oL-7Q for emacs-orgmode@gnu.org; Mon, 29 Dec 2008 12:15:47 -0500 Received: from qmta02.emeryville.ca.mail.comcast.net ([76.96.30.24]:47876) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LHLiU-00056Q-Oj for emacs-orgmode@gnu.org; Mon, 29 Dec 2008 12:15:47 -0500 In-Reply-To: Message from Bernt Hansen of "Mon, 29 Dec 2008 11:36:26 EST." <871vvrym45.fsf@gollum.intra.norang.ca> 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: Bernt Hansen Cc: Rustom Mody , emacs-orgmode@gnu.org Bernt Hansen wrote: > "Rustom Mody" writes: > > > 1. Multiple heading demotion > > > > Lets say I start writing down some points maybe with/without some > > additional text > > * Cat > > * Dog > > > > And now I decide to put all these into a superheading 'My Pets' > > The only way I know is to enter > > * My Pets > > before Cat and then demote each subtree -- if there were not two but > > ten I'd have to do that 10 times > > This sounds like a great use for a keyboard macro > > Hit S-Tab until you get Contents view which shows headlines only (the > rest of the content is folded) and position the cursor on the first > headline to be demoted > > C-x ( > M-S-right > M-x org-forward-same-level > C-x ) > > Then just C-x e to repeat the macro and demote the current headline and > move forward to the next one. If you're demoting consecutive entries > then you can do C-x e for the first and just 'e' for each successive one > to repeat the macro. (eg. C-x e e e e demotes this headline and the > following it) > ... or use a numeric prefix. Alternatively, I think you can do this with the kill/copy/yank commands (although I had to specify a numeric prefix for the yank level: when I yanked without it, it didn't "fit in nicely at the yank position." But I may be misunderstanding the way it's supposed to work): `C-c C-x C-w' Kill subtree, i.e. remove it from buffer but save in kill ring. With a numeric prefix argument N, kill N sequential subtrees. `C-c C-x M-w' Copy subtree to kill ring. With a numeric prefix argument N, copy the N sequential subtrees. `C-c C-x C-y' Yank subtree from kill ring. This does modify the level of the subtree to make sure the tree fits in nicely at the yank position. The yank level can also be specified with a numeric prefix argument, or by yanking after a headline marker like `****'. `C-y' Depending on the variables `org-yank-adjusted-subtrees' and `org-yank-folded-subtrees', Org's internal `yank' command will paste subtrees folded and in a clever way, using the same command as `C-c C-x C-y'. With the default settings, level adjustment will take place and yanked trees will be folded unless doing so would swallow text previously visible. Any prefix argument to this command will force a normal `yank' to be executed, with the prefix passed along. A good way to force a normal yank is `C-u C-y'. If you use `yank-pop' after a yank, it will yank previous kill items plainly, without adjustment and folding. > > > > 2. Converting heading type > > > > Sometimes one assumes that the points are 'small' and so are entered > > as + points. Thus > > * Pets > > + Cat > > + Dog > > and then at some point it emerges that the +es had better be changed > > to headings that is (the requisite number of) *s. Any easy way of > > doing that? > > You can just use query replace for this > > Highlight the entries to convert and then > > C-M-% > > and change > '^ \+' > to > '**' (or '***' if you are using odd levels only) > I tend to forget occasionally that org-mode is *just text*: none of the binary/proprietary/hidden/convoluted/confused/confusing/obfuscated crap that most other programs force you into. Thanks for the reminder, Bernt! Regards, Nick