From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Zhao Subject: Re: (org-insert-headline '(4)) should insert new headline before point Date: Fri, 4 Apr 2014 23:01:30 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWGrM-0003ty-Oy for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 23:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WWGrL-0008VZ-V5 for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 23:01:32 -0400 Received: from mail-vc0-x22a.google.com ([2607:f8b0:400c:c03::22a]:39094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWGrL-0008VU-QS for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 23:01:31 -0400 Received: by mail-vc0-f170.google.com with SMTP id hu19so3814940vcb.15 for ; Fri, 04 Apr 2014 20:01:30 -0700 (PDT) In-Reply-To: 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 Any one? On Thu, Apr 3, 2014 at 6:59 PM, York Zhao wrote: > 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