emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug Report: TAB on empty headline cycles through the wrong levels
@ 2009-11-27 22:36 Ryan C. Thompson
  2009-11-30 16:40 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan C. Thompson @ 2009-11-27 22:36 UTC (permalink / raw)
  To: org-mode Mailinglist

I have discovered a possible bug with the new 6.33 feature of cycling 
empty headline levels with TAB. IT seems that org will always assume 
that the initial level of the headline is the "base" level. Pressing TAB 
once will always go one level deeper than that, to the "child" level, 
TAB a second time will go one level shallower than the base level, and 
so on.

the problem is that I expect the "base" level to be based on the 
previous headline's level, not on the initial level of the empty 
headline itself. The problem would not usually show itself, because if 
you press meta+RET  at the end of a headline, you get a new empty one at 
the same level as the previous headline. However, if you press meta+RET 
at the *beginning* of a headline (before the stars), you get a new empty 
headline at the same level as the *next* headline, which might not be 
the same level as the previous headline.
Here's a simple test case:

* Head1
** Head2


Put the point at the very beginning of the second heading, and press 
meta+RET, then TAB. You should get this:


* Head1
*** [point is here]
** Head2

The following is what I would *expect* to get:

* Head1
* [point is here]
** Head2


So basically, the base level for depth cycling should be determined from 
the previous headline, not the new blank headline. At least, that's what 
I expected, and I can't think of any reason you would want to put a 
level-3 headline under a level-1 headline.

-Ryan

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

end of thread, other threads:[~2009-11-30 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27 22:36 Bug Report: TAB on empty headline cycles through the wrong levels Ryan C. Thompson
2009-11-30 16:40 ` Carsten Dominik

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