From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Zhao Subject: (org-insert-headline '(4)) should insert new headline before point Date: Thu, 3 Apr 2014 18:59:52 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVqby-000622-KT for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 18:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVqbx-0003pu-TX for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 18:59:54 -0400 Received: from mail-ve0-x22c.google.com ([2607:f8b0:400c:c01::22c]:46877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVqbx-0003pk-OL for emacs-orgmode@gnu.org; Thu, 03 Apr 2014 18:59:53 -0400 Received: by mail-ve0-f172.google.com with SMTP id jx11so828696veb.31 for ; Thu, 03 Apr 2014 15:59:52 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hi list, (org-insert-headline '(4)) used to insert new heading before point. But this had broken recently. According to the docstring, this command inserts new heading at the end of the parent subtree ONLY if two universal prefix arguments is given, not one. Here's the reproducer: --8<---------------cut here---------------start------------->8--- emacs -Q -L path/to/org-mode/lisp/ --eval \ "(let ((buf (get-buffer-create \"test-org\"))) (with-current-buffer buf (org-mode) (insert \"* headline 1\") (goto-char (line-beginning-position)) (org-insert-heading '(4))) (switch-to-buffer buf))" --8<---------------cut here---------------end--------------->8--- Thanks