From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: rebinding Tab key Date: Mon, 14 May 2012 18:47:06 -0400 Message-ID: <10242.1337035626@alphaville> References: <4FB13C84.4060408@reidster.net> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SU42u-00021k-V6 for emacs-orgmode@gnu.org; Mon, 14 May 2012 18:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SU42s-0000tq-UK for emacs-orgmode@gnu.org; Mon, 14 May 2012 18:47:16 -0400 Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:35973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SU42s-0000tc-PC for emacs-orgmode@gnu.org; Mon, 14 May 2012 18:47:14 -0400 In-Reply-To: Message from Reid Priedhorsky of "Mon, 14 May 2012 11:10:28 MDT." <4FB13C84.4060408@reidster.net> 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: Reid Priedhorsky Cc: emacs-orgmode@gnu.org Reid Priedhorsky wrote: > Hi, > > I'm an org-mode newbie just getting started. I use a lot of other > software where Tab means "indent this outline item more" and Shift-Tab > means "indent this outline item less", so I'd like to make org-mode > behave consistently. Also, I use Meta-Right/Left in other contexts for > expanding and collapsing outline; again, I'd like to make org-mode > consistent. > > (I've looked in the FAQ and manual, and searched the web and the > mailing list but didn't come up with anything. I apologize in advance > if I've missed something.) > > More specifically, I'd like the following keybindings: > > M-RIGHT - progressively expand headline > if headline is in state OVERVIEW, change to CONTENTS > if headline is in CONTENTS, change to SHOW ALL > if headline is in SHOW ALL, do nothing > > M-LEFT - progressively collapse headline > if headline is in SHOW ALL, change to CONTENTS > if headline is in CONTENTS, change to OVERVIEW > if headline is in OVERVIEW, do nothing > > M-S-RIGHT - progressively expand whole file > M-S-LEFT - progressively collapse whole file > same as without Shift, but apply to whole file instead of headline > > TAB - demote current subtree (what's now bound to M-S-RIGHT) > S-TAB - promote current subtree (now bound to M-S-LEFT) > > I see that TAB normally does a lot of other stuff in addition to > rotating states. It would be nice to keep this, but I'm willing to > give it up for now. > > Is this possible to do this without writing a lot of elisp? I know > very little elisp; I did find the definition of org-cycle in org.el, > but I think hacking it is beyond me (for the amount of effort I'm > willing to invest). > My gut feeling (and it's only that: I may well be wrong) is that if you follow this path, you are in for a world of hurt: you'll be fighting *against* org all the time and in the end you will lose[fn:1]. My advice is to leave well enough alone. Nick Footnotes: [fn:1] That's a lesson I've learnt from similar experiences, not with emacs/org perhaps, but with various other pieces of software: NetworkManager, PulseAudio, now with Unity. In most cases, I've lost: either I've given in (Network Manager - still hate it but it works better than anything I've cooked up), or couldn't live with it and removed the miscreant (PulseAudio), or am still struggling with it (Unity - but in the end probably it will go, just as with PulseAudio). With all these things, you can bend them a little to your will but if you try too hard, something will break. Emacs/org is more malleable than most but what you are describing strikes me as trying to bend things too far.