From 7afbf870f2644b79a10cc99a2851953f79c9fedb Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 1 Mar 2013 18:57:55 +0100 Subject: [PATCH] org.el (org-mode): Set `paragraph-start' * org.el (org-mode): Set `paragraph-start'. The value inherited from outline-mode is wrong because outline mode does not enforce the space after the star while Org-mode does. outline-mode value for `paragraph-start' prevents filling paragraphs containing a string like " -- *bold*": in this case, fill-paragraph might think that the "*b" part of the string starts a paragraph while it does not. Thanks to Samuel Wales for reporting this. --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index cc4c93f22..13fb44d14 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4898,6 +4898,8 @@ The following commands are available: (org-set-local 'outline-regexp org-outline-regexp) (org-set-local 'outline-level 'org-outline-level) (setq bidi-paragraph-direction 'left-to-right) + ;; FIXME Circumvent a bug in outline.el (Emacs <24.4) + (set (make-local-variable 'paragraph-start) " \\|[ \t]*$\\|\\*+ ") (when (and org-ellipsis (fboundp 'set-display-table-slot) (boundp 'buffer-display-table) (fboundp 'make-glyph-code))