On Nov 2, 2009, at 2:18 PM, Carsten Dominik wrote:
On Oct 17, 2009, at 2:59 AM, John Wiegley wrote:
In most "power" outliners on the Mac, pressing TAB indents the
outline level of the current item. This lets you add subnotes very
quickly by typing M-RET TAB. (I find M-S-<right> way too
cumbersome to use while typing).
Since pressing TAB on a new entry (one with no body) doesn't do
anything right now, I think TAB in that case should do what M-S-
<right> does. This little snippet achieves that:
(defun org-indent-empty-items (arg)
(when (eq arg 'empty)
(goto-char (line-end-position))
(cond
((org-at-item-p) (org-indent-item 1))
((org-on-heading-p) (org-demote-subtree)))))
(add-hook 'org-pre-cycle-hook 'org-indent-empty-items)
Hi John,
this is not a bad idea, but it is a bit unstable because
the definition of empty entry is a bit unstable, it
depends on empty lines and how they are treated.
An alternative would be to activate this special feature only
immediately
after starting a new entry, either by looking at last-command, or,
maybe better,
by doing this in entries which only have the stars and maybe a TODO
keyword, but
but no text yet.
Then, TAB could even walk you through a number of indentations, like
child,
and then parent, grandparent,..., all the way to top level, and then
back
to the initial level.
This actually does work now, both in empty headlines, and in empty
plain list items.
I find it *very* convenient.
- Carsten
This also works for regular lists.
John
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
- Carsten
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode