emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] outline-demote incorrectly demotes leaf nodes


From: Michael Brand
Subject: Re: [O] outline-demote incorrectly demotes leaf nodes
Date: Wed, 19 Oct 2011 17:39:54 +0200

Hi Carsten

On 18.10.2011, at 20:03, Sanjoy Mahajan wrote:
> I do worry about one point, namely that C-c C-> (outline-demote) should still
> work.  And it does work in regular outline mode.  For example, if I rename my
> test file to c.otl and then use C-c C-> on the main heading, all the subtrees
> are demoted as I expected.  Whereas in org mode the leaf subtree gets a space
> instead of a * when it is being demoted.

On Wed, Oct 19, 2011 at 09:14, Carsten Dominik
<address@hidden> wrote:
> Another option, if you prefer the C-> and C-< bindings is this:
>
> (add-hook 'org-mode-hook
>   (lambda ()
>     (define-key org-mode-map [(control ?<)] 'org-promote-subtree)
>     (define-key org-mode-map [(control ?>)] 'org-demote-subtree)))

My suggestion is something like

(define-key org-mode-map [remap outline-promote] 'org-promote-subtree)
(define-key org-mode-map [remap outline-demote] 'org-demote-subtree)
[...]

permanently built into Org mode (not in org-mode-hook) for these and
maybe even a few more outline-* bindings to get the incompatible
outline-* bindings out of the way from within Org mode.

This remap does not affect the bindings in Outline mode and resolves
the issue of the OP in Org mode, independent of, to which key any user
might have mapped outline-*mote.

Michael



reply via email to

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