Improve `org-promote' and `org-demote'
commitcba2f0a2a3024ae5bf71e1a12ba99778a92902a2
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sat, 8 Nov 2014 13:35:24 +0000 (8 14:35 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sat, 8 Nov 2014 13:40:24 +0000 (8 14:40 +0100)
tree4685ea3b0b4bc6797e7092ce4d7899fdc1f93397
parente429eb4315d5873de45c282bae0f68b66bc70d9b
Improve `org-promote' and `org-demote'

* lisp/org.el (org-promote, org-demote): Fix docstring.  Small
  refactoring.  Ignore narrowing.
(org-fixup-indentation): Smarter indentation: handle inlinetasks and
footnote definitions.

* testing/lisp/test-org.el (test-org/demote, test-org/promote): New
  test.

`org-called-with-limited-levels' check is removed when promoting
a top-level headline.  The motivation behind it in this particular
case wasn't clear (see 10aba6b1261a47a2aa4862b7222f87814af7ba31) and
I couldn't find a good reason to keep it.

Suggested-by: Sébastien Vauban
<http://permalink.gmane.org/gmane.emacs.orgmode/92450>
lisp/org.el
testing/lisp/test-org.el