From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [html] non-lists showing up as lists Date: Sun, 02 Jun 2013 11:12:38 +0200 Message-ID: <87hahgx4e1.fsf@gmail.com> References: <874ndj13u5.fsf@gmail.com> <51A90A6A.5090105@gmail.com> <87a9na1gi9.fsf@gmail.com> <87d2s58w0g.fsf@breezy.my.home> <87ppw5vtb2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj4L5-0005Px-VR for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 05:12:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uj4L3-0005mK-WA for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 05:12:35 -0400 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:34413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj4L3-0005kk-QS for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 05:12:33 -0400 Received: by mail-we0-f176.google.com with SMTP id t61so856281wes.35 for ; Sun, 02 Jun 2013 02:12:33 -0700 (PDT) In-Reply-To: <87ppw5vtb2.fsf@gmail.com> (Nicolas Goaziou's message of "Sun, 02 Jun 2013 09:57:21 +0200") 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: Alan L Tyree Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Completing myself: Additionally, you may want to try the following patch (against maint branch), which takes a slightly different approach for filling. Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org.el-Slight-change-to-filling-mechanism.patch >From 0b3480cf161d58cbf0bd337fd1a7fabbe2aae0c3 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 2 Jun 2013 11:12:02 +0200 Subject: [PATCH] org.el: Slight change to filling mechanism * lisp/org.el (org-setup-filling): Set `paragraph-start' and `paragraph-separate'. (org-fill-paragraph-separate-nobreak-p): Remove function. --- lisp/org.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b9e6d9e..60c5475 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -22068,28 +22068,26 @@ hierarchy of headlines by UP levels before marking the subtree." ;; `org-setup-filling' installs filling and auto-filling related ;; variables during `org-mode' initialization. +(defvar org-element-paragraph-separate) ; org-element.el (defun org-setup-filling () - (interactive) + (require 'org-element) ;; Prevent auto-fill from inserting unwanted new items. (when (boundp 'fill-nobreak-predicate) (org-set-local 'fill-nobreak-predicate (org-uniquify (append fill-nobreak-predicate - '(org-fill-paragraph-separate-nobreak-p - org-fill-line-break-nobreak-p + '(org-fill-line-break-nobreak-p org-fill-paragraph-with-timestamp-nobreak-p))))) + (let ((paragraph-ending (substring org-element-paragraph-separate 1))) + (org-set-local 'paragraph-start paragraph-ending) + (org-set-local 'paragraph-separate paragraph-ending)) (org-set-local 'fill-paragraph-function 'org-fill-paragraph) (org-set-local 'auto-fill-inhibit-regexp nil) (org-set-local 'adaptive-fill-function 'org-adaptive-fill-function) (org-set-local 'normal-auto-fill-function 'org-auto-fill-function) (org-set-local 'comment-line-break-function 'org-comment-line-break-function)) -(defvar org-element-paragraph-separate) ; org-element.el -(defun org-fill-paragraph-separate-nobreak-p () - "Non-nil when a new line at point would end current paragraph." - (looking-at (substring org-element-paragraph-separate 1))) - (defun org-fill-line-break-nobreak-p () "Non-nil when a new line at point would create an Org line break." (save-excursion -- 1.8.3 --=-=-=--