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: Carsten Dominik
Subject: Re: [O] outline-demote incorrectly demotes leaf nodes
Date: Fri, 21 Oct 2011 16:40:22 +0200

On Oct 19, 2011, at 5:39 PM, Michael Brand wrote:

> 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.

Would you like to carefully think about which other functions you might want to 
have remapped, and then prepare a patch?

- Carsten


reply via email to

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