emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Shift-Arrow Pass Through for windmove?


From: Sebastian Rose
Subject: Re: [Orgmode] Shift-Arrow Pass Through for windmove?
Date: Fri, 23 Apr 2010 18:01:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Daniel E. Doherty <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]