org.el (org-insert-heading): Fix case when there the first heading starts at the...
commit8d5198d6549b91ac5726b6d8dda652a268064c16
authorBastien Guerry <bzg@altern.org>
Fri, 26 Apr 2013 06:52:43 +0000 (26 08:52 +0200)
committerBastien Guerry <bzg@altern.org>
Fri, 26 Apr 2013 06:52:43 +0000 (26 08:52 +0200)
treeab6db3d4263427b53a37943b596cc17a950705e9
parentdcb0ac48a8010ac4dba24ac1fed745f1cf2b3133
org.el (org-insert-heading): Fix case when there the first heading starts at the beginning of the buffer

* org.el (org-insert-heading): Fix case when there the first
heading starts at the beginning of the buffer.

In this case, `org-backward-heading-same-level' will throw an error in
the let form, and the error would fall back on "*" instead of falling
back on the correct number of stars to add.

Thanks to Jisang Yoo and John Hendy who reported this bug.
lisp/org.el