From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Shift-Arrow Pass Through for windmove? Date: Fri, 23 Apr 2010 18:01:41 +0200 Message-ID: <87sk6mqhsq.fsf@gmx.de> References: <87633jb57w.wl%ded-law@ddoherty.net> 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 1O5LKE-0002SG-Ap for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 12:01:54 -0400 Received: from [140.186.70.92] (port=45009 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5LKC-0002Rf-OR for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 12:01:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5LKB-0002M9-6c for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 12:01:52 -0400 Received: from mail.gmx.net ([213.165.64.20]:43897) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O5LKA-0002Lj-MX for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 12:01:51 -0400 In-Reply-To: <87633jb57w.wl%ded-law@ddoherty.net> (Daniel E. Doherty's message of "Thu, 22 Apr 2010 15:30:11 -0500") 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: "Daniel E. Doherty" Cc: "emacs-orgmode@gnu org" Daniel E. Doherty writes: > All, > > I make *very* frequent use of the shift-arrow keys to move from window > to window inside emacs via windmove. It is probably the most frequent > key combination I access. > > Anyway, is there a way to make org-mode friendlier to it by passing the > key along whenever org-mode would otherwise throw an error. For > example, when not on a heading, when in the agenda, and wherever else? > > I really like Carsten's use of the arrow keys for structure editing and > don't want to lose that, just whenever org-mode can't make use of the > keys. Yes, that would be helpfull! I guess you could do this: (defun my/org-windmove-right-maybe (&optional arg) (interactive "P") (if (and (not (org-on-heading-p)) (not (org-at-item-p))) (windmove-right arg) (org-shiftright arg))) ;; and bind it in org-mode-hook: (add-hook 'org-mode-hook (lambda () (define-key org-mode-map [(shift right)] 'my/org-windmove-right-maybe))) Sebastian