emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Orgmode 8.0.2: Possible bug in `org-insert-heading` when invoked at end of a heading with a property
@ 2013-04-29 23:41 Anupam Sengupta
  2013-05-15  3:42 ` Anupam Sengupta
  0 siblings, 1 reply; 2+ messages in thread
From: Anupam Sengupta @ 2013-04-29 23:41 UTC (permalink / raw)
  To: emacs-orgmode

Hello fellow Orgmode users,

Have installed orgmode 8.0.2 last night, and loving it so far.  Facing
one issue (or change in behavior) though.  This is on Emacs 24.3.

Looks like M-RET (`org-insert-heading`), and it's equivalent M-S-RET
(`org-insert-todo-heading`) are behaving a little erratically when
invoked from the _end_ of a heading that has a property drawer.

An example will perhaps help:

With a heading _without_ any property drawer, such as:

*** A Heading
^           ^
Beginning   End

If I invoke M-S-RET at the beginning or end of the heading, then I get
the expected behavior, where I get a new item created as:

***              <----- This is created if invoked from the _beginning_ of the line

*** A Heading    <----- The original heading

***              <----- And this is created if invoked from the _end_ of the line

However, if there is a _drawer_ on the heading, then the behavior when
M-RET is invoked from the _end_ of the line is:

*** A Heading with a Drawer
    :PROPERTIES:
    :CATEGORY: TEST
    :END:
    ***          <----- The second item's outline

    ^^^
    Note that the second item's outline got indented, and has
    leading spaces (indented?)


This is inconsistent with the behavior in earlier versions of
Orgmode.

Not sure if this is a bug (since there seems to be new functionality
such as C-u C-u M-RET to add a new item at end of the parent's subtree
in version 8.0).


Thanks,
-- 
Anupam

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

* Re: Orgmode 8.0.2: Possible bug in `org-insert-heading` when invoked at end of a heading with a property
  2013-04-29 23:41 Orgmode 8.0.2: Possible bug in `org-insert-heading` when invoked at end of a heading with a property Anupam Sengupta
@ 2013-05-15  3:42 ` Anupam Sengupta
  0 siblings, 0 replies; 2+ messages in thread
From: Anupam Sengupta @ 2013-05-15  3:42 UTC (permalink / raw)
  To: emacs-orgmode

All,

Finally found the cause of the issue I had reported a few weeks back:

    Anupam> Looks like M-RET (`org-insert-heading`), and it's equivalent
    Anupam> M-S-RET (`org-insert-todo-heading`) are behaving a little
    Anupam> erratically when invoked from the _end_ of a heading that
    Anupam> has a property drawer.

[...]

    Anupam> behavior when M-RET is invoked from the _end_ of the line
    Anupam> is:
    Anupam> *** A Heading with a Drawer
    Anupam>     :PROPERTIES:
    Anupam>     :CATEGORY: TEST
    Anupam>     :END:
    Anupam>     *** <----- The second item's outline
    Anupam>     ^^^ Note that the second item's outline got indented,
    Anupam>         and has leading spaces (indented?)

Basically, the issue is that there is a bad interplay with the
`electric-indent-mode`, which is causing the additional indentation to
be added during the invocation of `org-insert-heading`.

Apologies for the noise, and hopefully this helps someone.  It might be
useful to add this minor mode in the list of conflicts in the manual
also.

Regards,
--
Anupam
    

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

end of thread, other threads:[~2013-05-15  3:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 23:41 Orgmode 8.0.2: Possible bug in `org-insert-heading` when invoked at end of a heading with a property Anupam Sengupta
2013-05-15  3:42 ` Anupam Sengupta

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