From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Dixit Subject: how to make org-blank-before-new-entry distinguish between a TODO list and a text outline? Date: Mon, 22 Jun 2015 13:47:07 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141e5928953f705191ede9d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z75or-000111-Bu for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 13:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z75on-0001q3-NN for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 13:47:41 -0400 Received: from mail-yk0-x22f.google.com ([2607:f8b0:4002:c07::22f]:35289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z75on-0001pu-Gs for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 13:47:37 -0400 Received: by ykdy1 with SMTP id y1so26871036ykd.2 for ; Mon, 22 Jun 2015 10:47:37 -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: org-mode org --001a1141e5928953f705191ede9d Content-Type: text/plain; charset=UTF-8 http://emacs.stackexchange.com/questions/13311/make-org-blank-before-new-entry-distinguish-between-a-todo-list-and-a-text-outli I posted this question on stackexchange, but no response yet. Does anyone here have any ideas? Like many of us, I use org-mode for two different things: 1. As a TODO list manager 2. As a text outliner I'd like org-blank-before-new-entry to work differently based on context. 1. TODO list: no blank lines 2. text outline: automatically insert 1 blank line when non-heading text precedes a heading In other words, when I'm doing a TODO list when I have many headings in a row, I don't want stray line breaks between them. For TODO list mode, no blank lines: #+BEGIN_EXAMPLE ** Organize Party ** TODO Call people *** TODO Peter *** DONE Sarah ** TODO Buy food ** DONE Talk to neighbor #+END_EXAMPLE However, when I'm writing text, I want line breaks for the sake of visual whitespace / ease of reading. For outline mode, blank line before heading: #+BEGIN_EXAMPLE * Heading This is a document that has a heading, and a body. The body will consist of two paragraphs with sub-headings. * Body This is an introduction to the body. The body has two sub-headings, each of which have their own paragraph. ** The First Paragraph This is the first of two paragraphs. ** The Second Paragraph This is the second of two paragraphs. #+END_EXAMPLE I've already set org-blank-before-new-entry to auto: ((heading . auto) (plain-list-item . auto)) But I think org-blank-before-new-entry works by detecting other blank lines in the area. I want it to detect whether the preceding line of text is a heading or a non-heading. How can I modify org-blank-before-new-entry so that when I'm in a TODO list consisting only of headings, org-meta-return doesn't add a line break? but after a block of text, it does? Any thoughts? Thanks! --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit --001a1141e5928953f705191ede9d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable