emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Windmove keybindings pass-through
@ 2010-12-16 22:24 Leo Alekseyev
  2010-12-16 23:20 ` suvayu ali
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Alekseyev @ 2010-12-16 22:24 UTC (permalink / raw)
  To: emacs-orgmode

As per the docs, I have (add-hook 'org-shiftup-final-hook
'windmove-up) and similar hooks set.  That way, shift-arrow keys work
as they do in windmove (that is, they switch between windows) _unless_
I am on an org heading.

I would like to make that behavior universal -- I want to disable any
sort of shift-arrow key handling in org-mode.  I switch windows way
more often than I manipulate headings.  Optionally, it would be nice
if I can map the shift-arrow functionality to something like M-arrows
or C-arrows or C-M-arrows (whichever might be not taken / less
useful).  However, getting rid of org-mode's stealing shift-arrows is
a priority.  Any help is appreciated :)

--Leo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windmove keybindings pass-through
  2010-12-16 22:24 Windmove keybindings pass-through Leo Alekseyev
@ 2010-12-16 23:20 ` suvayu ali
  2010-12-20 20:37   ` Leo Alekseyev
  0 siblings, 1 reply; 5+ messages in thread
From: suvayu ali @ 2010-12-16 23:20 UTC (permalink / raw)
  To: Leo Alekseyev; +Cc: emacs-orgmode

On Thu, Dec 16, 2010 at 2:24 PM, Leo Alekseyev <dnquark@gmail.com> wrote:
> Optionally, it would be nice
> if I can map the shift-arrow functionality to something like M-arrows
> or C-arrows or C-M-arrows (whichever might be not taken / less
> useful).  However, getting rid of org-mode's stealing shift-arrows is
> a priority.  Any help is appreciated :)

I would recommend (windmove-default-keybindings 'control) for
`C-<arrow>'. That seems to be the modifier key least used by org-mode
and least likely to be overridden.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windmove keybindings pass-through
  2010-12-16 23:20 ` suvayu ali
@ 2010-12-20 20:37   ` Leo Alekseyev
  2010-12-20 21:21     ` Leo Alekseyev
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Alekseyev @ 2010-12-20 20:37 UTC (permalink / raw)
  To: suvayu ali; +Cc: emacs-orgmode

Thanks for the suggestion, but this is a non-solution.  My preference
would be to (a) in org-mode, move outline manipulation to e.g.
C-<arrows> from S-<arrows>, and if that is too difficult, then (b) get
rid of outline manipulation altogether.  I use S-<arrows> in windmove
orders of magnitude more often than I mess with my org outlines.
Surely there must be a way to customize org keybindings without having
to source-dive?..

--Leo

On Thu, Dec 16, 2010 at 3:20 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> On Thu, Dec 16, 2010 at 2:24 PM, Leo Alekseyev <dnquark@gmail.com> wrote:
>> Optionally, it would be nice
>> if I can map the shift-arrow functionality to something like M-arrows
>> or C-arrows or C-M-arrows (whichever might be not taken / less
>> useful).  However, getting rid of org-mode's stealing shift-arrows is
>> a priority.  Any help is appreciated :)
>
> I would recommend (windmove-default-keybindings 'control) for
> `C-<arrow>'. That seems to be the modifier key least used by org-mode
> and least likely to be overridden.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windmove keybindings pass-through
  2010-12-20 20:37   ` Leo Alekseyev
@ 2010-12-20 21:21     ` Leo Alekseyev
  2010-12-20 21:43       ` suvayu ali
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Alekseyev @ 2010-12-20 21:21 UTC (permalink / raw)
  To: suvayu ali; +Cc: emacs-orgmode

To answer my own question: here's how you avoid clobbering the
windmove commands.  This method should probably be added to the org
manual section which discusses the (add-hook 'org-shiftup-final-hook
'windmove-up), etc commands.

;; don't clobber windmove bindings: code must be placed _before_ org
loads
;; also, the (add-hook 'org-shiftup-final-hook 'windmove-up), etc
lines don't seem to do squat
;; default disputed keys remap so that windowmove commands aren't
overridden
(setq org-disputed-keys '(([(shift up)] . [(meta p)])
                          ([(shift down)] . [(meta n)])
                          ([(shift left)] . [(meta -)])
                          ([(shift right)] . [(meta +)])
                          ([(meta return)] . [(control meta return)])
                          ([(control shift right)] . [(meta shift +)])
                          ([(control shift left)] . [(meta shift -)])))
(setq org-replace-disputed-keys t)


On Mon, Dec 20, 2010 at 12:37 PM, Leo Alekseyev <dnquark@gmail.com> wrote:
> Thanks for the suggestion, but this is a non-solution.  My preference
> would be to (a) in org-mode, move outline manipulation to e.g.
> C-<arrows> from S-<arrows>, and if that is too difficult, then (b) get
> rid of outline manipulation altogether.  I use S-<arrows> in windmove
> orders of magnitude more often than I mess with my org outlines.
> Surely there must be a way to customize org keybindings without having
> to source-dive?..
>
> --Leo
>
> On Thu, Dec 16, 2010 at 3:20 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
>> On Thu, Dec 16, 2010 at 2:24 PM, Leo Alekseyev <dnquark@gmail.com> wrote:
>>> Optionally, it would be nice
>>> if I can map the shift-arrow functionality to something like M-arrows
>>> or C-arrows or C-M-arrows (whichever might be not taken / less
>>> useful).  However, getting rid of org-mode's stealing shift-arrows is
>>> a priority.  Any help is appreciated :)
>>
>> I would recommend (windmove-default-keybindings 'control) for
>> `C-<arrow>'. That seems to be the modifier key least used by org-mode
>> and least likely to be overridden.
>>
>> --
>> Suvayu
>>
>> Open source is the future. It sets us free.
>>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windmove keybindings pass-through
  2010-12-20 21:21     ` Leo Alekseyev
@ 2010-12-20 21:43       ` suvayu ali
  0 siblings, 0 replies; 5+ messages in thread
From: suvayu ali @ 2010-12-20 21:43 UTC (permalink / raw)
  To: Leo Alekseyev; +Cc: emacs-orgmode

On Mon, Dec 20, 2010 at 1:21 PM, Leo Alekseyev <dnquark@gmail.com> wrote:
> To answer my own question: here's how you avoid clobbering the
> windmove commands.  This method should probably be added to the org
> manual section which discusses the (add-hook 'org-shiftup-final-hook
> 'windmove-up), etc commands.
>
> ;; don't clobber windmove bindings: code must be placed _before_ org
> loads
> ;; also, the (add-hook 'org-shiftup-final-hook 'windmove-up), etc
> lines don't seem to do squat
> ;; default disputed keys remap so that windowmove commands aren't
> overridden
> (setq org-disputed-keys '(([(shift up)] . [(meta p)])
>                          ([(shift down)] . [(meta n)])
>                          ([(shift left)] . [(meta -)])
>                          ([(shift right)] . [(meta +)])
>                          ([(meta return)] . [(control meta return)])
>                          ([(control shift right)] . [(meta shift +)])
>                          ([(control shift left)] . [(meta shift -)])))
> (setq org-replace-disputed-keys t)
>

Thanks a lot. I wasn't aware of this method. This will be very helpful.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-20 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 22:24 Windmove keybindings pass-through Leo Alekseyev
2010-12-16 23:20 ` suvayu ali
2010-12-20 20:37   ` Leo Alekseyev
2010-12-20 21:21     ` Leo Alekseyev
2010-12-20 21:43       ` suvayu ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).