From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brady Trainor Subject: Re: New headline after no content (empty headline) Date: Sun, 30 Mar 2014 23:26:19 -0700 Message-ID: <53390A8B.2020507@uw.edu> References: <874n2xtzrv.fsf@bzg.ath.cx> <87ob0xmhzc.fsf@bzg.ath.cx> <87a9c6ykrx.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUVg2-0005UZ-A6 for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 02:26:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUVfw-0000XC-8Q for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 02:26:34 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:40623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUVfw-0000Wt-3F for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 02:26:28 -0400 Received: by mail-pa0-f53.google.com with SMTP id ld10so7725549pab.40 for ; Sun, 30 Mar 2014 23:26:24 -0700 (PDT) In-Reply-To: <87a9c6ykrx.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode@gnu.org On 3/30/2014 10:55 PM, Bastien wrote: > Hi Brady, > > Brady Trainor writes: > >> For `org-insert-heading' (M-RET), I wanted the following action on empty >> headlines: >> >> "* " |--> "* \n* ", rather than "*\n* ". > > I'm not sure I understand this, can you make it more explicit? > > Thanks! > I mean that if I use org-insert heading on an empty headline, it removes the space after asterisk(s). This then means that what was previously an empty heading (with a space), becomes just asterisk(s) no longer interpreted by org-mode as a heading. I concluded that the space was removed by org-N-empty-lines-before-current function, where `(unless (looking-back "\* \n")...` prevents `org-N-...` from removing that space. Thank you, Brady